FAQ

CHATBOT

What should I do if the bot works in the test window but does not work in the messenger?

Your plan is either not paid for or the wrong plan has been paid.

How to obtain a valid (or correct) phone number from a client?

You need to add phone number validation using regex.

Regular expressions let the bot check if the entered data is in the right format (for example, to make sure it’s a phone number and not something else).

How to do the check?

When talking with clients, you often need to follow up by phone. So, how can a chatbot automatically collect client information? The answer is simple — by using regular expressions.

To use the function for collecting a phone number (or email), use the following regular expressions:

  1. Phone number (Russia): ^((\+7|7|8)+([0-9]){10})$ поменять страну и номер

  2. Phone number (with country code): ^(\+)?((\d{2,3}) ?\d|\d)(([ -]?\d)|( ?(\d{2,3}) ?)){5,12}\d$

  3. Email: ^[-\w.]+@([A-z0-9][-A-z0-9]+\.)+[A-z]{2,4}$

In the flow, we used a regular expression for phone numbers from any country.

Like the bot saved the client’s name and age, it will also save the user’s phone number or email (if you use the right regular expression).

Create a block where the bot sends a message asking the client to send their phone number (or email):

Block with a message to collect the client’s phone number

Next, connect an arrow from this block and set the appropriate regular expression as the condition for the arrow.

With the regular expression condition, the chatbot will only accept phone numbers as digits, and emails in the correct standard format.

If the client sends a message that isn’t a valid phone number (or email), you can create a block that tells the client their input is incorrect:

From the block where you asked the client to send their phone number, create a second arrow and in the new block write a message like: "This is not a phone number. Please enter your phone number!"

Choose the block type "Non-state" (see screenshot above). This type of block doesn’t have conditions like the "Dialog state" block, and you cannot navigate to it directly.

The "Non-state" block is perfect in our flow because the user won’t be able to move on from the previous block without entering their phone number, ensuring they provide it to continue down the funnel.

You can read about the "Non-state" block and its features in the article called "Non-state block." ссылка

You can find more details about regular expressions in the article titled "List of useful regular expressions." ссылка

How to find out the number of bot subscribers?

The "Analytics" section shows both the total number of clients and the numbers broken down by messenger platforms. ссылка

How to make the bot initiate the conversation itself

Each messenger has its own setting that allows the bot to send the first message.

The article "First message in messengers" is here. ссылка

How to send a "Follow-up" message?

Sometimes a client may stop progressing through the funnel for personal reasons. To remind the client about you, you can send a follow-up message using the "Non-state" block.

This block will send a message to the user without moving them anywhere within the main funnel.

You can read more about how such blocks work in the article "Non-state" blocks. ссылка

We also use a timer (delay) in the arrows and TURN ON the "Cancel if left the block" toggle.

The "Cancel if left the block" toggle means that the arrow will only trigger for users who, after the specified time, are still in the green block and have not moved to the white block.

How to make a sequence of 2-3 messages open immediately?

You need to connect the blocks with arrows and set the delay to 0 seconds in the arrow connection settings.

How can smart replies be disabled when an operator or manager joins the chat, so that the bot stops responding?

You need to set a delay after the operator’s response.

To do this, you need to use the proxy-link function.

Let's create a variable called link and assign it the value of proxy() with your link:

Next, create a button with its URL set to the link variable:

Add the button to the block and test it. In the client conversation, you will see a notification like this in the corresponding section:

Video tutorial

You can create a website (landing page) that will contain links to the bots.

Using a website or landing page isn’t mandatory; you can simply use proxy links.

Is the "Time delay" function used to send a message at a set time and date?

That’s correct. The message will be sent at the date and time set in the arrow (connection) settings.

If a delay before sending is set, this delay will be added to the specified time. For example, the message will be sent on 07/21/2025 at 11:00 because the delay set in the "Delay before response" field is added to the time set in the "Send time" field.

Is it possible to create two different bots within one account?

You can create any number of projects within one account.

Is it possible to configure a timer-based arrow with a condition for transition so that it doesn’t get scheduled after every client message?

If for some reason you disabled "Cancel timed messages" but still use a timer-based transition with a condition, we recommend adding #{question} to the "Strings not to respond to" field.

Why is the text "&para" written in the block replaced with "¶"?

