Ask AI
English EN
Go to Watbot

Examples

Address the contact by name, if known

Hello{{ first_name ? ", " ~ first_name : "" }}!

Greeting by time of day

Time with a UTC offset, e.g. Moscow time (UTC+3):

{{ date("H", "+3 hours") < 12 ? "Good morning" : (date("H", "+3 hours") < 18 ? "Good afternoon" : "Good evening") }}, {{ first_name }}!

Discount and total

Price: ${{ $price }}
15% off: ${{ round($price * 0.15) }}
To pay: ${{ number_format($price * 0.85, 2) }}

Free delivery above an amount

{{ $total >= 3000 ? "Free delivery" : "$" ~ (3000 - $total) ~ " more for free delivery" }}

Case-insensitive answer

{{ lower(trim($answer)) in ["yes", "yep", "sure"] ? "Great, booking you in!" : "Okay, I'll remind you later." }}

Special message for tagged contacts

{{ printContactTags() contains "VIP" ? "You get a personal manager." : "" }}

A date one week from now

Your trial lasts until {{ date("d.m.Y", "+7 days") }}
https://site.com/order?name={{ urlencode(name) }}&phone={{ urlencode(phone ?? "") }}

Variable name with spaces

{{ capitalize(lower(var("Client name"))) }}, your request #{{ id }} has been received.

Different texts for different messengers

Message us{{ messageToTelegram(": @example_support") }}{{ messageToWeb(" right in this window") }}