Skip to main content

Apply conditional logic

Conditional logic allows you to branch your workflow into parallel routes, depending on a certain condition. Each branch runs only if its condition is met.

Conditional logic is useful to handle the different outcomes of an upstream step. For example, when looking up organisation data from a register, you depend on information being available from the source provider. If the data is found, you may want the workflow to proceed in one way; if not, it should follow an alternative path.

Conditional logic allows you define and manage separate scenarios within a workflow, thus ensuring successful completion of your workflows.

How it works

On a high-level, conditional logic involves the following:

  1. An upstream step that provides an output.
  2. A conditional logic node. This is a conditional fork that consists of:
    1. A logical condition to verify. The outcome can be either true or false.
    2. Branch 1: Step(s) to perform when the condition is true.
    3. Branch 2: Step(s) to perform when the condition is false.
Schematic overview of conditional logic in Mint.

Schematic overview of conditional logic in Mint.

When the Mint engine encounters a conditional logic node, it evaluates which route to follow depending on the condition(s) you defined. This follows the standard if/else pattern.

First, it checks if certain conditions are met. If true, it executes that route and skips the other. If false, it follows the other route.

Note that Mint supports nested conditional logic to build complex if/else if/else workflows.

How to add conditional logic

This tutorial shows how to apply conditional logic in the following scenario:

Workflow overview
  1. Build a web form where end-users submit their company registration number.
  2. Perform a lookup to verify the company registration number on a business registry.
  3. Add a conditional step with the following:
    1. Condition: Check if the company registration number exists in the registry.
    2. If true, display the name of the organisation.
    3. If false, redirect the user to the beginning to try again.

Prerequisites

To proceed with the tutorial, you must have completed the following initial preparations:

  1. Sign up to the Signicat Dashboard and register your profile. For more details, see the Get started with Signicat guide.
  2. In the Dashboard, make sure you have set up an organisation, an account and a domain.
    Sandbox and production accounts

    We recommend you create a sandbox account to test our services before going live. Sandbox and production accounts must be set up separately.

If you require assistance, you can contact us by creating a support ticket in the Dashboard.

Permissions

To perform the operations described in this page, you need to have access to the following products and permissions in the Signicat Dashboard:

  • Signicat Mint and any of the following permissions: Mint Workflow Builder Editor, Mint Editor or Mint Admin.
  • Data Verification and the data sources used in this tutorial.
Data sources

To manage your data sources in the Signicat Dashboard, go to Products > Data Verification. In production, you first need to activate the data source in the Signicat Marketplace or through an account manager.

0. Create new flow

With Mint you define all your operations inside a workflow. To create a new Mint workflow, do the following:

  1. In the Signicat Dashboard, go to Products > Signicat Mint.
  2. From the Mint sidebar, select Builder.
  3. Select Blank to create a flow without template.
  4. Enter a name and a description.
    What your end-users see

    The name and description of a workflow are visible to the end-users at the start of the user journey.

  5. Select Create flow.

1. Build a web form

The Form step allows you to create a web form where you can add modular elements, such as input fields or text boxes. These elements are visible and interactive in the user journey.

In your Mint workflows, you can use web forms to collect information from the end-users, such as their business registration number or email. Also, you can display text and provide instructions.

To add a Form with an input field for end-users to submit their business registration number, do the following:

  1. In the canvas, select the plus icon (+), then Step to add a new step.
  2. In the left "Steps" menu, select Signicat > Form to add an empty form.
  3. In the left "Elements" menu, select Special elements > Header. Then, select the item in the canvas and edit the Text field to Check organisation.
  4. Select "Back to elements" and in the menu choose Inputs > Text.
  5. In the left menu, edit the Label to "Company registration number".
Remember to save

After adding a step, it is important to save your flow to prevent losing any progress you made. To save a flow, select Save at the top right.

2. Add Organisation basic info lookup

The Organisation basic info lookup fetches information about an organisation like trade name, address, organisation type, legal status and industry sector.

To add this step to your flow:

  1. In the canvas, select the plus icon (+), then Step to add a new step.
  2. In the left "Steps" menu, select Data Verification > Organisation Basic info lookup.
  3. Configure the step:
    • Country: ISO 3166-1 alpha-2 country code where the organisation is registered. For example, no for Norway.
    • Organisation ID: Type or select the + (plus) icon and choose "Company registration number". For example, Form.Company registration number.
    • Source: Choose the data source to look up organisation data. For example, Brønnøysundregistrene Norway.
Background steps

Lookup steps run in the background, so end-users do not see nor interact with them in the user journey.


You can show a custom waiting message while the workflow continues by editing the Waiting message on the left Step options menu.

Data sources

To manage data sources in the Signicat Dashboard, go to Products > Data Verification. To use data sources in production, you first need to activate the data source in the Signicat Marketplace.

3. Add a conditional step

When looking up organisation data on a register, you rely on the data being available on the source provider side. Based on whether any data is found and retrieved, the lookup step may produce different outcomes. Inside the workflow, you can apply this logic:

  • If the organisation is found, then display its name.
  • If the organisation is not found, then show a web form with an error message and redirect back to the start.

Here's how to do it:

1. Define the condition

  1. In the canvas, select the plus icon (+), then Conditional logic.
  2. In the left "Conditional configuration" menu, do this:
    1. Step title: Edit to Check for organisation
    2. If: Define the following condition:
      • Organisation basic info lookup > Step outcome > Equals > Done
    3. Select Save in the left "Conditional configuration" menu.

2. Condition is True

  1. In the canvas, select the plus icon (+) inside the True path. Then, select Step and add a Form step.
  2. In the Form Elements menu, select Special elements > Text Block where to display the organisation name.
  3. In the canvas, select Placeholder to edit the text block element.
  4. In the left menu, edit the Text field to Company name: . Then, type or select the + (plus) icon and choose Organisation basic info lookup.name.

3. Condition is False

  1. In the canvas, select the plus icon (+) inside the False path. Then, select Step and add a Form step.
  2. In the Form Elements menu, select Special elements > Header. To explain that the company was not found, edit the Text field to Company not found. Try again..
  3. In the left menu, navigate to the Step options tab and edit the Submit button text to Try again.
  4. In the canvas, select the plus icon (+) under the Form in the False path. Then, add a Redirect user step.
  5. Select the More Options icon (more_vert) at the top right, then Copy workflow URL.
  6. Select the Redirect user window and paste the workflow URL as a Redirect URL so that you redirect the end-users back to the start of the user journey.

4. Save and Publish

Now, it's time to save, publish and share it with your end-users.

  1. Select Save at the top-right corner to persist your recent changes.
  2. Select Publish to publish the flow. Mint generates a public URL that you can share with your end-users. When you publish, the workflow URL is automatically copied to your clipboard.
Where to find the workflow URL

You can always find the workflow URL by selecting the More Options icon (more_vert) at the top-right corner, then Copy workflow URL.

5. Test a user journey

Once you have copied the workflow URL, you are ready to test a user journey. To do this:

  1. Open a tab on your browser and paste the workflow URL.
  2. Provide a company registration number. For example, try 989584022.
  3. Select Submit to end the user journey.
  4. Now, try again with an invalid company registration number, for example 123, to test the other scenario.
Success!

You have just completed a user journey with conditional logic.

View user journey results

You can find reports of all the finished, suspended and failed user journeys in the Dashboard > Mint > Journeys page. To learn more about the interface, visit the Mint Journeys documentation.

Next steps

Continue your journey with Mint: