Flow Connection

A connection is an object composed of a target, and some predicates.
It's used by jump to actions to define the different links.

The target is the destination of the connection: if all the predicates of the connection are validated, the conversation will continue through this target.
A target can be a step or an actions_block.

Attribute

Type

Required

Description

type

string

always flow_connection

target

object

target of the connection

predicates

array

a list of predicate objects

{
    "type": "flow_connection",
    "target": {
        "id": "a1a1a1a1a1a1a1a1a1a1a1a1",
        "type": "step",
        "name": "First step"
    },
    "predicates": [
        {
            "type": "connection_predicate",
            "condition": {
                "pattern": "^\d+$",
                "type": "match_regexp"
            },
            "valueGetter": {
                "key": "quantity",
                "type": "session_value"
            }
        }
    ]
}

Predicate

A predicate is the component that check if the connection can be triggered.

It is composed of :

A predicate matches when the value fetched by the value getter passes the condition.

Attribute

Type

Required

Description

type

string

always connection_predicate

condition

object

a condition object

valueGetter

object

a value getter object

{
    "type":"connection_predicate",
    "condition":{
        "pattern":"^\d+$",
        "type":"match_regexp"
    },
    "valueGetter":{
        "key":"quantity",
        "type":"session_value"
    }
}