platformEventNotification

Updated:
Supported Platforms:
UUX

Subscribe to platform events from your extension

Platforms have the ability to send event notifications that you can subscribe to from your extension with the platformEventNotification capability. When you subscribe to an event name, your function will be executed each time the platform sends out a notification that the specific platform event has occurred.

Optionally, the platform may pass a generic data object specific to the event to your subscribed function as an argument.

For a full list of events you can subscribe to in UUX, please see the SDK Documentation on UUX Payloads.

Details

Type

tecton.sources.platformEventNotification(eventName: string, fn: () => void): () => void;

Example

tecton.sources.platformEventNotification('EXAMPLE_EVENT', function(data) {
  tecton.actions.showAlert({
    message: `Platform Event Received: ${data}`,
    styleType: 'info',
    durationInMs: 3000
  });
});

Arguments

UUX

The name of the platform event notification you want to subscribe to.

UUX

The function you want executed when the platform event notification you are subscribed to is emitted.

Release Notes

Initial Release