Skip to main content

Passing data between steps

You can reuse data created in a previous step of your flow. This page explains how to pass data between steps.

Signicat Mint allows you to persist state from one step of a flow to use in subsequent steps. In any step you can import data created in a previous step. This allows you to perform actions such as prefilling a field in a step configuration, reusing data or displaying data back to the end-user.

Data created in a step is stored in key-value objects within the Mint engine, thus allowing you to retrieve the value of the object by referencing its key in any downstream steps within the same flow.

Advanced mode

By default, you can pass most data types, such as text, email and numbers, between steps. When dealing with data in other formats, such as lists or dictionaries, use Advanced mode.

How it works

Any data created when you run a step persists as a data object for the duration of the session. The following events can create data that you can then pass to subsequent steps:

  • End-user input in the user journey
  • Setting variables
  • The output of a (background) step

To access data from a previous step, you specify the key of the data object as input in the step configuration. When you run the flow, the value (that corresponds to the key) will be used.

You reference a data object from a previous step by using the format StepTitle.Key, where:

  • StepTitle is the title of the upstream step.
  • Key is the key or label of the data field you want to invoke.
Key format for nested objects

Some steps may create data that is organised into nested structures. Note that keys of nested objects use the following syntax: StepTitle.Field1.Field2...Key, where FieldN represents nested levels.

How to pass data into a step

When passing data from a previous step, you always reference the data object in the same way, regardless of the type of step that created the data.

When configuring a step, you can view all the data available for importing by clicking on any input field. Clicking expands a dropdown where you can select the key from the available items.

In the following example, the "Value" field inherits data from a previous step, with title "Submission form" and key "Email". When the flow runs, the step will use the value stored in the "Email" field (an email address).

How to input data from a previous step

How to input data from a previous step

The sections below show examples of passing data created by different sources or types of steps. Note that you always import data in the same way regardless of the source.

Passing data using end-user input

You can pass data that you receive from the end-user during the user journey. For example, when you create a webform (using the Form step), you can pass the data submitted by the end-user in the form to subsequent steps in the flow.

For example, you could ask your end-users to submit their email address so that you can send them email messages.

To store an email address (or any other data) in a webform and use its value in a subsequent step, do the following:

  1. In the Builder UI, add the Form step to your flow.
  2. Add the Email element inside the Form step.
  3. In the Builder UI, add the Communication > Send Email step.
  4. Click the input box under To to expand the dropdown with all available input data. Select "Form.Email" from the list and select the plus icon (+) to add the key.
  5. Then, fill in the other fields to complete the step configuration.

You have now created a webform for the end-user to submit an email address during the user journey. Then, you pass the value into the next step that sends an email to the address submitted previously. Note that the above is an example and that you can apply the same logic to any other type of step.

Passing data using variables

The Set variable(s) step allows you to declare and store variables directly in the flow configuration.

To store a variable and reference it in a subsequent step, do the following:

  1. In the Builder UI, add the Set Variables or Set Variable step to your flow.
  2. Enter "URL" in the Key field and set the Value to https://www.example.com.
  3. In the Builder UI, add the Signicat > Redirect user step.
  4. In the step configuration, click the input box under Redirect URL. Then, select "Variables.URL" from the list.

You have now set a variable and passed its value into another step. In the user journey, the end-user will be redirected to https://www.example.com.

Passing data using a step output

You can pass any data created in a previous step, including steps that run in the background, such as when retrieving data from a registry or authenticating the end-user.

In the following example, the Organisation Basic info lookup step returns information about an organisation, given the country and the organisation ID. Then, the Create DEM record step takes the data retrieved by the upstream lookup step and stores it in the Signicat Digital Evidence Management (DEM) database.

To reproduce this, do the following:

  1. In the Builder UI, add the Organisation basic info lookup step to your flow.
  2. Enter "no" in the Country field and "989584022" in the Organisation ID field.
  3. In the Builder UI, add the Create DEM record step.
  4. In the step configuration, do the following:
    1. Set Record type to KYC.
    2. In the Metadata section, set Key to "org_lookup" and import "Organisation basic info lookup.organizationNumber" in the Value.
  5. In the Core data field, do the following:
    1. Set Key to "Name" and import "Organisation basic info lookup.name" in the Value.
    2. Select + Add entry to add a new key-value. Set Key to "Address" and import "Organisation basic info lookup.businessAddress.city", then type a colon "," and import "Organisation basic info lookup.country.alpha2" to fill in the Value.

Your configuration would look as shown below:


After you save, publish and execute (either through the API or by opening the workflow URL in a web browser) your flow, you can access the record in the Signicat Dashboard > DEM. The DEM record will contain the values obtained in the Organisation basic info lookup step:

...
"metadata": {
"org_lookup": "989584022"
},
"systemMetadata": {
"type": "KYC",
...
},
"coreData": {
"name": "SIGNICAT AS",
"location": "TRONDHEIM, NO"
},
...

Advanced mode

To perform more complex data transformations within a step, you can enable Advanced mode for any input field. Signicat Mint integrates the Liquid template language, which lets you create conditions, loops and filters to further process complex data objects in any input field.

With Advanced mode, powered by Liquid, you can:

  • Reference data objects enclosed in double curly braces {{ and }}, such as {{Variable.name}}
  • Use Liquid Tags by using the curly brace percentage delimiters {% and %}.

Using Advanced mode

To activate and use Advanced mode in an input field, do the following:

  1. In a step configuration, select the Advanced icon above an input box.
  2. Enter a valid Liquid expression.

In the following example input configuration, the input field is set to "Advanced". Then, the liquid expression:

{% for i in (1..5) %}{% if i == 4 %}{% break %}{% else %}{{ i }}{% endif %}{% endfor %}

returns integers between 1 and 5 but stops when 4 is found.


Passing data using Advanced mode

In the following example, the Add to List Variable step builds an array with two items. Then, the Form step, loops over the array and displays the items in a text element.

To do this in a new flow:

  1. Add the Add to List Variable step.
  2. In the step configuration, set the Key to "list" and the Value to 1.
  3. Add another Add to List Variable step.
  4. In the step configuration, set the Key to "list" and the Value to 2. Note that you must use the same key as in step 2 to add items to the same array.
  5. Add the Form step. In the step configuration, add a Text element.
  6. In the Value of the Text element, select Advanced mode to activate it. Then, enter the following Liquid expression: {%for item in Variables.list%}{{ item }}{%endfor%}.

After you save, publish and run the flow, the webform will display the items of the list variable in the user journey.

Using Advanced mode to display list items in a webform.

Using Advanced mode to display list items in a webform.