Dynamic Node

The Dynamic Node is used to create dynamic nodes based on some logic written in JavaScript.

circle-exclamation

You need to write body of a function which takes user as parameter and returns list of nodes or actions as a response. Below is the format of function.

function getNodes(user) {
    //your logic goes here
    return {
        nodes:[]
    };
}
return getNodes(user)

You can also return actions as response. Below is an example

return{
actions : [{
type : 'ADD_CONTEXT_VAR',
key : 'full_name',
value : user.context.first_name + ' ' + user.context.last_name
}]
}

You need to write only body of the function. To refer to the complete user object with all of the fields please check go to this linkarrow-up-right.

the function should return nodes in required JSON format. Below is the format of json for each type of nodes. Please note that all nodes are not supported here. Below are nodes which are supported.

Add and send data

Collect User Data

Last updated