Adobe Journey Optimizer messaging
This user guide explains how to use actions inside Adobe Journey Optimizer for sending Infobip SMS or other channel messages inside a Journey.
What You Will Need
- An Infobip account. If you do not have Infobip account, you can create one.
Follow the steps below to setup actions and use them in Journeys.
Create New Action
To create an action:
- Go to Administrations > Configurations in left sidebar.
- On the Actions tile, click Manage to create new action. You will see a list of all existing actions.
- Click Create Action in the top right corner. You will see a complete setup form on right side of the page.
Setup Custom Action
Once you open a form for setup, you need to define the following:
- Enter a name for the action, stating clearly for which purpose this action is being used. This example includes a channel and use case with the name: InfobipSMS_Birthday.
- In the Description, provide more details about the reson for using this action.
- Go to the Infobip Home Page and copy the URL provided. The method should be POST.
- In the Authentication section, define the API key as authentication type, and copy the Infobip API key inside the apiKey field. You can find the API key under Manage API Keys on the Infobip homepage.
Define payload
Once you define basic information like API url, authentication, and so on, you can proceed to define the payload for this action
In the Action parameters section, click Edit payload.
You can use the following example payload for SMS:
{
"messages": [
{
"from": "InfoSMS",
"destinations": [
{
"to": "41793026727"
}
],
"callbackData": "DLR callback data",
"notifyUrl": "https://www.example.com/sms/advanced",
"validityPeriod": 720,
"text": "Artık Ulusal Dil Tanımlayıcısı ile Türkçe karakterli smslerinizi rahatlıkla iletebilirsiniz."
}
]
}
All fields should be constants and predefined inside the payload except the to field.
Once you save your action, it will be available to be used in Journeys.
Once it's being used in at least one Journey, you won't be able to edit the content of payload.
Action inside Journey
Once you define events used as an entry point in a Journey, from Actions, you can select any of the actions you created for sending Infobip messages.
Pull the action on to the canvas, click on it, and then define the TO source that was defined as a variable inside the payload. TO should be mapped to any field containing the customer's mobile phone.
Setting up different channels as actions in Adobe Journey Optimizer
Depending on the channel that you want to use for sending messages, change the URL under URL configuration and payload. The only variable existing in the payload should be to (the same as for SMS).
MMS
URL: https://api.infobip.com/mms/1/advanced
Payload:
{
"messages": [
{
"destinations": [
{
"to": "41793026727"
}
],
"from": "InfoMMS",
"messageSegments": [
{
"text": "This is a sample message"
},
{
"contentType": "image/jpeg",
"contentId": "320px-Depth_of_field_Cat.jpg",
"contentUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/6/60/Depth_of_field_Cat.jpg/320px-Depth_of_field_Cat.jpg"
}
],
"title": "This is sample subject"
}
]
}
Depending on the template you want to send (text or media) find the appropriate payload on WhatsApp API Docs.
URL: https://api.infobip.com/whatsapp/1/message/template
Payload:
{
"messages": [
{
"from": "441134960000",
"to": "441134960001",
"messageId": "a28dd97c-1ffb-4fcf-99f1-0b557ed381da",
"content": {
"templateName": "template_name",
"templateData": {
"body": {
"placeholders": [
"Placeholder Value 1"
]
}
},
"language": "en_GB"
},
"callbackData": "Callback data",
"notifyUrl": "https://www.example.com/whatsapp",
"smsFailover": {
"from": "InfoSMS",
"text": "SMS message to be sent if WhatsApp template message could not be delivered."
}
}
]
}
Viber
This example shows only if you want to send a Viber text message with a button. For other URLs and payload check Viber API Docs.
URL: https://api.infobip.com/viber/1/message/text
Payload:
{
"messages": [
{
"from": "ACCOUNT-123",
"to": "441134960001",
"content": {
"text": "Some text",
"button": {
"title": "Click on me!",
"action": "https://www.infobip.com/"
}
},
"callbackData": "Callback data",
"trackingData": "Tracking data",
"label": "PROMOTIONAL",
"smsFailover": {
"from": "SMS Sender Number",
"text": "Failover message text",
"validityPeriod": 2,
"validityPeriodTimeUnit": "HOURS"
}
}
]
}