Skip to main content

Logic Flow

The logic flow in the settings.json files is the brains behind telling your form which step should come next. It allows you to create a customizable experience to make content more relevant to your users. The logic flow applies rules that control when each of the steps should show upon navigation. It's what holds all of the navigation logic.

There are three different flows, with two exclusively for appointment booking.

  1. normal
  2. cancel - appointments only
  3. reschedule - appointments only
{
"flow": {
"normal": {},
"cancel": {},
"reschedule": {}
}
}
note

Each action name in a logic flow must match one of the step's names. The logic for a particular step is encapsulated in the flow object with a key that matches the step name.

{
"steps": {
"example_step": {...},
"another_step": {...}
},
"flow": {
"normal": {
"example_step": {
"actions": [
{
"next": "another_step"
}
]
},
"another_step": {...}
}
}
}

Loading ....

Flow Types

The normal flow contains primary logic for each step. The normal flow is the primary default flow that handles step navigation logic.

Example

In this example, we ask two questions before starting the booking flow, as shown in the Flow Chart.

info

The order of the services, staff, and locations steps happen doesn't matter as long as they appear before the availability step.

There can even be non-booking steps between the booking steps in the flow as shown in the example below.

  {
"flow":{
"normal": {
"employee_count": {
"actions": [
{
"next": "solution"
}
]
},
"solution": {
"actions": [
{
"next": "services"
}
]
},
"services": {
"actions": [
{
"next": "staff"
}
]
},
"staff": {
"actions": [
{
"next": "locations"
}
]
},
"locations": {
"actions": [
{
"next": "availability"
}
]
},
"availability": {
"actions": [
{
"next": "appointment"
}
]
},
"appointment": {
"actions": [
{
"next": "finish"
}
]
}
},
"reschedule": {...},
"cancel": {...}
}
}

Flow Actions

Each step can have a flow action. These actions can recall information based on what values the user selected.

note

The list of actions is evaluated in order from first to last.

Next Logic

Actions in their simplest form instruct the app to navigate to the next step in the sequence by using the "next" action.

Example
{
"flow":{
"normal": {
"solution": {
"actions": [
{
"next": "finish"
}
]
}
},
"reschedule": {...},
"cancel": {...}
}
}