In this section, we will walk you through the programming concept of WOZTELL, so that you can apply your code to the Actions and Advanced mode of any node.
Node to Match
Stella will save the node a member is last in. Then, the child nodes of the current node, the global nodes of the current tree or the global nodes of the channel can be the nodes to be matched when the member has another input.
For your quick reference, child nodes are the nodes directly connected to the current node. Global nodes are nodes in the upper section of the tree view. Channel global nodes are selected in channel view.
Every matched node will be sorted by their priority, with the lower value comes first. The first matched node will then be executed. If there are more than 1 nodes with the lowest value, a random one will be chosen and executed. The default priority of a node is
0. The priority of a normal node doesn’t have an upper limit and can be set as low as
-9. Nodes with priority less than or equal to -10 is called a muted node and will be included in the documentation soon.
For a new user, the head node of all trees in channel, and the channel global nodes will be matched instead. Any global nodes which is selected in a channel can be triggered across a channel.
Processing of Tree Node & Global Node
When a node is matched, there is an order of execution from top-down as shown in the diagram below.
Please note that the
group fields will only be patched to the
member object in database after the execution of
Redirect and all the other node logic.
You may refer to the table below and find out how does a specific component (advanced) function in a node:
|Reference||Description||Order of Execution|
|Trigger||A node is matched by computing its trigger.||1|
|Pre-actions/Actions||An action is a Promise function that can be used for logics, internal database manipulation and external API calling. It runs before a response is sent.||2|
|Response||A response object or an array of response objects can be resolved by the “resolve” callback of the promise function. It contains the chatbot message.||3|
|Post-actions/Actions||An action is a Promise function that can be used for logics, internal database manipulation and external API calling. It runs after the response is sent.||4|
|Member Tagging||Stella will add tags to a member when the member is passing through a node with member tag is toggled on.||5|
|Analytics||When a node with analytics toggled on is executed for a member, either from trigger or redirect, an analytics event will be recorded.||6|
|Redirect||When a node is successfully executed and if the redirect of the node is toggled on, the redirected node will be executed next.||7|
"this" Scope, Reference & Methods
During a chatbot session, i.e. from the point Stella receives a message event, to the point where all subsequent redirected nodes are executed, Stella will store temporary data and other related functions in the
this scope. All changes in
this will be passed through all parts of the nodes and redirections.
Stella has a list of Reference documentation for any advanced function or reference object.
|Message Event||Message event is an object provided by the platforms which contain the information about the message, which can be accessed by |
|Node||Node is an object that exists in our database, which contains the information about the node, which can be accessed by |
|Member||Member is an object that exists in our database, which contains the information about the chatbot member, which can be accessed by |
|Channel||Channel is an object that exists in our database, which contains the information about the chatbot channel, which can be accessed by |
|Integrations||Integrations is an object that exists in our database and allows users to access related information regarding the integrations between Stella and available applications, which can be accessed by this.integrations.|
|Agenda Meta||Agenda Meta allows users to pass different data to nodes for the use of agenda. Users can use |
|Group||Available only on |
|Methods||These are the methods that can be accessed by |
|Radiate.js||You can make use of Radiate.js to create different interactions between your web and the web chat.|
Applying Advanced Functions to Chatbot
You can try applying the above methods & objects to your chatbot flow. Follow the documentations below and test out some functions!