- 19 Nov 2024
- 3 Minutes to read
- Print
- DarkLight
Trigger Experience
- Updated on 19 Nov 2024
- 3 Minutes to read
- Print
- DarkLight
The API described allows for triggering specific steps in a customer or patient journey within an Experience. It requires header parameters like an API key and path parameters including a client ID and a unique trigger ID generated by the Relay system. Clients can also create user-friendly trigger IDs. The API accepts a JSON document for body parameters, which can include optional journey IDs and asset IDs. It supports input parameters for the journey and includes properties to identify the source system making the API call. Responses include a success status with details on message delivery and notification results for each communication channel associated with the customer. Error handling is also outlined, with specific HTTP status codes for various issues, such as bad requests or unauthorized access. Overall, this API facilitates personalized customer interactions through automated journey triggers.
This API can be used to trigger a specific step in an Experience for single a Customer or Patient.
Contains the API key needed.
Client ID
The unique trigger ID to be executed. Identifies the journey trigger to be launched. The Relay system generates a unique trigger_id when a user creates a journey in the CX Builder. The auto-generated trigger_id looks like (13425ae9-7ce7-4109-beeb-b0970894bbb2). Additionally, a client can create a more user friendly trigger_id, like (Delivery-Reminder-2), using the CX Builder. This API will accept either option.
Identifies a unique client Customer or Patient.
A trigger experience JSON document
If this optional property is set, the system will verify that the trigger_id is contained within the specified journey and if it is not an error will be returned.
This asset id to override in the message.
This is a arbitrary passthrough property specified by the Client for reporting and tracking by the Client.
This property contains a collection of input properties for the Journey. Input parameters are defined when the Journey is created or updated. Each input property must be prefixed with input_.
This object contains two properties, lb_name and lb_source, which a Client can use to identify their source system that made this REST API call.
Can be used by clients to determine the specific user if the source system in lb_source is CX portal or if it was system initiated.
Can be used by clients to determine whether the source system launching the journey was CX Portal or their own via API call.
A response object with the message and notification results.
This object contains the status of a Message being added to the Customer or Patient Feed. Valid values are (sent - A message was placed onto the Customer or Patient feed), (not-sent - A message was not placed on the Customer or Patient Feed), (error - An error occurred while trying to place a message onto the Customer or Patient Feed)
This object contains the status of sending the notification to each channel associated with the Customer or Patient. There will be one result entry for each channel associated with the Customer or Patient. For example, if the Customer or Patient has two phone numbers associated with the CCID, then there will be two result entries, one for each phone number.
This object contains the status of sending the notification to each channel associated with the Customer or Patient. There will be one result entry for each channel associated with the Customer or Patient. For example, if the Customer or Patient has two phone numbers associated with the CCID, then there will be two result entries, one for each phone number.
The notification.results.channel_addr field contains the result of attempting to send a notification on the specific channel.
The notification.results.channel_type identifies the type of channel. Valid values are (sms - The channel_addr is a mobile phone number and the notification will be sent via SMS).
The notification.results.status field contains the result of attempting to send a notification on the specific channel. Valid values are (ok - A notification was successfully sent), (error-sms - An error occurred while attempting to send and SMS notification), (no-consent - The mobile number does not have consent to send a notification), (channel-deactivated - The channel has been deactivated and can no longer received notifications).
This field is being deprecated and should no longer be used. Use the notification.results.status property instead.
Bad Request. If there is an error with the request POST body, the HTTP status code will be set to 400 and the response body will contain specific details on the error. Note that the structure of the error response JSON may differ depending on the nature of the error.
A array of unique trigger_id and ccid combinations to which to send Relay experiences.
Unauthorized
Not Found - The requested resource was not found. Please verify the route parameter.
Conflict - Indicates the request could not be processed. A common reason is when attempting to create a new Journey object, but the ID already exists in the system.
An unexpected server error occurred. The response body should contain additional information related to the server error. Please retry your request.