Send Delivery or Confirmation Notifications to Customers
Combining communication channels and API, allows you to send different notification messages to your end users. For example, to send delivery information, booking or purchase confirmation, and other.
This tutorial explains how to use WhatsApp to send notifications to your clients and inform them when and where they can pick up their new credit cards.
Process Workflow
Implementation Steps
The card_delivery
notification needs to be approved by WhatsApp as shown in the table below. This specific template can be reused for different customers adapting placeholders with other values.
Template name | Content | Language | Approved |
---|---|---|---|
card_delivery | Hi {{1}}, your new credit card is waiting for you at our branch office at {{2}} You can pick-up your card from {{3}} to {{4}} on working days and from {{5}} to {{6}} on Saturdays. | en | ✅ |
Steps over API
-
Log in to Infobip API Resource hub (opens in a new tab) and copy your BASE URL. Your personal base URL is: https://{{BASE_URL}}.api.infobip.com/
BASE URLThe personal BASE URL is a simple way to identify who sent out the API request. This means we can identify the request through DNS and then find the optimal route for API requests.
-
To send an approved message template, use Postman or similar API development tools, then choose the POST method.
-
Replace endpoint with https://{{BASE_URL}}.api.infobip.com/omni/1/advanced.
-
Add the Authorization header. For example, Basic: Base64 encoded username and password. Learn more about Authentication (opens in a new tab) on our Infobip API Resource hub.
-
Copy the scenarioKey you previously created. Learn more about Creating a scenario.
- Specify the destination
phoneNumber
you wish to send the notification to - Replace
templateName
,templateData,
andlanguage
fields with registered ones (refer to table above). FieldtemplateData
contains real data for placeholders in the registered template.
{
"scenarioKey":"CC9F01A5DC7BEE2C2B829D203482A654",
"destinations":[
{
"to":{
"phoneNumber":"41793026727"
}
}
],
"whatsApp":{
"templateName":"card_delivery",
"templateData":[ "Marco", "Sesame street 7", "9AM", "6PM", "9AM", "1PM"
],
"language":"en"
}
}
Template data should contain the same number of elements as placeholders in the registered template. In case the template doesn’t contain any placeholders, templateData
field should be an empty array “[ ]”.
You can add an optional question to your notification asking clients if they would like to know the exact location of the bank. In case they reply with a Yes to your message, you can share the location of the branch office where they should pick up their new card. Check our use case for sending rich media messages.