Contextual Data
What is it?
Gnatta automatically detects a huge range of data around every event that occurs in your domain. For example, if a new message is received, Gnatta won’t just collect the message body, it’ll also check for a:
Timestamp
Sender
Recipient
Channel
Attachments
Subject Line (if it’s an email)
etc!
This data will then be stored, ready for you to use in your flows. You can access contextual data via the ‘Explore’ menu.
Event relationships
When a Workflow event in Gnatta is triggered, as described above Gnatta will collect a range of ‘contextual’ data relevant to that event. The types of data that can be collected varies depending on the event itself. Check which events collect which context categories in this article:
Action outputs
Lots of actions in the flow builder will ask you for an ‘output name’, such as CreateConversation.Output
in the screenshot above. When the flow is triggered, the outcome of that action will be stored in that output variable. Later in your flow, you can then select it from the ‘Explore’ contextual data menu and insert the output as required.
For example: a Find Text
action output will store the result of your text search in the output with a label like ‘FindText.Output’. Later, in an Update Interaction
action, you can preset a data field on the interaction with your FindText.Output - thus automatically validating and updating custom data fields for the agent! See the following article for a worked example on this: Updating Data Fields
Action outputs should be used within the same flow in which they are generated. If you want to use an action output on a sequential flow, we’d suggest storing it in a custom field against the interaction.
For some actions, the output may contain a relatively complex selection of data - not just a single object or piece of content. You can access specific parts of that action output by referencing the relevant shortcode subsection (if you know it!).
Confused? Don’t worry, this is one of the most complicated (and important) concepts in Gnatta - once you’ve cracked it, you can be confident you know your contact centre system better than most. Please get in touch, we’d love to talk it through with you.
Creating custom variables
In addition to all of the useful data Gnatta stores for you, you can define a custom variable which will appear under the ‘Variables’ category in the ‘Explore’ menu. This is often useful to make sure typos and human error don’t cause an issue in your flows or integrations! Define a custom variable by going to ‘Advanced’ and then ‘Variables’ in your Gnatta domain.
For more information on using variables, check: Custom Variables
Accessing custom data fields
To use custom data in your flows, you need to look out for the contexts with .Data
at the end - or in the context glossary, any contexts that have [GUID]
at the end of their shortcode.
When you select one of these in the Builder, you’ll reveal a submenu containing the custom data fields on your domain. Selecting a data field will insert the ID for that field into the square brackets, and tell Gnatta it needs to check that field for a value. For example, WebChatData[e387da57-d10c-44f6-b631-fca8b69dfed0].
You can access custom data in multiple Context categories - this is because the data may not yet be present depending on how or when the flow is triggered. Be sure to use the right category depending on the flow you’re using - i.e. if you’re checking a conversation before creating an interaction, you’ll need to look at Conversation Data, not Interaction Data. For more information on which contexts are available on specific events, check here: Event Contexts
Context glossary
To view a full list of all the available contexts in the main library (available via the Explore menu), check the context glossary here: