Skip to content

Trigger properties object specification

When using one of the endpoints for sending a campaign with API-Triggered Delivery, you may provide a map of keys and values to customize your message.

If you make an API request that contains an object in "trigger_properties", the values in that object can then be referenced in your message template under the api_trigger_properties namespace.

For example, a request with the following could add the word "shoes" to a message by adding {{api_trigger_properties.${product_name}}}.

1
2
3
4
5
6
7
8
9
10
11
12
"trigger_properties" : {
  "product_name" : "shoes",
  "product_price" : 79.99,
  "details" : {
    "color" : "red",
    "size" : {
      "numerical" : 10,
      "country" : "US"
    }
  },
  "related_skus": ["123", "456", "789"]
}

The “trigger_properties” object and api_trigger_properties.${product_name} syntax is only supported in Campaigns. To customize messages with keys and values from an API trigger request, use the Canvas Entry Properties Object.

WAS THIS PAGE HELPFUL?
New Stuff!