Article Quick Links:
Personalizing your bot lets you create flexible, customized conversations with your Ada chat bot. Variables, the Capture block, and the HTTP Request blocks are the basic elements required for Personalization.
What is a Variable?
A Variable is a reusable piece of data that can be referenced in an Answer. Think of a Variable as a placeholder for information that is unique to each person who visits your bot.
Example: Ask for a customer's name and have the bot refer to that person by name going forward.
|Dashboard View||Chatter View|
Local variables are specific to the Answer in which they are created and cannot be used in other Answers. Local Variables are blue:
Global variables can be used across all Answers. Information gathered as a Global Variable need only be collected once and can be re-used in other relevant Answers. Global Variables are colored green:
Metavariables are specific to the individual Chatter and can be found in all Answers. They include information such as a Chatter's browser type, browser version, IP address, and so on. Meta Variables are collected as part of the bot implementation process and not during a conversation. Information passed from your database to the bot as metadata will be stored as a Meta Variable. Meta Variables are colored purple:
Sensitive variables can be used to handle sensitive customer information. A Sensitive Variable's value is always redacted in the Ada dashboard, and is permanently deleted after 24 hours. When creating Sensitive Variables, select Availability > All Answers (Redacted). Sensitive Variables are colored yellow.
Collecting and managing variable data
There are several ways to save and manage variable data:
- Use a Capture block to request information directly from chatters and save it in a variable.
- Use the Set Variable block to manage variable data internally.
- Use the HTTP Request block to pull information from a public or private API. This information can be either static information (e.g. name or phone number) or dynamic information (e.g. price of Bitcoin, an account number).
- Use Automatic Chatter Variables to pass information from your database to your bot as Meta Variables.
In case there is an error and the personalized data can't be displayed, it's important to set Fallback text for any Variable you use:
- Click on the Variable where you've injected it into your Answer block. A pop-up displays.
- In the pop-up, add text that you would like to appear in the event of an error
Note: Keep error terminology simple and generic. Avoid using unnecessary detail.
Metavariables are the purple variables you see in the Variable Manager, and that you can add to Answer blocks when building Answers on the Ada dashboard. They contain chatter information retrieved and saved automatically by your bot, without having to collect it from a chatter directly.
Every bot starts with metavariables related to the chatter's bot conversation, as well as those gathered from the chatter's browser; however, you have the option to pass additional chatter data to the bot from your own database using an Embed script setting called setMetaField. This method enables the passing of details, such as name, email, ID, and anything else you'd like to pass to the bot. Information passed this way is called metadata. The bot then saves the metadata as metavariables for you to use.
Note: Whether or not you require chatter authentication before passing their metadata is up to you. Keep that in mind when adding the SetMetaField setting to your bot installation on your platform. See our article about Authentication for more information.
You can see a complete list of metadata that has been collected for each chatter in the Conversations view. Click the chatter icon found next to each conversation. Global Variables that capture names, emails, or phone numbers, will also replace "Anonymous" in Conversations View.
Have any questions? Contact your Ada team—or email us at firstname.lastname@example.org.