Skip to main content
An app can send its own events to the page embedding Omni by calling omni.emit(name, payload) in the app’s code. Each call arrives on your page as an app:event event. Use this to react to something that happens inside the app — a row selection, a click on a call-to-action, or a state change your own product needs to know about. The app author chooses the name and payload. Omni validates the size and rate of these events, but does not inspect or generate their content.
Embedded apps are in beta. Contact Omni support to enable them.

Payload

Properties

string
The event name the app passed to omni.emit. At most 128 characters.
unknown
The value the app passed to omni.emit. Must be JSON-serializable and at most 16,384 characters once serialized (about 16 KB). Optional — an app can emit a name with no payload.

Example

An app calls:
Your page receives:
Listening for it:
Refer to Consuming events for the full listener setup, including origin checks.

Limits

Omni drops an event without delivering it when:
  • The event name is longer than 128 characters
  • The serialized payload is longer than 16,384 characters
  • The payload isn’t JSON-serializable
  • The app emits more than 20 events in 2 seconds
Because oversized events are dropped rather than truncated, send IDs and small summaries instead of whole result sets. Outside of an embed, omni.emit does nothing, so an app that emits events is still safe to open directly in Omni.