The Filter element in chatbots

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

Variable value

Comparing with the defined value

Select the variable you want to check and a condition operator. You can select a custom variable or a global variable.

Depending on the variable type, you can choose:

String, EmailPhone contains / does not contain / equals / doesn’t equal / starts with / ends with / empty / not empty
Data, Time equals / doesn’t equal / between / is after / to
Number equals / doesn’t equal / more than / less /empty / not empty

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.

Or vice versa, if you do not have customer contact details or other required information. Then you can check for availability and re-request user data.

Comparing with a value from another variable

Available with the Pro plan and above, as well as during the 7-day free trial

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.

Assigned tag

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.

Sent campaign

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.

Run time

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.

Run date

Available with the Pro plan and above, as well as during the 7-day free trial

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

Available with the Pro plan and above, as well as during the 7-day free trial

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.

Opened chat

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.

Incoming messages

Available with the Pro plan and above, as well as during the 7-day free trial

You can use this filter to check the number of incoming messages from a subscriber.

Unread messages

Available with the Pro plan and above, as well as during the 7-day free trial

You can use this filter to check the number of unread messages from a subscriber.

Last activity

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

Available with the Pro plan and above, as well as during the 7-day free trial

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: 

Follows you The user follows your Instagram business account
Following 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.

Business profile contact

In Telegram chatbots, you can check whether a subscriber has messaged the chatbot owner’s private account.

This condition is available to Telegram Business users. Read also: How to use Telegram Business in chatbots.

Payment complete

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.

Browser language

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.

Country

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.

Assignee

With this filter, you can check who is assigned to a chat with a contact.

Source

With this filter, you can check how a user subscribed to your chatbot:

Chat link Subscription by clicking a direct link to a bot or a bot flow.
Subscription widget Subscription via a subscription widget created in the Chatbots, Websites, Pop-ups, or Email sections.
Not specified 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.

Alternative condition

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.

    Rate this article about "The Filter element in chatbots"

    User Rating: 4 / 5 (10)

    Previous

    The Action element in chatbots

    Next

    The Pause element in chatbots

    Popular in Our Blog

    Try creating a chatbot for Facebook Messenger for free