Message sending across channels

The Enterprise Communications API automatically creates a compatible message for each channel based on the text content held in the body property, therefore removing the need to specify a custom message body for each channel. This makes sending simple text based messages simple.

You can optionally specify a title property, which will be used to describe the message on channels that support the concept.

Merge Fields

In both the title and body properties you can optionally use merge fields to merge in properties from the Comapi profile you are addressing the message to. To do this simply add {{ profile property name }} anywhere in the properties e.g.

{
  "body": "Hello {{profile.name}}, thanks for signing up today.",
  "title": "{{profile.name}} welcome",
  "to": {
    "phoneNumber": "447123123123"
  },
  "rules": [
    "sms"
  ]
}

If you are creating a new profile with the send, then the merge field will allow the merging of the data in the to property, and if no property value can be found a blank string will replace the token.

📘

How do I find my profile property names?

You can find your profile property names by calling retrieving you profile schema by calling this web service

🚧

Watch out for length restricitions

Some channels may have maximum message length restrictions. If your message exceeds then it will be truncated. Use a customBody to provide alternative content for these channels