Advanced Variable Features - Customize Bot Messages

For Enterprise bots built using the Advanced View, you can insert variables into the following bot messages: the intent’s answer, the follow up question’s prompt, retry and final retry messages, and the goodbye and fallback messages. To access data stored in a variable set with Key Name or Saved States, simply enclose the variable name in curly braces, such as: ❴phone_number❵. You can include more than one variable in the same message field. If a variable does not exist or has not been set yet, the variable name enclosed in curly braces will be sent to the end user.

The following system variables are also available by default and can be used in your WhatsApp flow:

  • whatsapp_name - WhatsApp profile name of the recipient.
  • whatsapp_first_name - The first word of the recipient's WhatsApp profile name. Depending on how users configure their WhatsApp username, it may not always reflect the user's actual first name.
  • whatsapp_number - WhatsApp number of the recipient (the user sending the message to the bot).
  • bot_number - WhatsApp number of the bot.

Finally, to insert a variable into a media or interactive message (for more info please refer to Build Media and Interactive Messages in Chatbot ), configure the message using double brackets, and include the dynamic variable using single curly brackets as follows: interactive:{{"type":"reply","body":"This is the {whatsapp_name}","action":{{"buttons":[{{"type":"reply","reply":{{"id":"1","title":"Button Title"}}}}]}}}}.

📘

Note:

This feature is not available for the welcome and callback messages.