Outbound Campaigns / Notification API FAQs
How can we ensure that campaign messages are not sent to users who respond with DND?
To prevent sending campaigns to users who respond with DND, follow these steps:
- Create and train an intent on relevant utterances like DND and unsubscribe.
- Set up a flow triggered by the respective intent.
- Within the flow, update the opt-in property when the intent is triggered.
- Use this updated property as a condition in segment targeting to exclude users who have opted for DND from receiving further campaign messages.
For a detailed help guide, refer to Engage user guide.
How can I trigger outbound campaigns through API?
You can initiate outbound campaigns using notification APIs. These APIs provide the necessary functionality to trigger campaigns programmatically, allowing for seamless integration with your existing systems or applications.
For more details, see Notification APIs.
Do we receive any event on the AI-agent if users click on the CTA used in Outbound campaigns?
No, for CTA button clicks, you will not receive any events on the AI-agent.
How to capture data sent through templates?
To capture the data sent in the template, You can capture template ID, variable data, and sender ID on Quick Reply buttons, you can use the Quick Reply event. This event will provide you with access to the event data ({{data.event.data}}), event name ({{data.event.templateName}}), and sender ID ({{sender}}).
How do I capture additional details from the messages sent?
To capture additional details from the messages sent, you can pass inside the customPayload in the config object. This allows you to include specific data within the message payload, which can then be accessed and processed by your AI-agent. You can pass up to three variables.
For example, you can include relevant variables such as waybill numbers, IDs, or codes within the customPayload field of the config object.
Here's an example of how to structure the customPayload field within the Config object:
{
"userDetails": {
"number": ""
},
"notification": {
"type": "whatsapp",
"sender": "917888000000",
"templateId": "order_out_for_delivery_prepaid_copy",
"params": {
"orderId":"1234",
"quickReplies": {
"ctaUrlParam": "order?order_id=2392409"
}
}
},
"config": {
"customPayload": {
"waybill": "15893217051240",
"cp_id": "4",
"account_code": "Delhivery Express"
}
}
}
Then, to retrieve data within your AI-agent, you can use the following syntax:
{{{data.event.extraParams.customPayload.{variableName}}}}
For example:
{{{data.event.extraParams.customPayload.waybill}}}