How to use Attributes
ChatBot.com

luiza jurczyk

Last update:

Attributes save information about the ongoing conversation and help to reuse them in the chat.

System Attributes

ChatBot automatically collects data about your users from integrated apps. Let’s use one of them to create a nice personalized Welcome Interaction. The following example uses the Facebook Messenger integration.

Check out the list of default attributes.

  1. Create a new story and add an interaction.
  2. Go to bot responses, add text and inside your response type double curly brackets to call the attributes . Keep Default and user attributes selected.
  3. Find Facebook integration and select User name.
  4. Add some text and save the interaction.
  5. The attribute is ready. The bot will pull the information from Messenger and display the user name in the place of the attribute.

User attributes

User attributes allow you to store any value you want. To get the data you can use system or user entities. In the following example, we’ll be saving email address using the emai system entity.

  1. Create a new story and add an interaction. Name it `Get email
  2. ą2. Add the sys.email entity to the user says section. To do so, type two curly brackets and select .sys.email and name your attribute. FInd out more about this entity here.
  3. Add a few similar user says together with the entity.
  4. Go to the bot responses section and add a new text response. Type again double curly brackets to view available attributes and select the one we’ve just created called user_email.
  5. Save your work. Your attribute is set and ready.

You can pass the value of your attributes by webhooks. You'll find it in the JSON assigned to theparameter.

Use Ask the Question action to get attributes

You can prompt users to fill the attributes using the Ask a Question action. Ask a Question offers a variety of options, that can be used to gain new leads, collect orders and much more.

  1. In the Interaction view, select Bot responses. Here you’ll find the Ask a Question action.
  2. Configure the action. If you need help, please refer to this article.
  3. Now you can reuse the value entered by users in your story. Type two curly brackets . The system will automatically show you available attributes.
  4. Now save the interaction. When this bot response is triggered, the bot will display the value entered by the user.

You can also pass the attribute values by other bot responses, such as quick replies, cards and buttons and with webhooks.

How to fill Attributes

It’s possible to send any parameters during the ongoing conversation. They can substitute already existing parameters or create a new one that can be used at the specific scenario stage.

Parameters can be sent either in endpoint /query or as an answer for incoming webhook. Attributes are used as metadata in archives.

Go to next article arrow_forward