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 response label (now also known as user attributes) 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 a message with a video in it and my video is about skiing, I could set my attribute name as ‘video’ and my value as ‘watched_skiing’. That way, when downloading my response data, I would be able to see that a user had watched my ‘skiing’ video. 

How to use ‘set attribute’:

  • In the message builder, you will see a new 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
  • Note that the save button will not appear until both fields are populated
  • 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?