Set Attribute

How to set a 'transparent' attribute on a message

Sophie Barfield avatar
Written by Sophie Barfield
Updated over a week ago

This message part enables you to set an ‘invisible attribute’ without the need for any user input. It works in the same way as when you save a user attribute on a quick reply, button or Q&A part. The user will not see anything; if they’ve hit the message in the bot, the attribute is set quietly.

For example, if I have built an onboarding bot, I can track when users have finished certain tasks or flows. The user won't see the message part, but it will be triggered when they reach a certain message in the bot journey.

How it works

  • In the message builder, you will see a part in the message list called ‘Set attribute’

  • Click to add it to your message (anywhere in the message is fine)

  • Then click on the part in the message where it says ‘click to set up your user attribute and value’

  • You will see a modal with 2 fields, one for the attribute name and one for the attribute value

  • Give your attribute a name eg. ‘video’ 

  • Set a value like ‘watched_skiing’ for the user attribute value field

  • Set attribute

  • Note that the save button will not appear until both fields are populated

  • You can add multiple attributes at this point by hitting the ‘+’

  • Press save

  • The new message part will have changed to show a summary headed 'Set User Attribute’ with the values you added for the name and value respectively

  • Save your message

  • To test your message, click ‘test’ on that message or visit the message in Messenger/Workchat

  • Download your response data and you will see the attribute and value has been saved.

  • You can recall the attribute in a message in the same way you do with any others eg. {{$video}}

NB. This user attribute can only be recalled in the following message not within the same message itself. It is set when the user reaches the end of that message (once they have gone through all the message parts).

Did this answer your question?