/
Contextual Data

Contextual Data

Quick links in this article:

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!

[View full list]

This data will then be stored, ready for you to use in your flows. You can access contextual data via the ‘Explore’ menu.

image-20240607-121956.png
The ‘Explore’ menu for contextual data

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

[back to top]

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

Using outputs

  • Action outputs are only guaranteed within the same flow where they’re created.
    (If you want to use the data in a later flow, store it to a Custom Field against the interaction first.)

  • Some outputs are simple — just a single piece of data.

  • Others are complex — containing multiple pieces of structured information. When an output is complex, you can still access specific parts of it, you just need the shortcode format.

  • See Actions for information on the outputs to expect from each action.

Entity Recognition scans a customer message and pulls out several types of information, saving them into different parts of the output.

After running an Entity Recognition action, you could access outputs like:

  • EntityRecognition.Output.Event — Any events mentioned (e.g., a concert name)

  • EntityRecognition.Output.PersonType — Any people or roles detected (e.g., "delivery driver")

  • EntityRecognition.Output.Location — Any places mentioned (e.g., "London")

  • EntityRecognition.Output.Organization — Any organisations found (e.g., "Gnatta Ltd.")

  • EntityRecognition.Output.Product — Any products mentioned (e.g., "TRK-3000 Shoes")

  • EntityRecognition.Output.Url — Any links included by the customer

Each of these sub-outputs can be used individually in your flow — you don't have to use the whole output at once.

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

[back to top]

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

custom variables.gif
Add a new custom variable

Accessing custom data fields

[back to top]

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 crosscheck the ‘GUID’ for any data field by going to Advanced > Dynamic Data > Your field name. The GUID is displayed at the bottom of the panel on your selected field.

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

store feedback.gif
Collecting the value of a ‘Chat Rating’ custom field in a chat conversation to store in the interaction

Context glossary

[back to top]

To view a full list of all the available contexts in the main library (available via the Explore menu), check the context glossary here:

Related content