Property | Description | Required |
---|---|---|
Tree | The tree you want to redirect to | Y |
Node | The node you want to redirect to | Y |
You can also click here to open the corresponding chatbot or node in a new tab.
There will be dotted lines to represent the Redirect relationships between general nodes.
There are Fine Tuning options to set actions after redirect, you could use the switch to toggle on or off for below actions:
By this time, you might have mastered the basic version of redirect which is quite straightforward. Toggle the redirect and the system will run the redirected tree node.
However, the basic might not cater all the chatbot use cases.
Let’s say there is a scenario where the live chat can only be toggled in a certain time period (office hour). In this case, the system cannot just redirect a user to the same live chat node. The system will need to do a checking before determining which tree node to redirect to. With the advanced version of redirect, you will finally be able to account for variable change (office hour) and redirect to different nodes based on different use cases.
When a node is successfully executed and if the redirect of the node is toggled on, the redirected node will be executed next. An advanced redirect is a Promise function. An object with treeId
, nodeCompositeId
, sendResponse
, runPreAction
and runPostAction
is resolved by the resolve
callback of the promise function.
treeId
and nodeCompositeId
are the Tree ID and Composite ID of the redirected node respectively. `is a boolean value that controls whether the responses of the redirected node are sent.
and
runPostActionare boolean values that control whether the
preActionand
postAction` of the redirected node are executed respectively.this
scope is also passed to the redirected node.For more details on the advanced chatbot concept & usage, you may visit here.
When you toggle the redirect in “Basic”, it is required to choose the “Tree” and “Node” you would like to redirect to. If you want to customize the redirect programmatically, you may click the “Advanced” after toggling the “Redirect”.
If you leave the resolve ”( )” empty, even if you have toggled the redirect button, the node will not be redirected.
Advanced area allows you to choose a different node according to the situation aroused, developers can code on transform redirect for different conditions, do the redirect or not by entering the node Composite ID.
In the case below, the system will redirect to different nodes based on the time of the event. For example, if the user requests for live chat during non-office hour, the live chat node will not be triggered. Instead, a non-office hour message will be sent because the user is redirected to the non-office hour node.
You can always change how you want to redirect based on different message event logics. For more information on message event references, see the reference documentation.
Last updated on 5/30/2024