Skip to main content
Version: 3.1.1



You can subscribe to different events the SDK publishes during it's lifecycle. This way, you can plug in your own logic at these different points.


Events emitted by the SDK are scoped to the instance on which the eventEmitter object is configured. There is no possiblilty of naming collision with global events, or even with the same event subscribed on multiple SDK instances.

Subscribing to events#



Fired when the SDK finishes initialization by authorizing the client. This event is not fired if the credentials provided are incorrect.

mySDKInstance.eventEmitter.on('ready', (data) => {  /**   * data:   *   deploymentId: number;   */});


Fired when the SDK successfully fetches the list of integrations associated with the configured deployment.

mySDKInstance.eventEmitter.on('did-load-integrations', (data) => {  console.log('These integrations were loaded: ', data);});


Fired when the SDK successfully fetches the list of guided flows associated with the configured deployment.

mySDKInstance.eventEmitter.on('did-load-flows', (data) => {  console.log('These flows were loaded: ', data);});


Fired when the user attempts to set up a flow in the DETACHED rendering mode.

mySDKInstance.eventEmitter.on('should-load-flow') => {;});


Fired when the SDK successfully fetches the data associated with a flow.

mySDKInstance.eventEmitter.on('did-load-flow', (data) => {  console.log(`This Flow is named: ${data.templateTitle}!`);  /**   * data:   *   flowId: string;   *   flowTitle: number;   *   flowDescription: string;   */});

Integration Creation#


Fired when an integration is saved successfully.

mySDKInstance.eventEmitter.on('did-save-integration', (data) => {  alert(`Hey, we set up ${} successfully!`);});



Fired when an authorization is added successfully in the flow setup form. You can use the alreadyExists key to check if a user is adding a previously connected account again.

mySDKInstance.eventEmitter.on('did-add-authorization', (data) => {  /**   * data:   *   identity: string;   *   authorizationId: number;   *   flowId: number;   *   alreadyExists: boolean;   */});


Fired when an authorization is deleted in the flow setup form.

mySDKInstance.eventEmitter.on('did-remove-authorization', (data) => {  /**   * data:   *   authorizationId: number;   */});


Fired when an authorization is selected in an integration authorization selection step.

mySDKInstance.eventEmitter.on('did-select-authorization', (data) => {  /**   * data:   *   authorizationId: number;   */});

Unsubscribing from events#

It is easy to un-subscribe from a subscribe event. Just use the unsub method on the eventEmitter object that is available on every SDK instance.

function templateLoadCallback(data: CallbackData) {  console.log(`This template has ${data.steps.length} steps!`);}// subscribemySDKInstance.eventEmitter.on('did-load-flow', templateLoadCallback);
// unsubscribemySDKInstance.eventEmitter.unsub('did-load-flow', templateLoadCallback);