Scope of attributes and metadata

(Hayden Saunders) #1

Hi there. I’m getting up to speed with FlowXO and enjoying the tool. I keep getting tripped up with the scope of attributes and metadata though.

What is the scope of an Attribute?
Initially I assumed attribute scope was limited to an action, since each action has it’s own Attributes menu option when you type “{{” to select an output value. So I expected that I could sett an attribute called “myAttr” on an action and each action would have it’s own, separate value for “myAttr”. But after some experimentation it seems like there is just a single attributes collection that is persistent and accessible across all actions and flows within a bot user’s session. Is this the right interpretation?

Also - what is the scope of Metadata?
Once I grasped the global nature of attributes I thought Metadata would behave the same way. But it seems Metadata is only available for the execution of a single flow. So if you pass in some metadata from another flow or via the setConfig API method, this is only available for the execution of the flow that is triggered. If you want to use the initial metadata from the trigger in a different flow, you need to specify which metadata fields to pass into the new flow, otherwise they won’t be available. Is this the right interpretation?

Thanks for the help

(Daniel Beckett) #2

Hi @hsau

An attribute is stored against a user’s response path which is a unique link between the user and the bot. This is persistent across sessions and flows.

The Users Section will have a list of any saved attributes for your users.

Metadata is pretty similar to attributes but as you’ve noticed is only available in the flow that it is passed into. If you need to make any Metadata a permanent value for the user than it’s best to save it as an attribute.

(Hayden Saunders) #3

Wonderful thanks Daniel. Got it.