Unfortunately, in this case, the browser itself kicks in, detecting what it thinks is an error and automatically replacing &para with ¶, which then displays as the "¶" symbol. To avoid this issue, we recommend using &Para instead.

Is it possible to configure notifications to our administrator when a client sends a message in the online chat?

Yes, it is possible. You can find more details about this in the article:

Message to support:

"Good afternoon! We have the following situation: We have two identical links that lead to the same website, but we made the division to understand where the leads come from.

Is it possible to do this using just one bot?

In other words, one link will be in the Telegram profile header, and the other will be used in our ads, and we want to separate these two channels while using a single bot."

Yes, you can create two websites (landing pages) in the builder and assign each its own tag:

  1. Create two sites with different tags:

  1. Then, in the starting blocks, specify the tags in the block’s condition:

a) In other words, when a user enters the messenger via the "Course website" landing page, this setup will apply:

b) When a user enters the messenger from the "Training" landing page, the second funnel will be triggered:

Is it possible to send a message the day after the bot’s first message?

Message to support:

"I have the following situation: A person clicks on an ad and enters the bot, receiving a welcome message. I need to send them a link exactly at 12 PM the next day. How can I configure it?"

Yes, you can. In the arrow’s "send date" field, you need to specify the variable next_day along with the desired sending time.

How can I configure the bot so it doesn’t interfere with communication between clients and operators?

In the project settings, there is a field called "Time in minutes during which the bot pauses after the operator’s response."

The countdown starts from the moment the operator sends a message. If you accidentally set a too high value and the bot stops responding to the client for too long, set the field to 0 and notify the client.

How to configure unsubscribe via the chat bot?

FILE ATTACHMENTS

Can I attach images?

Yes, the bot can send images in messages. To do this, in the builder, select the desired block, add an attachment, and choose the appropriate type (for example, image):

ПMore details about sending attachments can be found here. ссылка

How can I send multiple images (files)?

The blocks now support adding multiple attachments of the same type:

You can also create several consecutive blocks, each sending an attachment without text by specifying the variable #{none} in the response field.

This means either you selected the file sending type as a link, or there was an error when sending the file. It’s recommended to check whether the file exists at the link.

Here are some specifics about file sending:

  1. When uploading, files must have different names because they are saved on the server. Each project has its own folder, and duplicate file names are not allowed.

  2. If you send a file as a link, make sure the link is working.

  3. Video files sent as "videos for viewing" are not supported.

  4. Deleting a block also deletes its attached file.

When adding links in the message text, you can enable link preview display by:

The transformation of a link into a nice preview when sending it in social networks or messengers like Telegram, WhatsApp, Facebook are handled by Open Graph markup.

Open Graph markup consists of additional meta tags that include the title (og:title), description (og:description), and image (og:image).

When you change the image or description for a link preview, you need to clear the cache using special tools.

What is the maximum file size?

The maximum file size for uploading in the builder is 20 MB; there are no size limits when sending via a link.

How can I send a random text or image?

We often get questions about how to send a value, image, etc., randomly selected from a data set. Here’s a detailed explanation:

Function format:

random(low, high) - To get a random number, the function takes two parameters as input: the lower bound and the upper bound. Example: random(-10,10) The result is an integer between -10 and 10.

Getting a random value from a data set

By a data set, we mean any source of stored information—an array, dictionary, or table.

Let’s look at an example using an array:

  1. Array declaration: text = { "1": "Sunny Italy awaits you", "2": "I think fashionable France will lift your spirits", "3": "It’s time to visit the shores of native Crimea", "4": "Explore the corners of your homeland" }

    picture = { "1": "https://i.ibb.co/k4prZK0/itperv.jpg", "2": "https://i.ibb.co/mTthk8t/image.jpg", "3": "https://i.ibb.co/dJ1d6XK/5d42d4f8a593ad12cf3fb394-1.jpg", "4": "https://i.ibb.co/Y3YYGQD/DSCF6408-2.jpg" }

  2. Select a random value: vibor=random(1,4)

  3. Get the values from the arrays using the selected number: txt = get(text, '#{vibor}') pct = get(picture,'#{vibor}')

  4. Output the results to the client. Example:

When working with tables, the approach is the same as with arrays and dictionaries: you need to fill in the data first, then read a randomly selected row from the table.

