Package Tracking Notification
When customers order an item from your store, they will be eager to know where it is at any given moment after it’s been shipped. As soon as they have made the order, notify them through WhatsApp that they can track their package with a click of a button placed within the message.
Process Workflow
IMPLEMENTATION STEPS
Before you implement this use case and start using WhatsApp message templates, the template needs to be approved by WhatsApp. Once your track_package message template is approved, you can reuse it and personalize it for each customer who is awaiting their delivery.
Use the additional placeholders to personalize your message.
To register your template, you must provide a template name, content, and language info. After that, Infobip sends the template over to WhatsApp for approval.
Template name | Language Template body | Language | Call to Action Template Buttons | Approved |
---|---|---|---|---|
track_package | Hi {{1}}, Thank you for shopping at Go2Shop! We are preparing your order. | en | 1st Button:Type of action: Visit WebsiteButton Text: Track packageURL type: DynamicWebsite URL: https://www.go2shop.com/ (opens in a new tab)2nd button:Type of action: Call Phone NumberButton Text: Contact UsCountry: GB +44Phone Number: 1234567899 | ✅ |
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/
The 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 the 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.
Request example:
{
"scenarioKey":"CC9F01A5DC7BEE2C2B829D203482A654",
"destinations":[
{
"to":{
"phoneNumber": "41793026727"
}
} ],
"whatsApp": {
"templateName":"track_package",
"mediaTemplateData": {
"body": {
"placeholders": ["Donna"]
},
"buttons": [{"urlPlaceholder": "delivery/Paris/672489" }]
},
"language":"en"
},
"sms": {
"text": " Thank you for shopping at Go2Shop! If you would like to track your package, visit our website http://www.go2shop.com.
}
}
Here's how the message looks like in WhatsApp: