Skip to main content
Skip table of contents

Attributes deep-dive

Attributes are a fundamental piece of your automations. They can be used to store temporary information throughout your flow and help you to build up your flow logic.

Attributes are crucial for enhancing the capabilities and functionality of your BOT within conversational flows. These essential data elements serve as the building blocks of personalized and context-aware interactions, allowing your BOT to understand, remember, and respond to user input effectively. Whether they are storing user data, tracking order histories, or maintaining session contexts, attributes empower your BOT to deliver a seamless and tailored user experience. In this section, we will explore the importance of attributes and how they can be utilized to create dynamic, intelligent, and user-centric BOT interactions.

In Smartflows, you have the following attributes categories:

  • User defined

  • Most used

  • System defined

  • Uploaded documents

  • Uploaded image

  • Lead attributes

User defined

User defined attributes are those created by the user during the implementation of the flow. They can be created by clicking on the "curly braces” button available in almost every place where the use of an attribute is required.

For example, you can create a “Reply” block, click on the "curly braces” button on the lower right corner of the text box, click on “Add custom attributes“, define the attribute’s name and confirm clicking on “Add Attribute“. Now the attribute is available in attribute list under the User defined section

image-20240731-142132.png
image-20240731-142345.png

Important note: user defined attributes are visible only within their respective BOT flow. This means that if you transfer control to another BOT, you can no longer access those attributes. There is, however, an exception: if you transfer control from BOT "A" to BOT "B" using the "Replace bot" block, and both BOT "A" and BOT "B" have an attribute with the same name, the value from BOT "A" will be copied into the corresponding attribute on BOT "B"

Most used

The "most used" category is for attributes that are frequently utilized within a BOT flow:

  • lastUserText: this always contains the last user input

  • user_country: this is the country of the user. This is available only if the remote user is present within Smartflows contact list, the country information is present and the pre-chat form has been activated (otherwise it’s not possible to identify the user)

  • user_city: this is the city of the user. This is available only if the remote user is present within Smartflows contact list, the city information is present and the pre-chat form has been activated (otherwise it’s not possible to identify the user)

  • user_language: this is the user language detected by the used channel. For example, if the user is using a web browser, this is the browser language

  • transcript: this contains all the messages exchanged with this BOT during the conversation

System defined attributes

  • department_name: The name of the department where this chatbot is activated

  • department_id: The ID of the department where this chatbot is activated

  • project_id: The name of the project where this chatbot belongs to

  • last_message_id: The unique ID of the last message sent

  • conversation_id: This conversation unique ID

  • chatbot_name: This chatbot name

  • user_id: The user unique ID inside Smartflows database

  • user_agent: The web user agent where this conversation initiated

  • chatChannel: The channel where this conversation belongs to. Ex. "web", "whatsapp", "facebook", "telegram"

  • user_source_page: The page where this conversations is runinng. Only available on channel "web"

  • chat_url: The url of the Chat to send to a colleague to chat with this user. Use "Invite human" action to invite the human to this chat.

  • user_ip_address: The user IP address, when available

  • ticketId: The ticketId automatically assigned to each conversation

Uploaded documents attributes

lastUserDocumentURL: The public URL to access the document uploaded by the user. It's empy if no document is uploaded

lastUserDocumentName: The name of the document uploaded by the user. It's empy if no document is uploaded

lastUserDocumentType: The type of the document uploaded by the user. It's empy if no document is uploaded

Uploaded Image Attributes  

  • lastUserImageURL: The public URL to access the image uploaded by the user. It's empy if no image is uploaded

  • lastUserImageName: The name of the image uploaded by the user. It's empy if no image is uploaded

  • lastUserImageType: The type of the image uploaded by the user. It's empy if no image is uploaded

  • lastUserImageHeight: The height in pixel of the image uploaded by the user. It's empy if no image is uploaded

  • lastUserImageWidth: The wdth in pixel of the image uploaded by the user. It's empy if no image is uploaded 

Lead info Attributes

  • currentPhoneNumber: The user phone used in the current conversation (i.e. coming from Whatsapp / SMS channels)

  • userPhone: The user phone in Smartflows Contacts

  • userEmail: The user email in Smartflows Contacts

  • userLeadId: The user contact Id in Smartflows Contacts

  • userCompany: The user Company name in Smartflows Contacts

  • userFullname: The user Fullname in Smartflows Contacts

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.