What are Attributes?
Attributes are data points associated with a user or relevant for the conversation. These attributes are persistent unless they are cleared or overridden explicitly.
The use of attributes in Engati is of utmost importance since all conversations with every user occur within the platform.
Therefore, Engati stores attributes along with the language data. These attributes contain additional information that can be used as variables for storing data related to a path execution. For example – an email or username of a user, their ordered items, quantity and delivery address for a pizza ordering bot, and so on.
Currently, there are three common types of attributes supported by Engati.
What are System Attributes?
System attributes are attributes that Engati automatically creates.
These can include:
- user.user_id – The remarkable identifier of a client in the Engati framework
- First Name – First name of the user, identifies from channel (Facebook)
- Last Name – Last name of the user, identifies from channel (Facebook)
- user.channel_user_id – The identifier given by a specific channel where the client is interfacing from.
- user.channel – The channel from where the specific client is associating.
- user.last_query – The most recent content contribution by the client
- user.username – The username of the client as given by the channel. Not relevant for all the supported channels. This would be blank where the channel doesn't provide the information
- user.fileUpload.url – URL of transferred document
- user.fileUpload.type – Uploaded document type
What are Bot Attributes?
Bot attributes are defined at the bot level. Let’s say you have a constant that is used at multiple paths. You can create a bot attribute and use that and manage the value from one place. This is especially useful for integrations where API keys and tokens need to be stored.
What are Custom Attributes?
A custom attribute is a property that you can define to describe assets. Custom attributes extend the meaning of an asset beyond what you can determine with the standard attributes. You can create a custom attribute and assign a value that is an integer, a range of integers, or a string.
There are multiple ways of setting attributes in the bot. Engati provides you with the functionality to create your own attributes. It can be done internally using nodes or passing it as a URL parameter or the widget script.
The following nodes can also modify them:
- Set Attribute Node: Here value is assigned for the user. This assigned value can be either text, numeric, or date.
- Send a message with Options node: The user can select the option, which then becomes an attribute for the value selected.
- Request Node: This is used to collect data from the user and store the data as an attribute.
- JSON API node - The reaction fields from an API call can be fetched and put away as a trait that can be used later. This can be an incredibly supportive approach to stack increasingly logical and pertinent data about a client or a movement through an API call.