Skip to content
ChatterfyHelp Center
HomeGeneralCRMAI ManagerTrackerPlatformsFAQUpdate log
Main
Bot Settings
Automation & AI
Automation & AI
AI Models — Complete Guide to AI Models in Chatterfy
AI Recognition — media processing
Bot Variables — reusable values
CRM defaults
Flow Settings
AI Settings
Steps
Communication
Changes
Terms
Tracking
Additional
Messenger
Client card
Chat data
Events
Users
Mailings
Analytics
  1. CRM
  2. Automation & AI
  3. Bot Variables — reusable values

Bot Variables — reusable values

The Bot Settings → Bot Variables section is used to store shared values that are used in different parts of the bot. Simply put, these are variables for reuse. Instead of manually inserting the same l

Updated August 17, 20264 min
The Bot Settings → Bot Variables section is used to store shared values that are used in different parts of the bot. Simply put, these are variables for reuse.
Instead of manually inserting the same link, promo code, or text into dozens of steps, you create a variable once and then call it using {{variables.variableName}}.
This is especially useful for:
  1. affiliate links
  1. support chats
  1. promo codes
  1. offer IDs
  1. product names
  1. long URLs
  1. any recurring values.



Why you need Bot Variables

  1. in 5 flow steps
  1. in AI Reply
  1. in AI Settings
  1. in buttons.
A week later, you change the offer.
Without variables:
  1. you have to search for the link across the entire bot
  1. it is easy to forget one of the steps
  1. some old links will remain.
With Bot Variables:
  1. change the value once
  1. the update is applied everywhere automatically.



When to use Bot Variables

You have a long affiliate link

For example: https://partner.com/register?clickid={{tracker.clickid}}&utm_source=fb...



There is a support link

For example: https://t.me/support_brand. It is better to store it in a variable.



Long URLs are used

You can automatically shorten them through your own domain.



The value is repeated more than once

A good rule: if the same value appears in the bot twice, move it to a Bot Variable.



Bot Variables vs Custom Fields

These tools are often confused. But they work in completely different ways.
Tool
What it is used for
Value
Bot Variables
General bot data
One value for all leads
Custom Fields
Data for a specific lead
Each lead has their own
Simple rule
Bot Variables are for general data: partner link, support chat, promo code, offer name. Custom Fields are for individual data: trader_id, lead country, balance, email, clickid.



How to create a Bot Variable

  1. 1

    1. Open Bot Variables

    Go to:
    Bot Settings → Bot Variables
    If the bot is new, the list will be empty.
  2. 2

    2. Click Add New Variable

    The creation form opens.
    
  3. 3

    3. Fill in Variable Name

    This is the variable name. You will use this exact name in the macro {{variables.variableName}}.
    Important. The variable name is its identifier. If you rename a variable after it is already used in steps, AI prompts, buttons, or webhook URL, the old references will stop working. Empty values will appear in messages. Therefore, think through the name in advance and try not to change it.
  4. 4

    4. Fill in Value

    Value is the variable value. For example, a long partner link or https://t.me/support_brand. You can use other variables inside Value.
    Tracker parameters:
    {{tracker.clickid}}
    {{tracker.utm_source}}
    Custom Fields:
    {{fields.trader_id}}
    System variables:
    {{chatId}}
    {{name}}
    {{username}}
    
  5. 5

    5. Click Save

    After saving, the variable immediately becomes available throughout the bot.



How to use variables

After creating it, call the variable like this: {{variables.regLink}} (replace regLink with your own name).



Where Bot Variables work

Send Message

In regular messages, for example: “Registration: {{variables.regLink}}”.



AI Settings

You can use it inside Global Legend, Restrictions, and Response Style — see AI Settings — Bot Personality.



AI Reply

AI understands variables. For example: “Always send the link: {{variables.regLink}}”.



Inline buttons

You can insert variables into button URLs.



Webhook URL

Works in the Webhook step — see Webhooks & API — receiving data from external sources.



Usage examples

Affiliate link: {{variables.regLink}}
Support chat: {{variables.supportChat}}
Promo code: {{variables.promoCode}}



Shorten the link — link shortening

If a variable contains a long link, it can be shortened automatically. Before: a long URL with UTM and {{tracker.clickid}}. After: a short address on your domain.



How to enable shortening

When editing a variable, enable Shorten the link and select a domain.
The domain must be connected in advance via Domains — custom domains. If the domain list is empty, connect a domain first, then return to the variable.



Why shorten links

Higher CTR — short links look safer.
Branding — the lead sees your domain, not the affiliate link.
Fewer anti-fraud issues: your own domain looks more reliable than bit.ly, tinyurl, or a random shortener.
Protection from blocks: if the affiliate domain is restricted, your redirect may continue to work.



Using in AI prompts

Bot Variables are especially useful in AI: instead of a long link in every prompt, use {{variables.regLink}}.
Easier to maintain: changing a link = changing one variable.
Shorter prompts: AI does not need to store long URLs inside instructions — this reduces the prompt size, saves tokens, and simplifies maintenance.



Variable nesting

Type
Example
Other Variables
{{variables.baseUrl}}
Tracker
{{tracker.clickid}}
Custom Fields
{{fields.trader_id}}
System values
{{name}}
Example: https://partner.com/register?clickid={{tracker.clickid}}&id={{fields.trader_id}}
Important
Do not overuse nesting: the more levels there are, the harder it is to debug errors. A good rule is a maximum of one level of nesting.



Frequently asked questions

Bot Variables are shared and the same for all leads. Custom Fields are individual and unique to each user.

There is no strict limit. But it is better to store only variables that are actually used.

A custom, topic-specific domain with a good reputation is best. A new domain with no history and public shorteners are not recommended.



Related

Custom Fields — custom fields
Custom Fields (Bot Settings → Custom Fields) — a section for creating additional fields in the customer card. Standard fields already exist in Chatterfy: name, username, status, and Telegram ID. But o
AI Settings — Bot Personality
The Flow Settings → AI Settings section defines the bot's personality — the general context that AI takes into account in every response via the AI Reply step inside this flow. Three blocks: Global Le
Send message — sending a prepared message
The Send message step is the most basic flow step. It sends predefined content: text, an image, a document, a voice message, a video note, buttons. Unlike AI Reply, there is no AI here and no generati
Webhooks & API — receiving data from external sources
With a webhook, an external service can update user data, change the chat status, switch Flow steps, write values to Custom Fields, add or remove tags, and manage the conversation from an external sys
Domains — custom domains
Connecting your own domains and subdomains via Cloudflare for tracking links, landing pages, and event tracking in Tracker. Tracker → Domains is the infrastructure section used to connect domains for

Was this article helpful?

BackAI Recognition — media processing

On this page

  • Why you need Bot Variables
  • When to use Bot Variables
  • You have a long affiliate link
  • There is a support link
  • Long URLs are used
  • The value is repeated more than once
  • Bot Variables vs Custom Fields
  • How to create a Bot Variable
  • How to use variables
  • Where Bot Variables work
  • Send Message
  • AI Settings
  • AI Reply
  • Inline buttons
  • Webhook URL
  • Usage examples
  • Shorten the link — link shortening
  • How to enable shortening
  • Why shorten links
  • Using in AI prompts
  • Variable nesting
  • Frequently asked questions
  • Related