Run Embedded Outgoing Event

In cases where an Airkit application has been embedded into another website using the SDK, the Run Embedded Outgoing Event Action is used to send data from the Airkit application to the embedded environment.

πŸ“˜

SDK Configuration Required

This Action can only be used when an application is inserted into an existing website via the SDK. For a deeper introduction to how this Action is used, see Passing Data.

Use Case

  • Maintain context between your Airkit application and the embedded environment.
  • Apply information gathered in an Airkit application to customize your embedded environment directly.

Properties

Event

The name of the Embedded Outgoing Event. This is defined when the Embedded Outgoing Event is created in the Connections Builder, under Embedded Event Sources > Outgoing Events.

Key

The key, sometimes called the eventSourceKey, that references the Embedded Outgoing Event. This is defined when the Embedded Outgoing Event is created in the Connections Builder, under Embedded Event Sources > Outgoing Events. It must be referenced when configuring your embedded environment so that it can parse the data sent from Outgoing Events. See Passing Data for more information.

When configuring the Run Embedded Outgoing Event Action, the Key will be pulled automatically when the Event is selected from the dropdown menu.

Inputs

The data sent to the embedded environment.

When an Embedded Outgoing Event is created in the Connections Builder, it is assigned variables that it will send to the embedded environment. For each of these variables, the value can be defined using an Airscript expression.

These variable names and their associated values are then used to define the payload attribute of a JSON object that is sent to the embedded environment.

Example JSON

{
  "payload":{
    "example_text":"Sample Text",
    "example_number":5
  },
  "eventSourceKey":"example_outgoing_event"
}