What are attributes?

Attributes are a great way to save user data to the Flow database. You can then either save this data or recall it back in a later message to make for a richer Flow experience.

 

What do attributes do?

In simplest terms, an attribute is something we use to save data against. It's a way to collect user data easily and effectively. So for example, if I want feedback off a user, I can build a message with a Q&A or a button in order to save the user's response against the attribute $feedback:

 

Whatever the user sends back or selects is now attached to this attribute, and I know that attribute is saving only user feedback.

 

How do you save data against a user attribute?

There's multiple ways you can do this:

 

Store button presses

When creating a button or a quick reply, you can set the button type to be “Save this information with a user attribute”. Select a user attribute to save the response against the user so that you can retrieve it later, perhaps you want to use the label ‘training’. You can also set a value against that attribute, just in case you want it to be different to the button text. The value will then be saved to the attribute in the flow database, not the button text. Then finally select the message you want to send the user once the response has been saved.

 

 

Store free text answers

Although buttons are useful to save most attributes, sometimes you want to ask the user an open-ended question. But you still want to store the response against the user. These are done slightly differently from buttons, instead you need to choose a Q&A message part:

 

Add a Q&A message part, and then hit the cog to access to the settings, set the user attribute save against the user, eg "feedback":

Now when a user responds to that message, it will save their response against their user profile in the system as a 'user attribute'.

 

Store an invisible attribute or 'set attribute'

You can also set a value against an attribute for a user when a message is delivered to them, for example, if you want to mark that a message has been sent. This message part acts as an "invisible attribute" which can be assigned to a user when they trigger a specific message. Read how to do this here.


Recalling and retrieving attributes

Recalling attributes back to the user

Once you’ve managed to store data against a flow user you can then retrieve it to use it in another message sent to a flow user. Let’s say you used the attribute “{{$feedback}}” when storing a response saved via a Q&A. You can then use the value saved to that attribute in another message by simply typing in {{. This will then launch a small menu, displaying all the attributes in your flow:

Data download

If you want to view all the attributes and values saved by your flow, you can export all the saved data as a CSV. Find out more about how to download data here. 

 

Managing attributes

You can keep track of all the attributes used in your flow in the "Manage attributes" section of the platform. You can find out more about that here. 

 

Clearing attributes

If you are creating a flow that the user will go through multiple times, you may need to reset your attributes to clear whatever was saved from the last journey. You can do this by using the "Clear user attribute" message part:

 

In the "Clear user attribute" settings, choose the attribute you want to clear and hit save. If you want to clear multiple attributes, hit the ‘+’ icon to add another attribute to be cleared:

 

You’ll then see a clear attribute part with your settings configured:

The flow user will not see this. Any values set in this message part will then clear when a user triggers that message.

 

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.