To begin working with the Events API, you'll need to configure the Export API step in the builder if you haven't already. Follow these steps to set up and use the event dispatcher endpoint effectively:
1. Setting Up the Export API Step
Configure Export API in the Builder: Navigate to your workflow builder and add the Export API step. Make sure your callback URL is correctly configured to point to your event dispatcher endpoint.
2. Single Webhook Setup
Since your workflow will have only one callback, you need to manage any additional dispatch or routing on your server after receiving the event data. Use this link to find more information on [Receiving Events](https://developer.trulioo.com/reference/sendevent).
3. Callback URL and Event Payload
Your Callback URL will receive JSON-based payloads containing various event types. The volume of events will vary depending on the activity of users in your flow.
Example Event Payload
{
"id": "sample-id",
"token": "sample-token",
"type": "EVENT_CALLBACK",
"event": {
"type": "SERVICE_SUBMIT",
"ts": 1718011363,
"user": "sample-user-id"
},
"flowId": "sample-flow-id",
"userId": "sample-user-id",
"serviceType": "TRULIOO_EIDV",
"test": true,
"retry": 0,
"serviceData": {
"timestamp": 1718011363,
"serviceStatus": "COMPLETED",
"match": true,
"transactionInfo": {
"accountName": "sample-account-name",
"accountIdentifier": "sample-account-identifier",
"countryCode": "US",
"date": "2022-11-22T12:00:00Z",
"transactionId": "sample-transaction-id",
"transactionRecordId": "sample-transaction-record-id",
"userName": "sample-username"
},
"secondaryMatch": null
}
}
Event Type | Description |
---|---|
URL_VERIFICATION | Occurs when an API Handshake is initiated by Trulioo. challenge: String sent by Trulioo, must be returned to verify the URL. token: Static token sent with each transaction. |
FLOW START | Occurs when a Workflow is initiated. user, flowId, id, test, token: Various identifying and status fields. |
STEP INIT | Occurs when a Workflow form step exists in a flow. user, flowId, id, test, token: Various identifying and status fields. |
STEP_SUBMIT | Occurs when form data is sent to Trulioo by the end user. user, flowId, id, test, token, formData: Various identifying and status fields, plus submitted form data. |
SERVICE_SUBMIT | Occurs when a service response is received by Trulioo. user, flowId, id, nodeId, test, token, serviceData: Various identifying and status fields, plus service-specific data. |
FLOW_END | Occurs when a Workflow reaches an end step. user, flowId, id, test, token: Various identifying and status fields. |
NOTE_ADDED | Occurs when a note is manually added in the Client Manager section. user, flowId: Identifying fields. |
TASK_ADDED | Occurs when a task is manually added in the Client Manager section. user, flowId: Identifying fields. |
TASK_DONE | Occurs when a task is marked complete in the Client Manager section. user, flowId: Identifying fields. |
TASK_UNDONE | Occurs when a task marked as complete is undone in the Client Manager section. user, flowId: Identifying fields. |
MANUALLY_ACCEPTED | Occurs when a Lead is marked as ‘Accepted’. user, flowId: Identifying fields. |
MANUALLY_PENDING_REVIEW | Occurs when a record is marked as ‘Review’. user, flowId: Identifying fields. |
MANUALLY_REJECTED | Occurs when a Lead is marked as ‘Rejected’. user, flowId: Identifying fields. |