Member Unsubscription Flow
Introduction
Users who have interacted with your chatbot are considered as memebers/subscribers. Their information and conversation history will be stored in the "Members" page in Stella. However, not all the users are happy with receiving updates and notifications from your chatbot.
In this section, you will learn how to apply a Member Unscription Flow to your chatbot and allow users to unsubscribe by themselves. As a result, the unsubscribed members will be automatically excluded from the audience while sending push messages in Push Panel.
Unsubscribed members can no longer receive push and agenda messages. Although they can still interact with the chatbot, some of the Stella Inbox functions might be affected.
What is your Result?
Sample Tree Structure
Getting Hands On
Create a Tree & Node
Head to "Bot Builder" in Stella
Create a tree and name it as "Unsubscribe Flow".
- Create a tree node and name it as "Unsubscribe Message".
- Create a Response. Add a text response to indicate users about the unsubscription, for example, "Your subscription has been cancelled."
- Scroll down and toggle on Member Tagging, type "Unsubscribe" and click enter to create the tag. After that, remember to save the node.
Create a Pre-action
Head to Pre-actions. Create a new pre-action.
Enter the following code. It will unsubscribe the corresponding user from your member list.
return new Promise((resolve) => {
this.member.botMeta.subscribe = false
resolve({
member: this.member,
})
})
Create a Global Node & Trigger
- Create a Global Node, name it as "Unsubscribe Global".
Create a trigger.
Add a keyword trigger, and type "unsubscribe" as the keyword.
- Toggle on Redirect, and select the "Unsubscribe Message" tree node.
Add Unsubscribe Tree to Channel
Head to "Channels", select the channel containing your main chatbot flow.
Select "Platform", and "Tree Settings".
Add the "Unsubscribe Flow" to this channel, and tick the global node "Unsubscribe Global". It means this global node will apply to all trees in this channel. Remember to save the settings afterwards.
- Check and see if you can produce the expected outcome.