FUNNEL

How can I split a funnel by messengers?

To identify which messenger the client came from, there are built-in variables #{client_type} and #{messenger}. Both contain messenger information, but #{client_type} returns a number, while #{messenger} returns the name.

For example, if a person came from the Online Chat, #{client_type} returns 5, and #{messenger} returns "Online-чат."

Here are the values for client_type:

Значение
Мессенджер

1

Telegram

2

Viber

3

Facebook messenger

5

online chat

10

Instagram

14

e-mail

16

Telegram Business Account

You can find more details about variables here. ссылка

Let’s look at some examples:

To determine which messenger the client is writing from, create 3 branches. In the "Variable for comparison" field of each arrow, specify the corresponding conditions:

Based on the messenger the client uses, he will follow the appropriate path in the funnel and reach the corresponding block.

  1. If the client messages via Telegram, he will be directed to the block named "You are from Telegram":

  1. If the client messages from another messenger or the online chat, he will be directed to the block named "You didn’t come from Telegram":

How can I split a funnel based on different logins?

For users connected to multiple accounts within the same messenger, it can be challenging to separate funnel functionality by account. To solve this, there is a built-in variable called #{group}. It returns the identifier of the bot account the client is interacting with.

Example:

In the "Channels" section, two Telegram bots are connected. Please copy the group_id:

You can use the comparison of the group variable’s value both in conditional blocks and in arrows. To do this, use the "Variable for comparison" field.

Split the funnels in the starting blocks:

In these blocks, the conditions to start the funnel are the same, but the "Variable for comparison" field checks the value of the group variable.

This block with the condition "start" will only trigger in the corresponding bot:

To split the funnel by bot logins, you can also compare the value of the group variable in connections (arrows). This way, depending on which bot the client uses, users will receive different messages at specific stages of the funnel.

Here’s one way to configure the arrows

You can find more details about variables here. ссылка

How can I notify an administrator if a user sends a message outside the funnel?

There are several ways to handle this.

Option 1: Create a "Non-state with condition" block that reacts to messages outside the bot’s defined conditions, and configure the calculator: message(187235469, 'Asked a question https://mavibot.ai/projects/#{project_id}/clients/#{client_id}') where the first parameter (187235469) is the manager’s client_id.

You can learn more about how the message() function works in this article. ссылка

Option 2:

In the project settings, put this in the "Message if bot doesn’t know the answer" field:

#{substring(message(187235469,'Задал вопрос https://salebot.pro/projects/#{project_id}/clients/#{client_id}'),4)}.

Then your project administrator will get a notification for any message the bot doesn’t know how to answer.

OTHERS

Where can I find the project number?

You can find the project number in your browser’s address bar:

Also, you can find it in the project list:

Telegram

Start the bot @webpagebot and send the desired link. Then clear the cache by selecting one of the [update …] commands.

Facebook

Go to the sharing debugger page, enter the link in the field, and click Debug. Then select "Scrape again" to refresh the image and description of the link.

For WhatsApp, links usually update automatically.

How to check if a chat participant is in a specific list?

Here’s how to apply it in practice: Imagine you’ve given out a link to a private chat. Yes, the link is one-time use, but a savvy client might join the chat from someone else’s account. The bot hasn’t seen this user before, so it can’t kick them out after missed payment—and they keep consuming your content for free.

To prevent this:

  • Add paying users to a list

  • Create a separate list for curators/admins/VIP members

  • When someone new joins the chat, the bot checks if they’re on any of the lists. If not, they get removed without mercy.

So, the functions you’ll need for this setup are: - add_to_list(номер списка)- to add a user to a list - tg_create_chat_invite_link(platform_id, member_limit=None, hours=None, request=None) - to create a chat invite link (handles callback) - some_client_in_list(list_id, recepient) - to check if a participant is in a specific list - tg_ban_chat_member(platform_id, user_id, hours=99999, revoke_messages=True) - to ban a chat user

You can use the link to your bot in the messenger to invite clients.

Messenger links can be found in the "Channels" section:

Next, select the messenger for which you want to get the link. Each connected messenger has its own unique link.

You can also create a website where all the messenger links will be displayed:

It isn’t mandatory to use a website or landing page; you can simply use proxy links.

Last updated