Build a Workflow

Key Components

  1. Workflow Steps (see more about each workflow step here)

  2. Data

    1. Create a Variable

    2. Start Variables

    3. Insert a Variable

    4. Send Variables

    5. Collect Variables

  1. Logic

    1. Conditions

    2. Loops

Data

We use variables to pass data from one step to another in the workflow. Variables are placeholder text for values that are collected during the workflow from a person or an App. Below we will look at how variables are used in the workflow.

Create a Variable 

Each variable created in the workflow has a:

  1. Name

  2. Type - Supported types include 

    1. String

    2. Number

    3. Boolean

    4. JSON Object

  3. Required (T/F)

  4. Is a List (T/F)

Start Variables

Start Variables are variables needed to kick off a workflow. They also can be used to collect data from a person or a 3rd party system.


If a workflow is kicked off using an API, start variables need to be sent as request parameters.

If a workflow is kicked off from a guided conversation, start variables need to be collected through chat.

If a workflow is started manually, start variables will be presented as a form that needs to be filled out. 


Insert a Variable

Insert variables collected up until that step in any text field or input box using the lightning bolt icon.

Sub fields of a JSON object can be inserted in double curly braces - {{var_name.key1}}, {{var_name.key1.sub_key1}} etc.

Figure: Variables used to send a dynamic Broadcast email message


 Figure: Variables used to send email Broadcast to dynamic recipients

Send Variables

In addition to using variables in text fields and input boxes, you can send workflow variables to be displayed in a Ticket or used in a Guided Conversation from the Variables tab. 

Collect Variables

Wherever you need to manually collect data, use Collect Variable to collect data from a Ticket

or a Guided Conversation. Collected data needs to be manually filled out in a ticket and collected from an end user during chat in a Guided Conversation.


Logic

While executing steps one after the other, we often want to take a conditional action, or skip some steps or repeat a set of steps. Workflow logic lets us do all of the above with simple no-code visual elements.

Logic can be added by right clicking on an edge.



Conditions


Edge Conditions let the workflow decide which paths to follow and which to ignore. 

A set of outgoing edges from a node can have a condition or a fallback. 

The fallback path is taken when none of the other edge conditions evaluate to true. If one of the edges has no condition it will always be true and the path will always be followed. 


Figure: Edge Conditions

 

Figure: Edge Conditions

 


Loops

Loops in the workflow let you repeat a set of steps. 

A loop is treated like a special sub-workflow. Loop sub-workflow has its own start and end nodes and a set of steps in between that are repeated. 

We only support looping on a list right now. The loop runs for each item in the list.


Loop settings

  • List Input - List to loop over

  • Item name - Variable to reference an individual item in the list inside the loop

  • Run Parallel Actions (True/False) - If checked, the loop subworkflow is kicked off for all the items in the list at the same time. Otherwise, the loop subworkflow is kicked off one after another.


 Figure: Loop Settings

 

Once the loop has the right settings, you can “Open Loop” and build the loop subworkflow. 

Figure: Loop sub-workflow


Was this article helpful?