Workato embedded

Index

Type aliases

EmbeddingClickMessage

EmbeddingClickMessage: EmbeddingMessage<"click">

Emitted when user clicks somewhere inside an embedding iframe.

This message may be helpful in some situations because browsers don't emit click events for iframes.

{
  type: 'click'
}

EmbeddingErrorMessage

EmbeddingErrorMessage: EmbeddingMessage<"error", { details?: any; message: string }>

Emitted when some error occurs.

{
  type: 'error',
  payload: {
    // Error message
    message: number;
    // Error details
    details?: any;
  }
}

EmbeddingHeightChangeMessage

EmbeddingHeightChangeMessage: EmbeddingMessage<"heightChange", { height: number }>

Emitted when content height of Workato app has changed.

{
  type: 'heightChange',
  payload: {
    // Current content height in pixels.
    height: number;
  }
}

EmbeddingLoadedMessage

EmbeddingLoadedMessage: EmbeddingMessage<"loaded", { url: string }>

Emitted when Workato app is loaded i.e. is ready to receive messages from vendor app.

{
  type: 'loaded',
  payload: {
    // Workato URL of the loaded page
    url: string;
  }
}

EmbeddingNavigatedMessage

EmbeddingNavigatedMessage: EmbeddingMessage<"navigated", { replaced: boolean; url: string }>

Emitted when Workato app is navigated to another page (Workato URL has changed).

{
  type: 'navigated',
  payload: {
    url: string;
    // Flag indicating whether new URL was appended to browser history or replaced the last history item.
    replaced: boolean;
  }
}

EmbeddingNavigationMessage

EmbeddingNavigationMessage: EmbeddingMessage<"navigation", { url: string }>

Says to Workato that it needs to navigate to provided URL.

{
  type: 'navigation',
  payload: {
    url: string;
  }
}

EmbeddingUnloadedMessage

EmbeddingUnloadedMessage: EmbeddingMessage<"unloaded">

Emitted by Workato app in window's beforeunload event handler.

{
  type: 'unloaded'
}

EmbeddingVendorMessage

EmbeddingVendorMessage: EmbeddingNavigationMessage

Messages that vendor's webapp may send to Workato via PostMessage API.

Note that if you don't use EmbeddingClient you'll need to JSON.stringify them by yourself before sending.

EmbeddingWorkatoMessage

Messages that Workato sends to the vendor's webapp via PostMessage API.

Note that if you don't use EmbeddingClient you'll need to JSON.parse them by yourself.

MessageHandler

MessageHandler<TData>: (data: TData) => any

Type parameters

  • TData

Type declaration

    • (data: TData): any
    • Parameters

      • data: TData

      Returns any

MessageType

MessageType: EmbeddingWorkatoMessage["type"] | "*"

VendorNavigationEvent