Expression Examples
Common expression recipes for bot runtime calculations.
Lead Scoring
Set a lead tier based on numeric score.
if(gte({{score}}, 85), "A", if(gte({{score}}, 70), "B", "C"))Fee Calculation
Add registration charge to base fee.
Functions used:add
add({{base_fee}}, {{registration_fee}})Follow-up Date
Set next follow-up date to tomorrow.
Functions used:date_add_daystoday
date_add_days(today(), 1)Date Age Check
Check how many days since lead creation date.
Functions used:date_diff_daystoday
date_diff_days(today(), {{lead_created_on}})Weekday Routing
Tag conversation based on day of week.
Functions used:day_of_weekifeq
if(eq(day_of_week(today()), "sunday"), "weekend", "weekday")Date Format Output
Format timestamp into a readable date string.
Functions used:date_formatnow
date_format(now(), "DD/MM/YYYY")Shift Reminder by Hours
Set reminder timestamp 2 hours after current time.
Functions used:date_add_hoursnow
date_add_hours(now(), 2)Weekly Window
Get current week start and end dates.
Functions used:start_of_weekend_of_weektoday
start_of_week(today())
end_of_week(today())Timezone Display
Convert UTC timestamp into target timezone display value.
Functions used:timezone_convertnow
timezone_convert(now(), "Asia/Kolkata")Display Name Formatting
Combine first and last name safely.
trim(concat({{first_name}}, " ", {{last_name}}))