How does it work?

Through Treble, which uses WhatsApp Business API, when a user reads or receives a message, we can configure a webhook to be triggered when this happens.

Example use case

Let’s say you’re a clothing sales company and you want to know when a customer has read or received your first marketing message about a promotion for your new clothing collection. You’ll offer a 10% discount on their first purchase to the first 100 customers who subscribe to your newsletter.

For this, you can configure a message read webhook in Treble. When a customer reads or receives your message, the webhook will be triggered and will send an HTTP request to your endpoint configured in Treble.

How to configure a message delivery or read webhook?

1

Log in to Treble.ai

Log in to Treble.ai through the following URL:

https://app.treble.ai

2

Create a flow

Go to the “Conversations” section and click on the “Create Conversation” button. You can also configure a message read webhook in an existing flow. For this, go to the “Flows” section and click on the “Edit” button of your flow.

3

Add message blocks

Let’s add the first message block. Click on the “Add block” button. In this case, we will add a message template (HSM) previously created and approved by Meta. Then we will connect a simple message block with the HSM block.

4

Activate webhook and add endpoint

Now, let’s double-click on the message block, a panel will open on the left. In this panel, let’s click on the “Webhook” button. Two fields will appear:

  • “Read”: Here you can add the endpoint to which you want the HTTP request to be sent when this message is read.
  • “Delivered”: Here you can add the endpoint to which you want the HTTP request to be sent when this message is received.
5

Save changes

If you are in a new flow, click on the “Publish Conversation” button to save the flow. If you are in an existing flow, click on the “Save” button to save the changes.

Done! Now, when a customer reads or receives your message, the webhook will be triggered and will send an HTTP request to your endpoint configured in Treble.

Next step

To know the body of the HTTP request that is sent when a customer reads or receives a message, you can visit the following section:

Tips

  • Keep in mind that the message delivery and read webhooks are triggered when a customer reads or receives a message and only apply to the message you configured. If you want it to be triggered on other messages, you must configure a webhook for each message.
  • The message read webhook may not be triggered if the WhatsApp user has read privacy mode configured.