Entry Points
You can create a workflow that will be triggered when a new chat started. This is done by creating a function chatStarted
which will be called when a chat starts. The function will receive a context object (ctx
) as its parameter.
function chatStarted(ctx) {
// Your code here
}
When interacting with workflow events, callback functions receive a context object (ctx
) that contains information about the current state:
For message handlers:
ctx.lastMessage
: The most recent message received from the user.
Comments
Can’t find what you need? Use the comment section below to connect with others, get answers from our experts, or share your ideas with us.
There are no comments yet.