Skip to content

Business Logic

Use rules and logic expressions in order to dynamically determine the next element. Use jsonLogic syntax to note business logic in json messages. Place jsonLogic notation in attribute jsonLogic. You can create a list of logical expressions each with a unique name that is used in the successor.

Example:

If userAge in user context > 18 then trigger element promote-nightclub .

{
    "successor": "businessLogic[logicGuestName]"

    "businessLogic": {
        "logicGuestName": {
            "jsonLogic": {
            ">": [
                {
                "var": "userAge"
                },
                18
                ]
            },
            "true": "promote-nightclub",
            "false": "promote-cinema"
        }
        }

}

The same logic can be applied to successor attributes in quick-reply buttons.