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.

AttributeTypeRequiredDescription
typestringalways flow_connection
targetobjecttarget of the connection
predicatesarraya 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.

AttributeTypeRequiredDescription
typestringalways connection_predicate
conditionobjecta condition object
valueGetterobjecta value getter object
{
    "type":"connection_predicate",
    "condition":{
        "pattern":"^\d+$",
        "type":"match_regexp"
    },
    "valueGetter":{
        "key":"quantity",
        "type":"session_value"
    }
}