Home · Blog · Trigger chains in the bot: pause, condition, tag - reheating and upsells

Trigger chains in the bot: pause, condition, tag - reheating and upsells

· Command CHBT · Flows, Broadcasts

Trigger mailing is a message that goes to one person in response to his action and with the required delay: took the checklist - a question in a day, left a request - a reminder in a day, bought - an offer in a week. In CHBT, such chains do not live in the “Mailouts” section, which sends one text to the segment at once. They are assembled directly into a script of three blocks: “Pause”, “Condition” and “Action” with a tag. Below is how these blocks work together, three ready-made schemes with timings and restrictions due to which the chain may not reach the recipient.

Triggered and mass mailing: the difference at the block level

CHBT has two mechanisms for sending messages without operator participation, and confusing them is the most common reason for the question “why the chain doesn’t work.”

  • "Mailouts" section - bulk delivery. You select an audience by tags, write one text, and set a time. Everyone gets the same thing at the same time. A man launches it. Available from the Basic plan.
  • flow with "Pause" - trigger chain. It starts from the action of a specific person - a command, a keyword, a deep link, a button press, an entered phone number. Everyone receives messages at their own time, counted from their event, and only if the condition is still met at the time of sending. The client itself starts. The “Pause” and “Condition” blocks are also available on the Free plan in the “Steps” mode; It is more convenient to assemble branched diagrams on the “Canvas” (Basic and higher).

Hence the rule of choice. You need to communicate the news to the entire database or segment - “Mailouts”. The bot itself needs to lead the person from one step to the next - a chain in the script. If the task sounds like “one day after...”, this is always a flow. Returning a base that has already fallen asleep is a separate case where both mechanisms work in conjunction; it is discussed in the article about reactivating a sleeping base.

Three blocks from which any chain is assembled

"Pause" (category “Logic”). Stops the script for the specified time and continues from the next block. Presets - 1 minute, 5 minutes, 30 minutes, 1 hour, 1 day; your value is entered in seconds: two days - 172,800, a week - 604,800. The continuation is queued and triggered, even if the account is closed and none of the operators are online.

“Condition” block (ibid.). Checks the fact and leads along the “yes” or “otherwise” thread. Fields: “Tag” with “set” / “not set” operators, “Variable” with comparisons, “Channel”, “Time” (hour of day), “Day of week”. One block can have several branches with different rules. The operators are described in detail in information on terms and conditions.

"Action" → “Add tag” / “Remove tag”. In chains, the tag plays the role of a flag: “already received a reminder”, “already made a choice”, “manager called”. The condition after the pause looks at the flag and decides whether to send the next message.

How it works together - using the shortest chain as an example:

  1. “Message”: “Checklist here: link. If you have any questions, write."
  2. “Action”: “Add tag” st-magnet.
  3. "Pause": 1 day.
  4. "Condition": tag int-select "not specified."
  5. Thread “yes” → “Message”: “Did you manage to look at the checklist? Whichever is closer to you, write 1 or 2.” Branch “otherwise” → empty.

Two technical details, without which the diagrams below will not work. First: when the pause ends, CHBT reads the tags from the contact card again, and takes the variables as they were when the pause began. This means that everything that a person did during a pause in another thread or another flow must be recorded with a tag - only his condition will be seen. Second: the pause does not cancel itself if a person wrote to the bot or launched another script during this time. The continuation will arrive on time, and only a condition can stop an unnecessary message. Therefore, after each pause there is a condition - no exceptions.

Rule number one: message before pause - no buttons

The most common mistake in chains looks harmless: before “Pause” there is a “Message” with “Yes” and “No” buttons. The author’s logic: “the person will click, then we’ll wait a day and remind you.” In practice, the script stops at this message and waits for a click. Those who do not click do not move forward, the pause does not begin for them, and the reminder does not arrive. And those who didn’t click need a reminder.

This is how the “Message” block works: if it has at least one regular button (callback), the script waits for a click and follows the branch of the pressed button. If there are no buttons or they are link buttons (URLs), the message is sent and the script immediately moves to the next block - that is, to pause.

How to ask a question and still pause:

  • Numbers or words instead of buttons. “Write 1 if..., 2 if...". The response is caught by individual “Keyword” triggers with an exact match (exact), everyone puts their own tag. The condition after the pause checks these tags.
  • Link button. If the action is to go to a website or channel, place a button like URL: it does not block the script.
  • Buttons - but after a pause. In a reminder, buttons are acceptable if this is the last step of the chain and there is no need to wait further.

The test is simple: pause for 60 seconds and go through the script from your phone as a client, without pressing anything. If a reminder has not arrived after a minute, there is a button somewhere before the pause. It is convenient to run the instant part of the script in “Check script” directly in the editor; deferred messages are more reliably viewed in a real messenger.

