Unsubscribing from the Bot

How to fully stop receiving messages

For example, in WhatsApp there is no option to block messages, so to prevent the user from pressing the “SPAM” button, you need to stop sending messages upon their request. A notification about the unsubscription will appear in the chat with the client, and in the “About the Client” tab, there will be a mark indicating that the client has opted out of bot messages (unsubscribed): a message with a cross icon.

If the client has an unsubscribed mark, messages will not be delivered to the user.

Attention! Not all messengers send notifications when a client unsubscribes from messages.

How to Unsubscribe Manually

In the bot, you can set up the option for a client to unsubscribe from messages. Let’s take WhatsApp as an example.

Create a block with a condition based on your funnel logic. The Start block has the highest execution priority.

In the Trigger field, list all possible words users might type to unsubscribe from bot messages, separated by semicolons. In this block, we’ll also ask the client again if they really want to unsubscribe and create two buttons: “Yes” and “No.

When entering the Start block, the client will need to click one of the buttons, and the button names will be specified in the arrow trigger:

In the next block, where the arrow follows the “Yes, unsubscribe me” trigger, enter the message confirming that the client has successfully unsubscribed:

Next, from the block with the successful unsubscription confirmation message, create a block below that will contain the unsubscribe function:

unsubscribe()

How to Partially Unsubscribe from Mailings

For partial unsubscription, you need to assign variables and check their values before sending messages.

Assign variables in the block using the Calculator field. You can also manually create a client variable in the “About the Client” tab during a chat, which can later be used to exclude them from mailings.

For example, if a user has the variable send_in_the_morning set to no, you can exclude users in the mailing filter settings based on the value of this variable:

Setting up a filter when creating a mailing to exclude users based on a variable’s value

Also, in the block or the arrow leading to the mailing block, you can specify in the Variable for Comparison field send_in_the_morning == "no" , so that this person receives the message in the evening. Conditions can be combined in various ways.

Example of using the “Variable for Comparison” field when scheduling messages:

We can see that the client has the variable send_in_the_morning set to "no". And a message is scheduled for them at 8:00 PM.

How to Set Up a Reaction to Unsubscription

It is often necessary to perform certain actions in the bot after a client unsubscribes. For example, sending information to analytics, adding or removing from lists, applying or removing tags, making a server request, and more. For these purposes, you can set up a conditional block that reacts to the client’s unsubscription notification. This callback (notification) appears in the client chat after the client has unsubscribed from messages in a messenger (for example, “Stop and block the bot” in Telegram).)

Client unsubscribe callback

In the block, enter the callback client_unsubscribed in the “Condition” field and set the Match Type - to Exact Match.

Actions and requests configured in the block will be executed, but the message WILL NOT be sent to the client, since they have already unsubscribed.

Last updated