Skip to main content
When a user of your service interacts with an invitation form that activity generates events, and these events can be consumed via an onEvent function provide to Vortex as part of the rendering of the invitation form. All events have the follow set of standard properties. Payload varies by event, as outlined in the sections for each individual event.
type UUID = string & { _brand: 'UUID' };

type BaseEvent {
  organizationId: UUID; // id of the organization for which the event falls under
  accountId: UUID; // the id of the specific account within the organization for which the event falls under
  projectId: UUID; // the id of the specific project within the account for which the event falls under
  widgetConfigurationId: UUID; // the id of the widget configuration that originated the event or the underlying invitation associated with the event
  environmentId: UUID; // the id of the environment in which the event occurred
  deploymentId: UUID; // the id of the deployment specific to this event
  name: string; // the name of the event
  timestamp: Date; // the time which the event occurred
  platform: string; // the platform (web, ios, android) on which the invitation was initiated
  useragent?: string; // the useragent from of the device used to create the event if available
  referer?: string; // the full URL of the referer if available
  refererDomain?: string; // the domain of the referer if available.
  sessionId?: UUID; // the session id, generated by the widget, of a particular session.
  foreignUserId?: string; // the id, in your system, of the user that created the event, if available/applicable
  segmentation?: Record<string, any>; // segmentation of the event as specified by the widget prop
  payload?: Record<string, any>; // any unique information for the specific event type
  groups?: Array<{ // the group or groups that the event is related to as defined by your system
    type: string;
    id: string;
    name: string;
  }>; 
}

invite_formRender_succeeded

This event fires when the invitation form is rendered.
type invite_formRender_succeeded extends BaseEvent {
  payload?: null;
}

invite_formRender_failed

This event fires when there is an error trying to render the invite form.
type invite_formRender_failed extends BaseEvent {
  payload?: {
    error: string; // the error message
  };
}

email_field_focussed

This event fires when the user puts focus on the form field to enter email addresses.
type email_field_focussed extends BaseEvent {
  payload?: {
    timestamp: number // the number of MS since the form was rendered
  };
}

email_field_blurred

This event fires when the user blurs the email form field that was once in focus.
type email_field_blurred extends BaseEvent {
  payload?: {
    timestamp: number // the number of MS since the form was rendered
  };
}

email_submission_validated

This event fires when an email address entered by the user is validated. The results of the validation are included, even when your own validation function was used.
type email_submission_validated extends BaseEvent {
  payload?: {
    email: string;
    isValid: boolean;
  };
}

email_fieldSubmission_succeeded

This event fires when the user invites people via email by manually entering email addresses.
type email_fieldSubmission_succeeded extends BaseEvent {
  payload?: {
    formData: Record<string, any>; // this is the raw form data that is being sent to create invitations
  };
}

email_fieldSubmission_failed

This event fires when the user clicks the main Invite/CTA button on your invite form and the Vortex backend responds with an error.
type email_fieldSubmission_failed extends BaseEvent {
  payload?: {
    error: string; // the error message
  };
}

sharingDestination_button_clicked

This event fires when the user clicks on any of the sharing options for shareable links provided on the invite form.
type sharingDestination_button_clicked extends BaseEvent {
  payload?: {
    clickName: string; // the text of the copy share link element
  };
}