Home · Blog · Broadcast personalization in a bot: the customer’s name, empty variables and texts per segment

Broadcast personalization in a bot: the customer’s name, empty variables and texts per segment

· Command CHBT · Broadcasts, Copywriting

A message with a name in the first line reads like a letter to a person, not an ad for everyone. That is why CHBT broadcasts have variables: {{name}} inserts the name from the contact card. But personalization in a broadcast has its own rules — they differ from flow messages. Here is which variables work, where the values come from, why you sometimes get “Hello, !” and how to personalize not only the greeting but also the content.

Which variables work in a broadcast

In the New broadcast form, under the Message text field, there is a hint “Variables are filled from the contact profile:” and three buttons:

  • {{name}} — the contact’s name;
  • {{phone}} — phone;
  • {{email}} — e-mail.

A button inserts the variable where the cursor is — so you do not have to type curly braces by hand and can easily avoid a typo.

Nothing else is filled in a broadcast. Any other variable in curly braces — {{city}}, {{slot}}, a custom card field — turns into an empty spot when sent. This is the main difference from flow messages, where the variables collected during the conversation are also available.

Broadcast vs flow: the difference

Flow messageBroadcast
{{name}}, {{phone}}, {{email}}YesYes
Flow variables: Data collection answers, Set a variable, an HTTP request responseYesNo — inserted empty
When the value is takenAt the stepAt the moment the broadcast is sent
Buttons and branchingYesNo, text only

The reason is simple: a broadcast is sent outside a conversation. It has no “current dialogue” to take answers from — only the contact card. So everything you need in a broadcast must be in the card: name, phone, e-mail — or in the tags you use to choose recipients and text.

How variables work in flows is described in detail in the help article on variables and fields.

Where the name in the card comes from

When a person writes to the bot, CHBT creates a contact and takes the name from the messenger profile — Telegram, MAX or VK. If the flow has a Data collection step of the Name type, the customer’s answer is written to the card and replaces the profile name.

Hence the typical surprises:

  • the person’s Telegram profile says “Sasha 🌸” or “Daisy Shop” — that is exactly what gets inserted;
  • some contacts have no name at all — for example, those imported from CSV without a name column;
  • the profile name is in Latin letters while you write in Russian — you get a greeting with a Latin name in a Russian sentence.

The name can always be fixed by hand: in Contacts, open the card and change the Name field — its hint says exactly that: “How to contact a client”. The value is taken at the moment of sending, so an edit made before a scheduled broadcast starts will get into the text.

An empty name: “Hello, !”

If a contact has no name, {{name}} is inserted as an empty string. The phrase “Hello, {{name}}!” turns into “Hello, !” — and everyone without a name will notice.

Three ways to avoid it:

  1. Write without a name in the greeting. Any phrase where the name sits next to punctuation breaks without it: “{{name}}, we have a discount” turns into “, we have a discount”. A neutral “Good afternoon!” never breaks — for a broadcast to a mixed base it is the most reliable option.
  2. Collect the name in a flow. Add Data collection of the Name type to the welcome or to the broadcast consent flow: “How should we address you?”. Then everyone who went through the flow has a name.
  3. Split segments. After Data collection, add Add a tag has-name. Send the broadcast with a name greeting to this tag, and the same text without the name to the rest.

Why a variable stayed in the text as is

Sometimes a customer receives a message that literally says {{ name }} or {{имя}}. This happens when a variable is written against the rules. CHBT recognizes a variable only in its exact form:

  • two curly braces on each side;
  • a name in Latin letters, without spaces inside the braces;
  • in lowercase — exactly {{name}}, {{phone}}, {{email}}.

{{Name}} with a capital letter CHBT takes for an unknown variable and inserts nothing. And {{ name }} with spaces, {{имя}} in Cyrillic and {name} with single braces are not variables at all and reach the customer as plain text.

The best protection is to insert variables with the buttons under the text field and to send a test broadcast to yourself before sending to the whole base.

Phone and e-mail in the text: when it is appropriate

{{phone}} and {{email}} are inserted just like the name, but use them more carefully. It is appropriate when the customer left this data themselves and it helps them to see it:

  • “We will call {{phone}} within a day — if your number changed, send the new one”;
  • “The receipt and access were sent to {{email}}. Don’t see the email? Check the Spam folder”.

It is inappropriate in an advertising broadcast “for everyone”: a person who does not remember leaving a phone number will see it in a promotion and get suspicious. And remember the empty case: whoever has no phone in the card will get “We will call within a day” with a gap. Send such messages by a tag that is set together with phone collection — for example lead.

Personalization by content, not just by name

A name in the first line is the simplest personalization. Text written for a person’s interest works much better. In broadcasts this is done with segments:

  1. In a flow, ask what they are interested in: “What should we send you?” with the buttons “New arrivals”, “Discounts”, “Useful tips”.
  2. Each button sets its own tag: newsletter-new, newsletter-discounts, newsletter-tips.
  3. Instead of one broadcast for everyone, make three — with different texts for each tag.

You get personalization without a single variable: the person receives what they asked for. How several tags in the To field work and how not to send one person three messages in a row — in the article on broadcasts by segments.

Text examples

An appointment reminder (tag appointment-tomorrow):
“Hello, {{name}}! A reminder about your appointment tomorrow at 12:00. If your plans changed, write RESCHEDULE — we will find another time”.

A promotion with no risk of an empty name (tag newsletter-discounts):
“Good afternoon! Until Sunday — 15% off everything from the previous collection. Write DISCOUNT and the bot will send a selection”.

A second touch after a request (tag lead):
“{{name}}, you left a request for a consultation. A manager can call {{phone}} today — write YES and we will agree on a time”.

All examples have a reply word. A broadcast has no buttons, so the reaction is obtained with a keyword: it starts a flow with the right continuation.

Deep personalization — in the flow after the broadcast

A broadcast is limited to three card fields, but the reply to it starts a regular flow — and all variables are available there. So complex personalization is best moved from the broadcast to the second step:

  1. The broadcast briefly reports the news and asks to write a word: “Write SELECTION — we will send options in your size”.
  2. The word starts a flow with a Keyword trigger.
  3. In the flow the bot asks what is needed through Data collection and answers with conversation variables: “We picked three models in size {{size}}”.

This scheme has a second advantage: only interested people get into the flow. Those who replied can be tagged right away — for example replied-selection — and next time you can write to them more precisely. The broadcast sparks interest, the flow personalizes the answer.

Checking before sending

  1. Make sure variables were inserted with the buttons and look exactly like {{name}}.
  2. Open Contacts filtered by the broadcast tag and scroll through the names: are there company names, emoji instead of names, empty cards.
  3. Give yourself the test tag and send the broadcast to it — see how the text looks in the messenger.
  4. Temporarily erase the name in your card and send again: this shows what people without a name will get.
  5. Only then create the broadcast for the segment.

Five minutes of checking cost less than apologizing to a thousand people for “Hello, !”.

Where it works and how much it costs

Personalization works in all broadcast channels: Telegram, MAX and VK. Each person gets the message in the messenger where they wrote to the bot, with data from their own card.

Broadcasts are available on the Basic (650 ₽ a month per bot) and Business plans. Flows that collect the name, phone and interest tags work on any plan — you can prepare the base for personal broadcasts in advance, while still on Free.

About sending time and time zones — in the article on scheduled broadcasts.

More on the blog