Attributes
Attributes are used to store data entered by the user during the conversation that can be later transferred or used in various use-cases.
User attributes can also be used as variables for storing data related to a path execution. For example – the email or username of a chatbot user, items ordered, quantity and delivery address for a pizza ordering bot, and so on.
The following example will help you understand its functioning.
For example – I have an attribute called as Name that will store the names of my users.
User A enters Adam User B enters Beck User C enters Cenly
Attribute name | Name | Age |
---|---|---|
User A | Adam | 21 |
User B | Beck | 32 |
User C | Ceny | 19 |
This information will be stored just for these users and they won’t be mixed up as we have identifiers to map them.
You can invoke this feature into the platform via the following methods.
- Date Input Nodes – Request User Data, Form, and Identity node.
- Set Attribute Node.
- Send Message With Options node.
- JSON and Script nodes.
- Website scripts.
Engati has two different sets of attributes –
System Defined – Attributes that are created in Engati by default for capturing data.
For example – Facebook is a channel that provides user names of the person, hence this value is automatically pre-populated in the user.user_name attribute.
A standard system Attribute has a structure {{user.<attribute name>}}
Example: Attribute for full name {{user.user_name}}. This is a system generated.
Custom attributes – Attributes created by the Users for their use-case.
Note :
Attributes that are already present in the bot are system-defined and we would encourage users to not create another attribute with the same name as a system-defined attribute.
This overrides the existing functionality of value generation and makes it a custom attribute that in turn will no longer automatically capture the values.
To call an attribute inside the relevant node you can use the '{' (curly brace) to see the list of existing attributes. To call an attribute inside the script node you can use the # and a dropdown will be shown with the list of attributes.
You can use APIs to filter users or conversations based on attribute name and their values. Attributes and their values are stored for each user that can be accessed via the Users page.
Note :
The attributes are limited in size by design. The constraint is due to performance factors.
Here are the standard limits:
- Up to 25K characters for in-flow usage
- Up to 1000 characters for also persisting this information in DB for reporting and segmentation.
For double-byte characters, these limits may be halved.
In order to deal with larger data, it is a standard practice for any development to split the data or use paginated responses.
In case of any issues feel free to reach out to [email protected].