How to Use the Filter Element in the Chatbot Flow Builder
Use a filter and separate your audience by their interests, customer status, or other personal data. This will allow you to send more targeted messages or interact with a contact based on their data: send webhooks to your system, open a chat with a manager, assign or update variables and tags, or launch other flows.
With the SendPulse chatbot flow builder for Telegram and Facebook, you can add a Filter element to separate customers based on their data i.e. variable values, tags, and participation in previous campaigns and flows.
Add a Filter Element
Drag and drop the Filter element into your working area, connect it to the element, from which you want to start branching off your scenario.
Select a Condition to Check
Comparing with the Defined Value
Depending on the variable type, you can choose:
- “String,” “email,” and “phone” contains / does not contain / equals / doesn’t equal / starts with / ends with / empty / not empty;
- “data” equals / doesn’t equal / between / is after / to;
- “number” equals / doesn’t equal / more than / less /empty / not empty.
- "time" equals / doesn't equal / between / is after / to.
In the third field, enter or select a value or part of a value of the variable you want to check.
For example, if a user signed up for a meeting, reception, or event for a specific date, for which you need to send certain information or data to your system. Select a variable and a range of dates to track.
Comparing with a Value from Another Variable
You can also compare values with other variables (of all types) and filter them based on dynamic data. Select the “Insert variables” checkbox, and choose a variable from your bot audience.
For example, if you received a delivery address from a user and need to categorize it by city area, you can compare an address variable with a city area variable and branch your flow scenario. You can also compare the amount of ordered products with what’s left in stock.
Variable value to be compared must not to be empty and be fulfilled in the bot audience.
Using the filter, you can check if the selected tag is assigned or not.
For example, you can filter subscribers that were assigned a tag when they clicked on the button with the site you want. You can track whether they followed the link or not, and ask how they liked their experience, whether they bought a product or gave additional data.
Also, using tags, it is convenient to divide your audience based on their preferences, interests, and statuses in your system, automating the process of targeted communication with them.
Participation in the Flow
Using the filter, you can check whether the subscriber participated or did not participate in the selected flow.
For example, a user enters keywords that are not included to a flow with the desired information. You can help and guide them through the appropriate scenario.
Using the filter, you can check whether a subscriber received or did not receive a specific campaign.
For example, imagine you already sent a campaign to a group of your subscribers, but a new client has not received it. You can check for clients like this and send the same information to them by adding it in the next "Message" element of your flow.
With this filter, you can branch the flow scenario based on the time of day a user reaches this element.
For example, you can set business hours when a manager can answer a personal question or set up a promotion for free delivery or free extra food during specific hours.
If you set up a time-based promotion interval at night, you need to use a combined filter with periods before and after "00:00," as in the example above.
Your account's time zone is used for time-based triggers.
Compare with a Static Value
With this filter, you can branch flow scripts depending on the date the user reached the “Filter” element.
For example, you can specify conference dates to give out information about specific speakers and the conference location during a conference or live event.
Compare with a Dynamic Value
You can also compare values with other system variables by date and filter data by dynamic values. Select “Insert variable,” and choose a variable — “Sign up date” or “Run date.”
You can select “Add value offset” and choose a tracking period “+” or “-” from a chosen date.
For example, you can divide scenario branches by comparing a run date with purchase date + 30 days after it. Then, send the product to those who are in the “Yes” branch, and send a payment reminder to users from the “No” branch.
Day of the week
With this filter, you can branch flow scripts depending on the day of the week the user reached the “Filter” element.
For example, you can set days of the week when you have a promotion and discounts on certain categories of products.
Sign up Date
With this filter, you can check when a user subscribed to your chatbot.
For example, you can use this filter to keep track of which campaigns the user has already received and flow the script based on what you’ve already sent.
Using this filter, you can check the status of your chat with a subscriber (whether it’s closed or open).
For example, if your subscriber has already started a conversation with a manager, you don't need to create an additional chat.
You can use this filter to check the number of incoming messages from a subscriber.
You can use this filter to check the number of unread messages from a subscriber.
Using this filter, you can check the date of your subscriber's last activity (when they interacted with your chatbot).
Number of Followers on Instagram
You can use this filter to check how many of your chatbot subscribers follow you on Instagram.
Subscribing to the Instagram profile
In Instagram chatbots, you can check your Instagram profile subscription status:
|The user follows your Instagram business account
|Your Instagram business account follows the user
Please note: a user can be a subscriber to your Instagram chatbot, but not a subscriber of your Instagram business account profile and do not receive feed from your profile in this Instagram.
Telegram Channel or Group Members
In Telegram chatbots, you can check if a subscriber is a member of a group or channel where your chatbot is an admin.
Using this filter, you can check the payment status of the specified product order. Select the "Paid" or "Not paid" condition, and in the next field the product itself.
Please note that all chatbot flows are taken into account when monitoring the payment status. To select a product, you need to receive a payment. You can send yourself a flow and make a test payment.
For example, if a user has paid for a product, you can send them a follow-up message containing more info about the product and its use. If the user has not paid for the product, you can send them a reminder or ask about their preferences again.
This filter allows you to check users’ browser languages. Users’ live chat language is determined by their browser language. Your Telegram chatbot subscribers’ language is the one they set in the app.
This filter is applicable only to live chats and Telegram chatbots.
Current Page URL
With this filter, you can check which page your users visit when they go through your chatbot scenario. For example, if your user visits a certain product page, you can offer related products, discounts, or delivery services.
This filter is applicable only to live chats.
With this filter, you can determine your users’ location and send them information specific to their area. Live chats determine a user’s country using their IP address geolocation, and WhatsApp chatbots do it using their phone number.
This filter is applicable only to live chats and WhatsApp chatbots.
With this filter, you can check who is assigned to a chat with a contact.
With this filter, you can check how a user subscribed to your chatbot:
|Subscription by clicking a direct link to a bot or a bot flow.
|Subscription via a subscription widget created in the "Chatbots," "Websites," "Pop-ups," or "Email" sections.
|Other subscription methods.
Select Additional Conditions
You can also combine conditions, add links between them, and connect the operator "any" or "all". Click Add list segmentation criteria and select a condition and operator.
If the previous condition has NOT been met, the filter will check the following condition you create. Click Add new condition and select a condition.
If the client's data does not match any of the specified conditions, the client will follow the “NO” scenario branch.
Add the Following Elements
Add additional flow elements to each of the options of your filter; if the condition is met (green dot) or not (red dot).
Continue creating your flow, then click Save or Save and Send to yourself to test the scenario. Do not forget to give the user the opportunity to return to the previous element or the main menu, so the user won’t get lost. Or add a messenger menu.
Filtering customers and their data helps you take care of them, protects them from receiving irrelevant content and, as a result, brings more positive feedback.
Last Updated: 28.11.2023