Skip to main content

API Commands

The track action on the API Event Endpoint will accept a number of event values that act as commands to trigger the sending of a specific asset. In these cases there is no need to pass a separate properties section, as every value under the root of the object forms the start of data for use as a merge tag in the campaign, though the properties of the customer are available as usual in the merge tags.

Each event must provide the assetId property to identify the asset code of the asset to be sent.

When the asset is sent, the current state of the customer is added by the Intilery CDP as a root merge tag, so does not need to be passed in on the track event.

Note that you can only send to a customer who has been identified via the HTTP API or identified via the Analytics.js tag

Commands#

eventaction
send_emailsend the specified email
send_smssend the specified sms
send_printsend the specified letter
send_pushsend the specified push to all customers devices
start_journeystart a journey

Event Data for send_ commands#

fieldrequireddescription
userIdrequiredUnique identifier for the user in your database
eventrequiredOne of the commands listed above.
assetIdrequiredThe code of the Campaign (Asset)
timestampoptionalISO-8601 UTC Timestamp (e.g. 2019-11-18T13:30:11.444Z) for then the event happened
<anything else>optionalAny valid JSON that is then available for use in the asset using merge tags

Example#

POST https://tracking.intilery.com/track/{clientId}/{accountId}/{BRANDID}/v1/track
{    "userId": "ABC/123",      "event": "SEND_SMS",      "assetId": "202007-B-AbandonedBooking",      "timestamp": "2019-11-18T13:30:12.984Z",      "bookingId" : "1234" }

Event Data for start_journey command#

fieldrequireddescription
userIdrequiredUnique identifier for the user in your database
eventrequiredstart_journey
properties.journeyIdToTriggerrequiredThe ID of the Journey to start. You can get this from the URL when you view a journey, e.g. if the URL is: /journeys/view/6046429d73096e3b2dca973d/1, then the journey ID is 6046429d73096e3b2dca973d
properties.stepIdToTriggeroptionalThe ID of the step to insert the customer at. Copy this from your journey steps by clicking the barcode icon at top right of any step
timestampoptionalISO-8601 UTC Timestamp (e.g. 2019-11-18T13:30:11.444Z) for then the event happened
<anything else>optionalAny valid JSON that is then available for use in the journey or for forwarding on to assets when sending a campaign

Example#

POST https://tracking.intilery.com/track/{clientId}/{accountId}/{BRANDID}/v1/track
{    "userId": "ABC/123",      "event": "start_journey",    "properties": {      "journeyIdToTrigger": "6046429d73096e3b2dca973d",      "stepIdToTrigger": "01c318b8-1f16-40b3-9808-709c5c1b44f6"    }}

Note: When looking at events or customers in the Intilery platform, you may see references to "customerId", this is the internal unique ID for the customer that Intilery assigns. This ID is for Intilery use only.