Contextual Data
What is it?
Gnatta automatically detects a huge range of potential 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.
Action outputs
Lots of actions in the 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.
For example: a ‘Create Conversation' output will store the entire conversation in a variable with a label like ‘CreateConversation.Output’. Later, in a ‘Create Interaction’ action, you can add the conversation you’ve created by selecting the output you stored earlier in the flow!
Action outputs will only persist for the lifetime of the event that triggered them. That means they’ll be available on any sequential flows that are triggered after the one they’re created in. If you want to use an action output on a sequential flow, be sure to make a note of the Output Name. Alternatively, you can store it in a custom field against the interaction.
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: https://gnatta.atlassian.net/wiki/spaces/HELP/pages/2431647755
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 table below, 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.
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.
Context glossary
Below is a list of all the default contextual data types currently available in Gnatta. You may spot contexts with the same name in multiple categories, such as ‘Channel Name’. This is because the values can be different, depending on the object the data is associated with. Make sure you’re picking your context from the correct category to protect the logic of your flow.
Account Rule
In Gnatta, an ‘account rule’ refers to the stream or segment of the media account being used. For example, you might have an account called ‘Escalations Email’. Within that account you might have two streams for ‘Inbox’ and ‘Sent’. Each ‘stream’ is a rule.
All of the contexts below refer to data associated with the account rule triggered by the flow.
Name | Shortcode | Data |
---|---|---|
Account Channel Name | Rule.MediaAccount.Channel | The name of the channel connected to the account rule i.e. Email |
Account Id | Rule.MediaAccount.Id | The ID of the media account connected to the account rule. |
Account Name | Rule.MediaAccount.Name | The name of media account connected to the account rule i.e. ‘Escalations Email’ |
Rule Id | Rule.Id | The ID of the account rule in use. |
Rule Name | Rule.Name | The name of the rule in use i.e. ‘Escalations Email - Inbox’ |
Conversation
A conversation is a collection of messages (such as individual text messages connected to create an SMS conversation). Each conversation is specific to one channel. Multiple conversations grouped together create an omnichannel interaction.
All of the contexts below refer to the single conversation that is triggered by a flow.
Name | Shortcode | Data |
---|---|---|
Conversation Message Count | Conversation.MessageCount | A numerical count of the messages within the conversation. |
Call Answered Time | Conversation.CallAnswered | A timestamp of the time the call was answered. |
Call Ended Time | Conversation.CallEnded | A timestamp of the time the call was ended. |
CC’d Email Addresses | Conversation.CC | An array (list) of all the email addresses CC’d to the conversation. |
Channel | Conversation.Channel | The channel name (i.e. email, SMS, Facebook etc.) that a conversation belongs to. |
Channel Account Id | Conversation.MediaAccountId | The Id of the media account the conversation is connected to. |
Chat Email Address | Conversation.Person.Webchat.EmailAddress | The email address associated with the chat conversation. |
Chat Name | Conversation.Person.Webchat.Name | The name of the person who initiated the chat conversation. |
Content | Conversation.Content | An array of all the Gnatta content responses used in the conversation. |
Conversation Data | Conversation.Data[GUID] | Collects the value from your custom data field. |
Conversation Id | Conversation.Id | The ID of the conversation. |
Conversation Message Count | Conversation.EchoCount | A numerical count of the messages associated with the conversation. |
Related Public Post Id | Conversation.InReplyTo | The ID of a public post the current conversation is replying to in private. |
Email Address | Conversation.Person.Email.Address | The email address of the person associated with the conversation. |
Email Conversation Recipients | Conversation.To | An array of all the ‘To’ email address recipients for the conversation. |
Email Name | Conversation.Person.Email.Name | The name of the person associated with the email address on the conversation. |
Email Subject | Conversation.Subject | The subject line of the email conversation. |
Facebook Conversation Id | Conversation.FacebookConversationId | The ID of the Facebook conversation. |
Facebook Person Id | Conversation.Person.Facebook.FacebookId | The ID of the person connected to the Facebook conversation. |
Facebook Name | Conversation.Person.Facebook.Name | The name of the person connected to the Facebook conversation. |
Gnatta Person Id | Conversation.Person.Id | The Id of the person associated with the conversation. |
Is Conversation Private | Conversation.IsPrivate | Returns a ‘true/false’ value depending on whether the conversation is private. |
Instagram Username | Conversation.Person.Instagram.Username | The username (@ handle) of the person connected to the Instagram conversation. |
Last Message Timestamp | Conversation.LastInboundEcho | A timestamp of the time the last message was received. |
Phone Number | Conversation.Person.Phone.PhoneNumber | The telephone number of the person associated with the conversation. |
Facebook Post Id | Conversation.PostId | The ID of the Facebook post associated with the conversation. |
Facebook Reply Id | Conversation.ReplyId | The ID of the Facebook reply associated with the conversation. |
TrustPilot Review Id | Conversation.ReviewId | The ID of the Trustpilot reviews. |
TrustPilot Name | Conversation.Person.TrustPilot.Name | The name of the person associated with the TrustPilot conversation. |
WhatsApp Name | Conversation.Person.WhatsApp.Name | The name of the person associated with the WhatsApp conversation. |
WhatsApp Phone Number | Conversation.Person.WhatsApp.PhoneNumber | The phone number associated with the WhatsApp conversation. |
Interaction
An interaction is, simply put, a collection of conversations around a single customer issue. An interaction can contain conversations from any channel. Using interactions, instead of conversational ‘tickets’, helps you to create a single view of the problem at hand, and provide a more holistic solution for the customer.
Each of the contexts below refers to the data associated with the interaction triggered by the flow.
Name | Shortcode | Data |
---|---|---|
Assigned User Data | Interaction.UnitofWork.User.Data[GUID] | Collects the value from your custom data field. |
Assigned User | Interaction.Worker | The ID of the user assigned to the interaction. (Legacy - see Assigned User Id) |
Assigned User Forename | Interaction.UnitOfWork.User.Forename | The forename of the worker assigned, i.e. Joe |
Assigned User Id | Interaction.UnitOfWork.UserId | The ID of the user assigned to the interaction. (We’d recommend using this instead of ‘Assigned User’ to future-proof your flows). |
Assigned User Surname | Interaction.UnitOfWork.User.Surname | The surname of the worker assigned, i.e. Bloggs |
Conversation Collection | Interaction.Conversations | An array of all the conversations associated with the interaction. |
Current Inbound Channel | Interaction.ActiveChannel | Returns the current channel the interaction is in i.e. Email, Facebook etc. |
Data Group Id | Interaction.DatasetId | The ID of the data group currently assigned to the interaction. |
Interaction Assigned Time | Interaction.UnitOfWork.Started | A timestamp of when the interaction was assigned to an agent. |
Interaction Automated | Interaction.Automation | Checks if the interaction is in an Automation state i.e. true/false. |
Interaction Data | Interaction.Data[GUID] | Collects the value from your custom data field. |
Interaction Id | Interaction.InteractionId | The ID of the interaction. |
Interaction State | Interaction.InteractionState.State | Returns the current interaction state i.e. Queued, Automation, Closed etc. |
Interaction Unassigned Time | Interaction.UnitOfWork.Ended | A timestamp of when the interaction was unassigned. |
Last Inbound Contact Time | Interaction.LastInboundContact | A timestamp of when the last inbound message was received. |
Latest Conversation Id | Interaction.LatestConversationId | The ID of the latest conversation associated with the interaction. |
Previous Assigned User Data | Interaction.LastUnitOfWork.User.Data[GUID] | Collects the value from your custom data field. |
Previous Assigned User Forename | Interaction.LastUnitOfWork.User.Forename | The forename of the previous worker assigned, i.e. Jane |
Previous Assigned User Id | Interaction.LastUnitOfWork.User.Id | The user ID of the previous user assigned to the interaction. |
Previous Assigned User Surname | Interaction.LastUnitOfWork.User.Surname | The surname of the previous worker assigned, i.e. Johnson |
Previous Interaction Assigned Time | Interaction.LastUnitOfWork.Started | A timestamp of the last time the interaction was assigned. |
Previous Interaction Unassigned Time | Interaction.LastUnitOfWork.Ended | A timestamp of the last time the interaction was unassigned. |
Profile Data | Interaction.Profile.Data[GUID] | Collects the value from your custom data field. |
Profile Id | Interaction.Profile.Id | The ID of the profile associated with the interaction. |
Profile Name | Interaction.Profile.Name | The name of the profile associated with the interaction. |
Profile Orignators | Interaction.Profile.Originators | An array of originator IDs used to create the profile that is associated with the interaction. |
Queue ID | Interaction.QueueId | The ID of the queue the interaction is assigned to. |
Time Interaction Added | Interaction.Added | A timestamp of the time the interaction was added to the queue. |
Time Interaction Closed | Interaction.Closed | A timestamp of the time the interaction was closed. |
Message
A message is a single piece of communication from a customer. Multiple messages (for example, a series of texts) create a conversation. Multiple conversations (for example, an SMS conversation and a phone call) create an interaction.
Each of the contexts below refer to data associated with the individual message triggered in the flow.
Name | Shortcode | Data |
---|---|---|
Attachment Names | Echo.AttachmentNames | An array (list) of names of all the files attached to the message. |
CC’d Email Addresses | Echo.Cc | An array (list) of all the email addresses CC’d to the message. |
Channel Id | Echo.ChannelIdentifier | The enum (ID) of the channel the message belongs to. |
Channel Name | Echo.Channel | The channel name (i.e. email, SMS, Facebook etc.) that the message belongs to. |
Chat Email Address | Echo.Person.Webchat.EmailAddress | The email address associated with the chat message. |
Chat Name | Echo.Person.Webchat.Name | The name of the person associated with the chat message. |
Email Address | Echo.Person.Email.Address | The email address associated with the message. |
Email Message Importance | Echo.Importance | The importance rating of the email message i.e. High or Low. (This refers to email client functionality - see: https://support.microsoft.com/en-gb/office/mark-a-message-as-high-or-low-importance-44be4160-d3d9-4f26-97bd-46359b845ae3 ) |
Email Message Recipients | Echo.To | An array of all the ‘To’ email address recipients for the message. |
Email Message Sender | Echo.From | The email address the message was sent from. |
Email Sender Name | Echo.Person.Email.Name | The name of the person who sent the email. |
Email Subject | Echo.Subject | The subject line of the email message. |
Facebook Person Id | Echo.Person.Facebook.FacebookId | The ID of the person connected to the Facebook message. |
Facebook Postback | Echo.Postback | The ID of the Postback on the Facebook message. |
Facebook Name | Echo.Person.Facebook.Name | The name of the person connected to the Facebook message. |
Full Email Thread | Echo.FullBody | All of the text contained in an email thread, as well as the latest email. |
Gnatta Content | Echo.Content | An array of all the Gnatta content responses used in the message. |
Gnatta Person Id | Echo.Person.Id | The Id of the person associated with the message. |
Instagram Username | Echo.Person.Instagram.Username | The username (@ handle) of the person connected to the Instagram message. |
Is Instagram Message Private | Echo.Private | Returns a ‘true/false’ value depending on whether the Instagram message is a DM or public comment. |
Is Inbound Email Message Auto Response | Echo.AutoResponseDetected | Returns a ‘true/false’ value depending on whether the inbound email is an autoresponse. For example, an out of office reply. |
Is Message Automated | Echo.IsAutomated | Returns a ‘true/false’ value depending on whether the message is automated. |
Is Message Private | Echo.IsPrivate | Returns a ‘true/false’ value depending on whether the Facebook message is private or not. |
Message | Echo.Body | All of the text contained in the message. |
Message Id | Echo.Id | The ID of the message. |
Facebook & TrustPilot Referral Source | Echo.Source | The source of the message in traditional traffic source terms i.e. Web or Referral etc. |
Message Type | Echo.Type | The type of message received. Values vary between channels. Examples include: Story Mention, Comment, Reply etc. |
Outbound Message Sender | Echo.Sender | The User ID of the person who sent the message. |
Phone Number | Echo.Person.Phone.PhoneNumber | The telephone number of the person who sent the message. |
Time Message Created | Echo.Created | A timestamp of the time the message was created. |
TrustPilot Review Referral Email | Echo.ReferralEmail | The email address associated with the TrustPilot review. |
TrustPilot Review Title | Echo.Title | TrustPilot review title. |
Trustpilot Name | Echo.Person.TrustPilot.Name | The name of the person associated with the TrustPilot review. |
Trustpilot Reference Id | Echo.ReferenceId | The reference ID of the TrustPilot review. |
Trustpilot Review Rating | Echo.ReviewRating | The 1-5 numerical star rating of the review i.e. '4' |
Trustpilot Review Tags | Echo.ReviewTags | An array of tags associated with the TrustPilot review. |
Trustpilot Review Tags | Echo.Tags | An array of tags associated with the TrustPilot review. (Legacy - please use Echo.ReviewTags) |
WhatsApp Name | Echo.Person.WhatsApp.Name | The name of the person associated with the WhatsApp message. |
WhatsApp Phone Number | Echo.Person.WhatsApp.PhoneNumber | The phone number associated with the WhatsApp message. |
Note
Notes are stored in the interaction, visible to users but not to the customer. The contexts below refer to data stored against the note in the flow that was triggered.
Name | Shortcode | Data |
---|---|---|
Note Author | Note.UserId | The User ID of the author of the note. |
Note Created Time | Note.Created | The timestamp of when the note was created. |
Note Text | Note.Text | The body text of the note. |
Profile
Customer profiles in Gnatta refers to a collection of interactions, accumulated over the course of your relationship with a customer. Each interaction should be an independent issue. A profile should therefore help you to understand the evolution of that customer’s journey, and extract deep insights regarding the customer experience, lifetime value and more. All of the contexts below refer to the customer profile in the flow that is triggered.
Name | Shortcode | Data |
---|---|---|
Profile Data | Profile.Data[GUID] | Collects the value from your custom data field. |
Profile Id | Profile.Id | The ID of the profile. |
Profile Name | Profile.Name | The name of the profile, set in a ‘Create Profile’ action. |
Profile Person Collection | Profile.Originators | An array of originator IDs used to create the profile. |
Queue
A queue is a pot of work containing interactions. Typical setups organise their queues by channel, such as a ‘Webchat’ queue and a ‘Telephony’ queue. You order your queues by importance, to make sure the most critical queues are assigned to agents first. More on queue management here: https://gnatta.atlassian.net/wiki/spaces/HELP/pages/2431057959
Each of the contexts below refer to queue data on the interaction that was triggered in the flow.
Name | Shortcode | Data |
---|---|---|
Previous Queue Id | Queue.PreviousId | The ID of the queue the interaction was previously assigned to. |
Previous Queue Name | Queue.PreviousName | The name of the queue the interaction was previously assigned to. |
Queue Changed By | Queue.ChangedBy | The name of the user who changed the queue the interaction was assigned to. |
Queue Id | Queue Id | The ID of the queue the interaction is assigned to. |
Queue Name | Queue Name | The name of the queue the interaction is assigned to. |
User State
User State refers to whether your agents are available for assignation from your queues. More on configuring your custom user states here: https://gnatta.atlassian.net/wiki/spaces/HELP/pages/2430795846
Each of the contexts below refer to the user associated with the flow that has been triggered.
Name | Shortcode | Data |
---|---|---|
User State | UserState.State | The state name i.e. ‘Available’ or ‘Away’ etc. |
User ID | UserState.User | The user ID of the person who changed their state. |
Webchat Data
This group of contexts collects the information Pre-Chat Surveys, Post-Chat Surveys, and anything the agent might’ve filled in during the chat conversation. You can access this data to copy it to the interaction the chat belongs to.
Name | Shortcode | Data |
---|---|---|
Chat Data | WebchatData[GUID] | Collects the value from your custom data field. |