Custom Variables
Quick links in this article:
In this article, we’ll explore the use of custom variables in Gnatta. Unlike a custom data field, these variables are a placeholder for a static value, and can be inserted into your Workflow content and decisions to centralise commonly used data and information.
What is a variable
A 'variable' in software is a piece of memory that stores a value that can change, and is essential to most modern computing functions. It might be useful to think of a variable as a box or container that holds information. The most critical function of a variable is that when you change it, that change is made everywhere you’ve used the variable.
In Gnatta, variables are used to contain strings of text (or numbers). Using variables instead of directly typing your content everywhere is an extremely useful way to make your contact centre automations more robust. For example, if you use a variable to dynamically insert your phone number instead of ‘hard-coding’ it into each autoresponse it’s needed in across all of your Workflows, then a change to your number is as simple as updating a single variable. No more loose ends, or accidental misinformation when your processes change!
We’d recommend creating variables for any commonly used information - such as your company contact details, delivery timelines, opening hours and more.
Where to use variables
The use cases for variables in Gnatta include:
Sending Autoresponses - you can reference a variable in a
Send Autoresponse
action, inserting it via the Contextual data explorer. For example, if you used a variable to store yourDeliveryTime
as ‘5-7 working days’, you could insert that into every autoresponse where you need it. Then, if your delivery timescales change due to a supply chain failure (at Christmas, for example!), you can update that variable to ‘as soon as possible’ - and the change will be made everywhere.Global Switches - you can centralise control for important decisions in your flows by using a variable as a global switch to change multiple processes at once. For example, you might create a variable called
WebsiteIssues
and set the value to ‘NO’. Then at the top of your flows you would add aDecision
which checks if the value forWebsiteIssues
is still ‘NO’ before continuing, creating an alternative flow of actions if it finds the value to be ‘YES’. Then, should your website go down, you can globally switch all of your flows to a new set of actions and response by changing thatWebsiteIssues
variable to ‘YES’, because it’s referenced at the top of each flow.Content Placeholders - you can reference a variable in your Content Responses - just like sending Workflow autoresponses, this is a useful way to manage information used across your operation without needing to update it everywhere.
Variables are accessed in Workflow via the Contextual data explorer - more on using contextual data here: Contextual Data
Create a variable
To create a variable (or manage an existing one), navigate to Configuration > Advanced > Variables
. Click + Add
to create a new one.
You can then give your Variable a Name and a Value. We’re going to setup a variable for DeliveryTime
, as follows.
Variable names should be text only, with no special characters or spaces. We’d recommend using a naming convention with a pattern if you’re creating lots of variables, to keep things tidy! For example, preceding all contact detail variables with ‘Contact’.
Click Save and your Variable will be added to the list. You can select your Variable from the list to delete it or make edits to the name and value.