Set Attributes
ChatBot.com

luiza jurczyk

Last update:

The Set Attributes action allows you to insert attributes into the ongoing conversation or remove existing ones without waiting for users to fill them up.

ChatBot gives you many options to collect user data. You can ask questions and save the responses to attributes, use entities and retrieve information that has been already caught by integrations.

Moreover, your bot is able to also modify the attributes. Use the Set Attribute action to change attributes at any point of the conversation.

How does it work

Three main elements of the Set Attributes bot action:

  • Attribute name — Choose an attribute to modify its value.
  • Action — You can either insert or remove the value of the attribute.
  • Value — Assign any value to the attribute.

You can modify both user and default attributes.

How to use Set Attributes

Attributes can be beneficial to collect bot statistics, set scenario goals and control what is being passed inside your attribute. An excellent example of using this action is to assign the language attribute to the user preferences. If a user speaks Spanish, the system will automatically assign the value “Spanish” to the right attribute.

  1. First, we need a short story that includes more than one language. In this example scenario, the user can choose between Spanish, English, and Italian. The language can be either selected from a menu or automatically recognized by the system.
  2. When a user types Hola! the bot automatically recognizes the language and replies in Spanish.
  3. Add a Set Attributes bot action to this interaction.
  4. Configure the action:
    • Select the attribute that stores the language value
    • Choose the Set value action
    • Assign the right attribute, in this case, it can be Es, Spanish, Español or anything you want.
  5. Similarly, you can add the Set Attributes action to other languages.
  6. Save the interaction.

Go to next article arrow_forward