API-based Journey Triggers

Updated 

Journey facilitator has different types of trigger methods. In this article, we are going to cover how a journey can be called using an API call from an external system.

It involves setting up an API endpoint setup consisting of 2 parts:

  • Header

  • Request Parameters

  1. More information about the Header of the API can be found here.

  2. API Payload configuration: Once the bearer token is generated using the above steps, we now need to understand the endpoint URL and the body of the journey API.

    1. Endpoint URL: This is the URL which needs to be hit everytime we want to run a journey on any profile. It can also be used when triggering a journey for the same profile once again.

      Note: The env parameter defines the environment of the client. This needs to be blank if the environment if Prod. If you are not sure which env your partner belongs to, kindly reach out to your success manager.

    2. Request Body: This is a very crucial part of the API based journey trigger. The whole request body contains 3 main sections:

      1. Journey ID: This is the unique ID of the journey that is supposed to be triggered. It can be fetched from the URL of the journey canvas in the Sprinklr environment as show in the video below.

      2. Context params: This refers to the dynamic key-value pairs (essentially all the Meta Data) that can be passed to Sprinklr. All these variables are accessible in the journey using the Update Properties node and can be used for various actions such as personalizing messages, creating decision logics and perform various opertations. The datails for the same can be found here .

      3. Profile: Customer Journey's in Sprinklr run on an entity called "Profile". These are essentially the client customers whose details are to be passed to Sprinklr. The mandatory fields for the profile entity include. The same object can be repeated multiple times if the BULK API is being used to pass multiple profile data in the same API call. More details for the Bulk API can be found here .

        1. Channel type: "WHATSAPP_BUSINESS" for WhatsApp, SMS for SMS, "EMAIL" for Email

        2. Channel ID: Profile phone number including country code for WhatsApp and SMS, Email id for Email

        3. First name: Profiles First Name.

        4. Full name: Profiles First Name needs to be provided in the profile section of the request body.

Sample API Payload

Sample payload can be found here.