Create Tree for Assignment
The first step of setting up the live chat function is to incorporate the function itself into your chatbot flow.
You may put the live chat settings in a separate individual tree, or incorporate the live chat nodes into your existing tree.
What is your Result?
- Please remember to connect your Zendesk Channel on Stella before testing for the result.
Getting Hands-on
Create An Action On the Node to Perform Live Chat
- Create a new tree node or select any existing tree node reserved for live chat.
Add a New Post-action
- Add a post-action for creating the ticket assignment with the following code:
return new Promise((resolve) => {
console.log("in Send ticket to zendesk")
let assignmentDetails = {
relayMessage: {
zendesk: {
type: "TEXT",
text: `${this.member.firstName} - Enquiry from WhatsApp`,
}
}
}
console.log("member", this.member)
this.createAssignment({
member: this.member,
assignmentDetails,
label: "ZENDESK",
// meta: {},
}).then((result) => {
resolve({
member: result.member,
})
})
})
You may edit your code to customize the following display:
- assignmentDetails:
The Name & Summary of the Zendesk Assignment
- Create a basic text response in the same node to notify users that they are being connected to live chat. (This message will be sent to your client-facing channel, i.e. Facebook Messenger.)
Message to users when ticket is being assigned
- Check and see if you can produce the expected outcome