Address your messages

The Enterprise Communications API makes reaching your customers easy by allowing you to pass multiple ways of identifying your target customer in the to block of the request. Plus, the API automatically uses relevant information from a customer’s profile in order to send through a specified channel.

For example, if you pass a profileId only in the to block and wanted to send through Messenger, we automatically look at the customer’s profile to see if they have a fbMessengerId, and use it.


Profiles

Contact profiles make it easier to send across multiple channels because you can retain important details such as phone numbers, Facebook IDs, and emails, and then have us automatically utilise them when required.

To ensure we create or update a profile record for a contact, you must include a profileId in the to section of your requests. The profileId value can be any unique identifier for the contact, so if your system uses email to identify customers pass that, or customer numbers, or whichever identifier you use.

{
  "body": "The phoneNumber will be stored against the profileId",
  "to": {
    "profileId": "[email protected]",
    "phoneNumber": "447123123123"
  },
  "rules": [
    "sms"
  ]
}
{
  "body": "This will still work even though no phoneNumber is being passed!",
  "to": {
    "profileId": "[email protected]"
  },
  "rules": [
    "sms"
  ]
}

📘

Profiles are useful for the Messenger channel

You need to use profiles when using the Facebook Send to Messenger plugin, as we use the profileId to save the unique Messenger ID Facebook sends to us when a customer clicks on the Send to Messenger button. To send to this customer using Messenger, ensure you pass the profileId in the to section.

Learn more in the Facebook channel guide.