A tree node can have Pre-actions and Post-actions whereas a global node can have Actions.
An Action is a Promise function that can be used for logics, internal database manipulation and external API calling. The member object can be retrieved and edited. You can use the resolve
callback of the promise function to resolve an object with member
as the key. Then, the member can be passed to subsequent nodes. The member details will be saved to the database after all related nodes have been executed.
For more details on advanced chatbot concept & usage, you may visit here.
Pre-action is the action you would like to perform BEFORE sending responses to users, such as saving specific tags to a member or collecting users' answers to build user profiles. In order to do so, you need to create tempData to store the relevant data in the user profile.
Example to save users' gender:
Example to save users' comment:
Property | Description |
---|---|
postId | It represents the ID for your specific Facebook post. |
isMatched | Set to "true" if it's the correct comment trigger; set to "false" if it's the wrong comment trigger. |
this.member.fbId | It represents a unique user ID for users who comment on post. It will only be created upon user comment. |
name | It represents the Facebook user name for users who comment on post. It will only be created upon user comment. |
Post-action is the action you would like to perform AFTER sending responses to users. We suggest to set one post-action as default: Save CompositeId. This would help you track the position of your users within the conversation flow so you could read their footprint and analyze for future targeting.
Example to save users' footprint:
You can plan ahead your whole chatbot journey and create actions that help you collect user data in a separate page called: Actions.
Click to edit a node in Bot Builder.
Click "+ New Action" create a new pre-action.
Some useful chatbot actions could only be applied with some coding in the advanced mode of resource template. In order to make these functions more accessible to general users, WOZTELL has introduced a set of Advanced Chatbot Actions which are available to all users.
These advanced actions include:
The text field in the action can also support variables.