Scheme 1: reheating after the lead magnet

Problem: a man took the material and disappeared. Two touches in four days return some of these people to choosing a product. An example on a studio bot that gives a checklist in exchange for a name (based on a template “Issuing a lead magnet”).

  1. "Data collection" → Name.
  2. “Message” without buttons: a link to the checklist and the phrase “In a couple of days I’ll ask you what you found useful.”
  3. “Action”: “Add tag” st-magnet.
  4. "Pause" 1 day.
  5. "Condition": tag int-select “not specified” → branch “yes”.
  6. “Message”: “{{name}}, did you manage to look at the checklist? We conduct one-time master classes and a course of 8 lessons. What is closer - write 1 or 2».
  7. "Pause" 2 days.
  8. "Condition": tag int-select “not specified” → branch “yes”.
  9. “Message”: “Last from me: open master class on Saturday, 6 places. Write 1, if you want to borrow one. I won’t write anymore.” The end.

Separately - two “Keywords” triggers on 1 and 2 with exact match: "Action" tagged int-select and int-mk or int-rate → “Data collection” Phone → “Action”: “Transaction in CRM”, “Notify operator” → “Operator”. The one who wrote the number after the first touch will not receive the second one: the tag is set, the condition at step 8 will go to “otherwise”.

Timings: first touch a day later, second touch three days after the first. Previously, it was obsessive; later, the person forgot what it was about. For expensive products with a long selection, the second interval is extended to a week. The full version of this logic with offer and lead is in the template "Auto Funnel".

Scheme 2: reminder about an lead that no one processed

Problem: the client left his phone number, the manager promised to call back and did not call back. The chain works in both directions - it reminds the client that he has not been forgotten, and kicks the team.

  1. “Data collection” → Phone with format check, “Into variable” lead_phone.
  2. “Action”: “Add tag” waiting for a call, “Transaction in CRM” with the name Application – {{name}}, “Notify operator.”
  3. “Message” without buttons: “Thank you! The manager will contact you today before 18:00 or tomorrow morning.”
  4. "Pause" 1 day.
  5. "Condition": tag waiting for a call “set” → branch “yes” (the manager, having called, removes this tag from the contact card in “Contacts” - this is his responsibility, and everyone in “Access” should know about it).
  6. “Message” to the client: “We are not lost - your lead is being processed, the manager will contact you shortly. If it’s more convenient to write here, just reply to this message.”
  7. “Action”: “Notify the operator” with the text “Application {{name}} has not been processed for 24 hours.” The notification will appear in “Dialogs” and will come as a push notification if operators have enabled them in their account.
  8. “Pause” 2 days → “Condition” the same tag → “Action”: “Notify the operator” “Request {{name}} has been hanging for three days.” If we don’t write to the client a second time, that’s the end.

What's important here? Tag waiting for a call - switchable: it is removed by a person, and the entire chain is based on the discipline of removal. If managers do not remove tags, replace step 5 with a tag condition processed “not specified” - but the essence is the same: the bot does not know about the call until it is told by the tag. How an lead gets into CRM and how tags duplicate stages is discussed in the article about leads from a bot in CRM.

The timing of the reminder to the client is exactly 24 hours. Previously, you admit that you don’t have time; later - the client has already called competitors.

Scheme 3: upselling after purchase

Task: the buyer is already with you, and in a week it would be appropriate to offer him something related. The chain should start from an event in the conversation - the bot itself will not know about the purchase if it took place outside the bot. Convenient entry - QR code in the product insert (template “Buyer bot”): the buyer scans, gets into the bot, and from that moment the chain starts.

  1. Trigger “Deep link” with QR campaign payload.
  2. “Action”: “Add tag” qr buyer, “Transaction in CRM” “Buyer via QR”.
  3. “Message” without the usual buttons: “Thank you for your purchase! Instructions and care for the product - follow the link (URL button). If something is wrong, write help, we will answer within an hour."
  4. "Pause" 7 days.
  5. "Condition": tag review “not specified” → “Message”: “A week with the purchase - how do you like the product? If you have a minute, leave a review: link. If you are not satisfied with something, write help, we’ll sort it out before the review.”
  6. "Pause" 14 days.
  7. "Condition": tag st-repeat “not specified” → “Message”: “Your cup has a saucer from the same series - for you with a 15% discount until the end of the month: link.” End.

Keyword help — a separate trigger that leads to the support menu or directly to the “Operator” block and puts a tag appeal. The condition at step 5 can be supplemented with the rule: if appeal “assigned” - do not ask for feedback until the problem has been resolved. This is why the condition allows multiple rules in one branch.

