Jump to a section...
Overview:
This document gives an overview of Persistent Variables, what they are and how they can be used in your Koopid experiences.
Using Persistent Variables
There are different types of variables that can be used in workflows on the Koopid Platform. Some of them are reviewed in the Workflow Variables For Koopid Experiences, which goes over the common workflow variables such as System Variables, Input Variables, Customer Variables and Provider Variables.
This Tech Note covers Persistent Variables, or variables that can be carried throughout a customer’s session, and used across multiple bots, workflows and experiences.
Persistent Variables are very useful, depending how the information collected is going to be used. It can be helpful to access information entered in one workflow from a different workflow used later that is accessed through an intent instead of a direct connection like a GoTo between the workflows. When going through intents or opening up the input field to use intents to jump to another workflow, that clears the standard variables collected in the workflow. However, if you use a persistent variables, the information will persist across the intent jump to be called to in other workflows.
As an example, a customer can enter their data once and if the information is saved in persistent variables, if the customer leaves the first workflow and comes back later from a link they were emailed to kickoff the next workflow, they would be able to jump back into the workflow and the information entered earlier would still be available to access and use in the new flows they go through.
Example:
A standard variable is formed as {{wfName}} which is assigned using the assign variable component. This type of variable will only retain the information saved in it throughout one workflow, or workflows connected through GoTo nodes. This information will also not persist if you try to access it later after the user finishes the workflow.
If instead of using {{custname}}, if the variable was setup using the following format: customer.session.customername – the information saved in this variable could be called to throughout different workflows in the provider, in the same bot or different bots, that are kicked off through intents or through GoTo nodes, and would persist and display the information collected from the previous workflows until the user’s session ends – which is set to 30 days by default.
When assigning a new variable in a workflow, be sure to add customer.session as the prefix before the variable name to make it persistent, just like in the following example for: customer.session.variable1.
(click on images below for larger view)