How to use Data in journeys?

Neelke Stadler Updated by Neelke Stadler

Use data in journeys to build powerful chat experiences.

Journeys are designed to be simple to use, but powerful to create impactful chat service. Using data in no-code journeys raises the ceiling of possibilities.

The Data tab on the Journeys page allows you to create and update tables and dictionaries in your no-code journeys allowing you to create dynamic and personalise chat experiences.

Note: If you mainly use code journeys you've likely used variables already. The Data tab brings the power of variables to the no-code blocks.

Let's look at an example.

Before we dive into all the details, let's look at an example to help us talk about these concepts more practically.

You run a healthcare service and have a chat service where people can find information about clinics. You have a long list of clinics, each with detailed information including things like location information.

Using the data functionality in Journeys, you can create a global table with all your clinics' detailed information. You can also create a global dictionary of API keys to use across multiple journeys. Now, using the table of clinic details and the dictionary with API keys, you only require a simple journey to help customers learn more about a clinic, its services and finding its various locations. Without a central place to hold this information, you will need to copy and paste details many times. And it will be hard to create a great and dynamic chat experience for your users.

There are 2 parts to data in journeys

  1. Creating data
  2. Using data

How to create data

Data are used to store values. There are two types of data you can create, each used differently.

Global data

Global data is accessible to all journeys. It allows you to store things like API credentials in a central place that can then be used in multiple journeys.

Global data gets created in the Data tab.

Local data

Local data is specific to a single journey. This is a helpful way to create data that only gets used in one place, allowing you to keep your global data structures clean and organised.

Local data gets created in the Data side panel of a specific journey.

There are 2 data structures to choose from

When creating data you have the option to create a dictionary or a table.

Dictionaries

Dictionaries comprise of key-value pairs. There will always be common bits of text and values that you want to re-used between cards. Think of things like the welcome text on a button that takes one back to the main menu for example. It's often desirable to present these common elements in an easily editable place.

Dictionaries are great for this as they allow one to assign a name to a commonly reused element and provide a default value for it.

Tables

A common use-case when creating journeys is to store some content in a way that makes it easy to interact with from blocks. An example is a survey. The logic doesn't need to change if the content was updated to have fewer or more questions. We simply just want to go through all available questions one by one until all have been answered. Tables are great for these kinds of use cases. They have a unique name and function much like a spreadsheet, allowing one to specify columns with names and rows for each.

How to use data

Referencing your data is where the magic happens. Using the “@” symbol in the text editor or by typing it from your keyboard, you can reference any information from your local or global data. Even more than that, you are able to reference other internal data that’s available, such as information about the chat, the user's last message and/or responses to other blocks.

Was this article helpful?

How to use the Branch block in journeys?

Can I switch between code and no-code journeys?

Contact