Salebot.ai
  • About
  • The basics: How to use Salebot.ai
    • The basics of using the editing software
    • Creating blocks and the types of them
    • Arrows (connections)
    • Quick actions
    • Buttons
    • Condition and Matching selection
    • Links to messengers
    • Blocks "not State"
    • The first message
    • Description of the fields in the Editor
    • How to make the bot not interrupt the dialogue with the client
    • Sending attachments. Tracking links.
    • Getting files from the user
    • Editing text message
    • Random answers in a bot
    • Built-in variables
    • Reservation and recovery
    • Free Videos to master Salebot
  • Administration
    • Custom Roles
    • Reservation and recovery
  • Messengers and chats
    • WhatsApp
    • Whatsapp Business API
    • Telegram
    • Viber
    • Facebook Messenger
    • Official Instagram
    • Online-chat on a site
    • Merging contacts from different messengers
  • Variables
    • Variables
    • Calculator
    • API in Calculator
    • Variable comparison
    • Working with Dates and Time
    • Working with Arrays and Dictionaries
    • List of Useful Regular Expressions
    • How to use variables
  • CRM
    • AmoCRM
    • Bitrix24
  • Working with API
    • The editing software's API
    • Integration with third-party APIs
  • Integrations
    • Payment systems
      • Capusta.space
      • Coinpayments
      • INXY Payments
      • Paypal
      • Payeer.trade
      • Paynow
      • Stripe
      • Telegram
      • Fondy
      • Wayforpay
      • WalletOne
    • InfoBusiness
      • MyOwnConference
      • WebinarGeek
    • Analytics
      • Roistat
      • Facebook Pixel
      • Google Analytics
    • Google Sheets
    • Google Tables
    • Google Calendar
    • Apix-Drive
    • SMS services
    • Sendpulse
    • QuizGO
    • Tilda
    • Linkrr
    • Vakas-Tools
  • Mailings
    • Pipelines
    • Manual mailings
    • Mailing list
    • Stop mailing
    • How to filter clients for mailing
    • Transferring the client base. Uploading Whatsapp numbers
  • To partners
    • How to transfer the project to the customer
  • How to...
    • FAQ
    • ...Create a simple chatbot
    • ...Transfer UTM-labels
    • ...Create a referral program
    • ...Create temporarily available content
    • ...Connect analytics counters and configuring conversions through GTM
    • ...Move clients to another block
    • ...Create personalized images
    • ...Create a menu in Telegram
    • ...Connect Telegram-pay
  • Payment Services
    • Page 1
  • Mini-landing
  • Special capabilities
    • Python programming
    • Generating a QR-code
    • Generating a barcode
    • Barcode recognition on an image
    • Using Google Sheets for mailings
    • Sending requests to messengers and email
    • Working with promo codes
  • Our services
    • Pricing
    • Training courses
  • Group 1
Powered by GitBook
On this page
  • Supported operators:
  • How to Compare Variables
  1. Variables

Variable comparison

You can perform logical operations

PreviousAPI in CalculatorNextWorking with Dates and Time

Last updated 3 years ago

Variable name cannot start with a number. Variable name cannot consist of two words, use the "_" underunderline character to separate

Supported operators:

"+": addition

"-"': subtraction

"*" multiplication

"/": division

'"%'": remainder of division

" ^ " "**": degree

"==" "!=" " >" "<" ">=" "<=": comparison operators

"and" "AND" "&&": Logical AND

"or" "OR" "|"|": logical OR

To verify an empty variable or not, use the expression: "#{value}" == " "#{value}" != "" Where value is the variable name.

Maximum expression length: 1000 characters

How to Compare Variables

You can compare variables in the "Variable for comparison" field

The comparison variable works with the condition. That is, both the condition and the variable condition must be met for comparison.

If you specify a simple variable name without an expression in the comparison box, the condition will be compared to it, not to what the user has entered. For example, in the figure below, the client from Whatsapp is checked (the variable client_type in Whatsapp is 6 )

The example below works identically

I’ll show you how to use it.

The bot asks the age if it is less than 18 years old, the bot responds that the person is a minor, if more, then an adult.

Notice there’s an unanswered block in the schematic, and there are timer arrows coming out of it. This block is specifically designed to show how to construct a schematic if the bot reacts not to the action of the user, but to the result of the calculation. In the first step, the answer to the variable is saved, and then the comparison takes place. The delay on the arrows is 0 for the instant response.

Important!!! the condition for the age of majority is strict, that is, more and equal to 18. Very often make mistakes of such a plan.

Or for example, you can write either more 18 or equal to 18

Condition errors

DON’T DO THIS:

Number cannot be both greater and less than 18

This condition is meaningless. all numbers less than 18 or more are 18