SAP Emarsys Automation messaging
EARLY ACCESS
WhatsApp RCS
The SAP Emarsys Automation messaging integration lets you connect SAP Emarsys with Infobip using either WhatsApp and RCS as communication channels.
For this integration, there is no installation required and no marketplace.
What you will need
To use this integration, you need:
- SAP Emarsys instance and account
- Infobip account and API keys with senders for WhatsApp or RCS
See Create an Account for more information on Infobip accounts.
API key scopes
When creating your API key, ensure you have the following API key scopes enabled:
Platform API key scopes
message:send
Channel API scopes
Add the scopes for the channels you need.
whatsapp:manage
whatsapp:message:send
rcs:manage
rcs:message:send
SAP Emarsys integration using Automation Programs
The available integration points inside SAP Emarsys are limited and so this integration uses Automation Programs by setting up and using a Webhook Node Preset and Block.
Automation Programs can be either:
- Audience-focused (executed on a contact segment)
- Behavior-focused (triggered by events)
The simplest program includes a target segment and a webhook node. Both elements are selectors for a predefined segment and Preset.
The following section describes how to configure the Webhook Node Presets.
Configure Webhook Node Presets
To configure the Presets, go to Automations → Webhook Node Presets.
You need to define the authentication, endpoint, and preset data attributes.
Click Create Preset to define the attributes.
The following sections show the required configuration sections.
Configure preset appearance
It is recommended that you give your preset a name and you can choose an icon to that it is more recognizable.
Add a name in the Preset name. For example, use a unique and recognizable name, such as ib_whatsapp_my_test_template
.
Select an preferred icon from Node icon so it’s easily spotted in the Automation program.
Configure preset authentication
Specify the authentication method and credentials used to authenticate with Infobip.
- Add the relevant URL in API endpoint URL. The endpoint is channel-specific and defined as:
https://ib-emarsys-prod.azurewebsites.net/api/message/<channelType>
.- For WhatsApp, use
https://ib-emarsys-prod.azurewebsites.net/api/message/whatsapp
. - For RCS, useÂ
https://ib-emarsys-prod.azurewebsites.net/api/message/rcs
.
- For WhatsApp, use
- Select your chosen authentication method. For example, use HTTP basic authentication.
- For the username and password, useÂ
ib
as your password and your Infobip API key. The required scopes for API key are channel-specific. See API key scopes.
Configure preset data
It is possible to define two types of data:
- Contact data is dynamic data taken from a contact
- Additional data are key-value pairs that can contain static value in the form of predefined value(s) or, if left empty, the value has to be entered during automation program setup
Some generic key-value pairs have to be defined. Depending on the data source, it has to be defined in its respective section.
When building the Preset, always have in mind whether the required data is static or taken from a contact. It is extremely important to follow the naming schema for fields. All fields not recognized by the application will be dropped, which might lead to your messages being rejected due to missing parameters.
The naming schema consists of a prefix (ib_
) followed by either an attribute name or, for template parameters, the section identifier (header
, body
, btn
) and the word param with a number indicating the index of that param (starts at 1) or required attribute. An example for a text header placeholder would be ib_header_param1
or for a media header, it would be ib_header_mediaUrl
.
Preset data reference
Generic data
Name | Value | Recommendation |
---|---|---|
ib_to | One of: Mobile Phone Phone (office) Any contact field where the contact number is stored | Contact data as it’s always dynamic |
ib_from | Predefined value (or you can leave empty to define during program building) | Additional data as this value is most likely static. |
WhatsApp-specific data
Name | Value | Recommended section |
---|---|---|
Ib_templateName | Predefined Value With Template Name. | Additional Data |
Ib_templateLanguage | Predefined Value With Template Language. If Not Defined, It Will Fallback To English(en). | Additional Data |
The following data depends on the template being used in the Preset.
Name | Value | Recommended section |
---|---|---|
ib_header_param1 | Text placeholder (if exists) in text header templates. If there are no placeholders in the text, you can omit this pair. | Depends on whether it’s static or contact data. |
ib_header_mediaUrl | Image header media URL, also used in video and document headers | Most likely static data, so should go to Additional data |
ib_header_fileName | Document header file name. | Most likely static data, so should go to Additional data |
ib_header_longitudeib_header_latitude | Latitude and longitude for WhatsApp location templates. | Most likely static data, so should go to Additional data |
ib_body_paramN (e.g. ib_body_param1) | Template body placeholders. The ending of key name defines the placeholder it replaces. Add as many as there are placeholders in template body. | Depends on whether it’s static or contact data. |
ib_btn_paramN (e.g. ib_btn_param1) | Template button placeholders. Buttons that should have params defined include: Quick Reply buttons URL buttons with a placeholder if the URL button doesn’t include a placeholder, it has to be omitted | Depends on whether it’s static or contact data. |
RCS specific data
Name | Value | Recommended section |
---|---|---|
ib_type | One of: text, file, card to be implemented, carousel to be implemented, india_template to be implemented | Additional data |
Text messages
Name | Value | Recommended section |
---|---|---|
ib_type | Text you want to send to customers. Example with placeholders : Hello {{1}}, welcome to our promotion for {{2}}. Today we're giving away {{3}}% of discount on selected items. | Additional data |
ib_placeholder_N | Where N is index of placeholder defined in ib_text | Depends whether it is static or contact data. |
File messages
Name | Value | Recommended section |
---|---|---|
ib_fileUrl | URL of the given resource. The following content types are supported: application/pdf , image/jpeg , image/jpg , image/gif , image/png , video/h263 , video/m4v , video/mp4 , video/mpeg , video/mpeg4 , video/webm . | Depends whether it is static or contact data, but most likely will be static data so into Additional data. |
ib_thumbnailUrl | URL of the file thumbnail. | Depends whether it is static or contact data, but most likely will be static data so into Additional data. |
Suggestions
Name | Value | Recommended section |
---|---|---|
ib_suggestion_N_type | Where N is the index number of suggestion, starting at 1. One of: reply , open_url , dial_phone , show_location , request_location , create_calendar_event | Additional data |
Reply
Name | Value | Recommended section |
---|---|---|
ib_suggestion_N_postbackData | Value which is going to be sent as a reply to a suggestion | Additional data |
ib_suggestion_N_text | Suggestion text | Additional data |
Open URL
Name | Value | Recommended section |
---|---|---|
ib_suggestion_N_postbackData | Value which is going to be sent as a reply to a suggestion | Additional data |
ib_suggestion_N_url | URL that will be opened on mobile phone when the suggestion is selected | Additional data |
ib_suggestion_N_text | Suggestion text | Additional data |
Dial phone
Name | Value | Recommended section |
---|---|---|
ib_suggestion_N_postbackData | Value which is going to be sent as a reply to a suggestion | Additional data |
ib_suggestion_N_phoneNumber | Valid phone number | Additional data |
ib_suggestion_N_text | Suggestion text | Additional data |
Show location
Name | Value | Recommended section |
---|---|---|
ib_suggestion_N_postbackData | Value which is going to be sent as a reply to a suggestion | Additional data |
ib_suggestion_N_latitude | Latitude of the location. | Additional data |
ib_suggestion_N_longitude | Longitude of the location. | Additional data |
ib_suggestion_N_text | Suggestion text | Additional data |
ib_suggestion_N_label | Label of the location | Optional. Additional data |
Request location
Name | Value | Recommended section |
---|---|---|
ib_suggestion_N_postbackData | Value which is going to be sent as a reply to a suggestion | Additional data |
ib_suggestion_N_text | Suggestion text | Additional data |
Create calendar event
Name | Value | Recommended section |
---|---|---|
ib_suggestion_N_postbackData | Value which is going to be sent as a reply to a suggestion | Additional data |
ib_suggestion_N_text | Suggestion text | Additional data |
ib_suggestion_N_startTime | Event start time | Additional data |
ib_suggestion_N_endTime | Event end time | Additional data |
ib_suggestion_N_title | Event title | Additional data |
ib_suggestion_N_description | Event description | Optional. Additional data |
Campaign tracking
Currently, there is no way to track campaigns other than through the Infobip web interface. For RCS, an additional parameter is available for improved filtering options. To use it, include ib_campaignReferenceId
in the data section inside the Webhook Node Preset.