Set attributes

Image of an author
Luiza Jurczyk
2 min read
updated: Apr 4, 2022

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 workLink icon

Three main elements of the Set Attributes bot action:Link icon

  • 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.
You can modify both user and default attributes.

How to use Set AttributesLink icon

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.

  1. Similarly, you can add the Set Attributes action to other languages.

  2. Save the interaction.

Was this article helpful?

Got it!

Thanks for your feedback.

Thank you!

We’re happy to help.

Start a free ChatBot trial
and build your first chatbot today!

Free 14-day trial No credit card required

Discover our other products