Timings: 7 days before the question about the impression - the product has been used; 21 days before pre-sale - the impression is formed, but the purchase is still in my memory. For consumables, the intervals are shorter and are tied to the period of consumption: coffee - 3 weeks, water filter - 2 months. The pause is specified in seconds, so 60 days is one number.

Timings and time of day: how not to text at three in the morning

A pause counts down the exact time from the event. If a person collected the checklist at 23:40, the “every other day” reminder will arrive at 23:40 the next day. For Telegram this is tolerable, for MAX with notifications it is annoying. In CHBT there is no pause “until 10 am”, but there is a workaround from the same blocks:

  1. “Pause” for the main interval (1 day).
  2. “Condition” for the “Time” field: hour ≥ 21 → branch “late”; hour < 9 → branch “early”; otherwise → send.
  3. In the “late” branch there is a “Pause” for 12 hours (43,200 seconds), in the “early” branch there is a “Pause” for 3 hours, then both branches converge into one “Message”.

There will be no minute-by-minute accuracy - the message will arrive between 9 and 12 noon - but there will be no night notifications either. The time is taken according to the server's time zone, so for an audience in a different zone, shift the clock boundaries.

For B2B, add a “Condition” by “Day of the Week”: Saturday or Sunday → “Pause” until Monday (48 or 24 hours). Nobody reads the reminder about a commercial offer on Saturday morning, and on Monday it gets lost among the mail - better on Monday, closer to lunch, through the same “Time” link.

General guidelines for intervals, tested on the chains of our clients: first touch after the material - 20–28 hours; reminder about the lead - 24 hours; Question about impressions after purchase - 5-7 days; pre-sale - 2-3 weeks; between two touches of reheating - at least two days. More than three messages in one chain without a person’s response is already pressure.

Limitations due to which the chain may not reach

  • The bot writes only to those who wrote to it. The chain starts from an event in the conversation, so only people who have already opened the bot have it. It is impossible to download a database of phones and “launch a trigger chain on them” - neither in Telegram, nor in MAX, nor in VKontakte; why messengers are designed this way, the article explains about the error PEER_ID_INVALID.
  • Those who block the bot will not receive anything. The sending will fail, the script will continue without an error for you. You cannot find out about blocking from the script; for mass broadcasts it is visible in “Errors”.
  • The pause is measured in seconds - from minutes to days. “Until a specific date” or “until next Monday at 10:00” is specified only by calculating seconds plus receiving with a time condition.
  • Variables do not survive the new trigger. If a person wrote /start or the keyword during a pause, the script will start again with empty variables. Store everything you need after the pause in tags.
  • The pause is not cancelled. The continuation will come on time no matter what the person did. Only the condition after the pause decides whether to send the message.
  • Buttons block transition to pause - see rule number one.
  • Script edits during pause. When the pause ends, CHBT finds the “Pause” block itself by its identifier and proceeds further according to the current scheme. Texts and blocks can be changed after a pause - people during the pause will receive a new version. But if you delete the “Pause” block or rebuild the script from scratch, while there are people in the pause, they will not receive a continuation. Make major changes using “Duplicate Script” without touching the working version.
  • There are no block counters. How many people reached the second touch is visible only by the tag - put a tag in each sending thread, for example touch-2, and read by the filter in “Contacts”. Markup scheme - in the article about tags as a segmentation system.

And plan: on the Free plan, chains work, but there is a limit of 30 conversations per month; when it is exhausted, the bot stops responding to new people - and chains for them do not start.

Checklist before starting the chain

  1. Before each “Pause” there is a “Message” without the usual buttons or an “Action” block. Link buttons are acceptable.
  2. After each “Pause” - “Condition” by tag. The “otherwise” thread leads to emptiness, not to a repetition of the message.
  3. Answers to chain questions catch exact match Keyword triggers and put tags that the condition checks.
  4. Each sending thread has a touch tag - otherwise there is no way to count how many people received the second and third messages.
  5. All pauses are temporarily set to 60 seconds, the flow is completed from the phone in both ways: answered / not answered.
  6. Pauses have been returned to combat values ​​in seconds; number checked by calculator.
  7. If the audience is reading in the evening, a link “Condition” by “Time” with an additional pause has been added.
  8. Managers know which tag to remove after a call, and this is written down in a “Note” on the canvas next to the condition.

Chains from “Pause”, “Conditions” and tags are available on the Free plan - 1 bot, 30 conversations per month, all channels; “Canvas” for branching schemes and the “Mailouts” section - from Basic for 650 ₽. One script works immediately in Telegram, MAX, VKontakte and widget on the site. Collect the first chain for free →

More on the blog