Using fields (aka variables) to personalize your bot is easy and super worthwhile. For example, if you know your website visitor's first name, e.g., Bob, it is a nice touch to refer to him by name directly in your bot script. Right? It's the small things in life!
INSERTING A FIELD INTO YOUR BOT SCRIPT
Drag a Text button from your right hand panel tool palette into your bot script in the center panel. This action will transition the right hand panel into editor mode and allow you to type the text for your text bubble. Click on the @ symbol just below the emoji symbol, in the upper right hand corner of the right hand panel, and this will reveal an Insert Field drop down menu. This menu includes all fields either previously collected by your bot script (using the Email Field or Text Field buttons) or collected automatically by Gobot.
Choosing a field from the drop down menu automatically places it in your text line. The field will be highlighted blue in your bot script indicating that it is a placeholder and will be swapped out for actual data when your bot is displayed to visitors. By the way, you can also add fields directly in your buttons/options for Buttons, Quick Replies, Multiple Choices, Picture Choices, and Polls.
In the example below, the bot solicits the visitor's first name and so First Name is listed as a field option. Also, while the bot script does not solicit the visitor's location, Gobot automatically collects this information as soon as the visitor starts to engage with the bot and so Location is also listed in the drop down field menu. Inserting First Name and Location into the text line "Hello First Name! How are things in Location?" will result in the bot displaying in the chat window "Hello Bob! How are things in NJ?".
NAMING FIELDS YOUR BOT COLLECTS
You can use the Collect Reply button to collect information about your visitor and then associate that information with a field that you name. For example, if you use a text line to ask your visitor for his first name and then follow up with a Text Field to collect that name, make sure to label that field "First Name". You can do this in the right hand panel of Collect Reply by clicking Field Type and choosing a name for your field.
INSERTING FIELDS THAT GOBOT AUTOMATICALLY COLLECTS
You can also insert information into your bot script that your bot may not be scripted to collect. In this situation you can leverage Gobot's automatic collection of a large number of data fields about your visitor, e.g., Location, which you can insert into your script. To see the long list of data fields available to you for a given contact check out the contact's profile page. Also, to insert a field, for example, in a text bubble, click on the text bubble and then the @ symbol in the right hand panel and then select a field from the list. If there are no fields in the drop down list that means your bot hasn't collected any fields yet and you need to then insert a Collect Reply element into your bot script.
Copyright 2017-2019, Gobot LLC, All rights reserved.