Stella Platform Documentation

Stella Platform Documentation

  • Docs
  • Procedures
  • Reference
  • FAQ
  • Bot API
  • API
  • Languages iconEnglish
    • 中文

›Slack Live Chat Tree Setup

Basic Facebook Chatbot Setup

  • Overview
  • 1.1: Connect to Channels
  • 1.2: Create New Tree
  • 1.3: Build the First Node
  • 1.4: Create a Global Node
  • 1.5: Build Child Nodes
  • 2.1: Production Channel
  • 3.1: Draft a Post
  • 3.2: Create Public/Private Reply

Basic Web Chat Chatbot Setup

  • Overview
  • 1.1: Connect to Channels
  • 1.2: Create New Tree
  • 1.3: Build the First Node
  • 1.4: Create a Global Node
  • 1.5: Build Child Nodes

Basic WhatsApp Chatbot Setup

  • Overview
  • 1.1: WABA Subscription
  • 1.2: Connect WABA
  • 2.1: Create New Tree
  • 2.2: Build the First Node
  • 2.3: Create a Global Node
  • 2.4: Build Child Nodes
  • 2.5: Connect to Datasource
  • 3.1: Create Priority Group

Advanced Chatbot Application

  • Overview
  • Apply Datasource to Chatbot
  • Apply Payload Value to Chatbot
  • Apply API to Chatbot
  • Apply Custom Locale to Chatbot
  • Apply Opt-in Flow to Chatbot
  • Apply Agenda to Chatbot
  • Apply Stella API to Chatbot

Stella Partner Portal Setup

  • Overview
  • 1.1: Partner Portal Setup
  • 1.2: New Customer Onboarding
  • 1.3: WABA Setup

Template Tree

  • Overview
  • Create Template Tree
  • Manage Proxy Tree

Chatbot Testing & Deployment

  • Overview
  • Stage One - Tree Building
  • Stage Two - Testing Stage
  • Stage Three - Production Deployment

Slack Live Chat Tree Setup

  • Overview
  • 1.1: Create Tree for Live Chat Assignment
  • 2.1: Set Up Pick Ticket Status
  • 2.2: Create Done Command
  • 2.3: Create Transfer Command
  • 2.4: Create Archive Function
  • 2.5: Create Member Tagging/Remarks Command
  • 3.1: Automatic End Live Chat Function

Zendesk Live Chat Tree Setup

  • Overview
  • 1.1: Create Tree for Assignment
  • 2.1: Create Done Command

FAQ Chatbot Setup

  • Overview
  • 1.1: Exact Keyword Match
  • 2.1: Exact Keyword Match & Diversion
  • 3.1: Keyword Groups Match & Diversion
  • 4.1: Redirect to Existing Chatbot Tree
  • 4.2: Data Analytics for FAQ Chatbot
  • 4.3: NLP for FAQ Chatbot
  • 5.1: Filtering Questions for FAQ Chatbot

NLP Chatbot Setup

  • Overview
  • 1.1: Apply NLP to your Chatbot
  • 2.1: Set Up an NLP Fallback Tree
  • 3.1: NLP Fallback to Other Languages

Connect Shopify Store to Stella

  • Overview
  • 1.1: Integrate Stella to Shopify
  • 2.1: Apply Facebook SDK to Shopify
  • 2.2: Setup Facebook Messenger Chatbot for Shopify
  • 2.3: Setup WhatsApp Chatbot for Shopify
  • 2.4: WhatsApp Customer Care Notification for Shopify

Create Done Command

Once you have picked the ticket, a private channel will be created between you (agent) and the user. And you will be able to freely exchange conversations with the user within the private channel.

Upon the completion of a conversation, you could end the live chat ticket from the agent side by simply typing a done command in the private channel.

Please set up this command in the Slack Command Tree you've created in 2.1.


What is your Result?

The agent ends the conversation by typing @[bot]done
  • Please remember to connect your Slack Channel on Stella before testing for the result.

Sample Tree Structure - Done Command

Slack Command Tree Structure for Done Command

Getting Hands-on

Create a Tree Node - Done Command

  1. Create a tree node and name it as "Done Command".

  2. In the following section, you will create 3 actions. Please follow the steps of the procedure and put these actions under pre-action of this node with the exact ordering

  3. Create the 1st action for updating the ticket status to done with the following code:

return new Promise(async (resolve, reject) => {
 const group = await this.getGroupByExternalId({
   adminExternalId: this.messageEvent.from,
   groupId: this.messageEvent.to,
   type: this.channel.type,
   channelId: this.channel._id,
 })
 this.member.groupObj = group
 let assignments = []
 const assignment = await this.getAssignment({
   assignmentId: group.assignment
 })
 assignments = [assignment]

 if (assignment.parentAssignment) {
   const parentAssignment = await this.getAssignment({
     assignmentId: assignment.parentAssignment
   })
   const allAssignments = await this.getAssignmentsByParentAssignmentId({
     assignmentId: assignment.parentAssignment
   })
   assignments = [...allAssignments, parentAssignment]
 }

 let promises = []
 let name
 if (this.member.name) {
   name = this.member.name
 } else if (this.member.firstName && this.member.lastName) {
   name = `${this.member.firstName} ${this.member.lastName}`
 } else if (this.member.firstName) {
   name = this.member.firstName
 }
 let doneMessage = "Done"
 if (name) {
   doneMessage = `Done by ${name}`
 }
 console.log("assignments", assignments)
 assignments.forEach((obj) => {
   console.log("obj.targets", obj.targets)
   const target = this.lodash.find(obj.targets, { channel: this.channel._id })
   console.log("target", JSON.stringify(target, null, 2))
   const updateMessages = this.lodash.map(target.broadcastGroups, (broadcastGroup) => {
     return this.updateMessage({
       messageTs: broadcastGroup.messageTs,
       text: this.lodash.get(obj, "relayMessage.slack.text", "Done"),
       attachments: JSON.stringify([
         {
           text: doneMessage,
           fallback: doneMessage,
           color: "#36a64f"
         }
       ]),
       channel: this.channel,
       externalChannelId: broadcastGroup.id
     })
   })
   promises = [...promises, ...updateMessages]
 })

 await Promise.all(promises)
 resolve({
   member: this.member
 })
})
  1. Create the 2nd pre-action for sending the end live chat message to inlet with the following code (you may customize your message wiithin the "text" in "let response"):
return new Promise(async (resolve) => {
 const member = await this.getMember({ memberId: this.member.groupObj.member })

 let response = {
   type: "TEXT",
   text: "Thank you for your enquiry! We will close the conversation now, you are welcome to contact us again anytime. Bye!"
 }

 await this.sendMessageToInlet({
   messageEvent: this.messageEvent,
   channel: this.channel,
   response,
 })
 resolve()
})
  1. Create the 3rd pre-action to end the live chat with the following code:
return this.endLiveChat({
 messageEvent: this.messageEvent,
 channel: this.channel
})

  1. Create 2 responses under Advanced > Response Object with the following code:

The first response:

{
  "type": "TEXT",
  "text": "Your DONE command has successfully sent. Thanks!"
}

The second response (this will only be activated once you have completed step 2.4):

{
  "type": "BUTTON",
  "buttons": [
    {
      "type": "postback",
      "payload": "ARCHIVE",
      "title": "Archive Now"
    }
  ],
  "text": "Do you want to archive this channel now?"
}

Create a Global Node - Done Command Global

  1. Create a global node and then create a trigger with two conditions (for details on creating conditions, please click here) with the and operator:

Done Command Trigger for Slack

First condition - at bot:

new RegExp(`<@${this.channel.info.botId}`).test(this.messageEvent.data.text)

Second condition - command done:

new RegExp("done", "i").test(this.messageEvent.data.text)
  1. Toggle Redirect to the tree node you have created for done command.

Redirect to Slack Done Command Tree Node
  1. Check and see if you can produce the expected outcome.
← 2.1: Set Up Pick Ticket Status2.3: Create Transfer Command →
  • What is your Result?
  • Sample Tree Structure - Done Command
  • Getting Hands-on
    • Create a Tree Node - Done Command
    • Create a Global Node - Done Command Global
Stella Platform Documentation
Docs
Get StartedBest PracticesAPI ReferenceStandard Procedures
Community
FAQUser ShowcaseChat with Us
Copyright © 2021 Sanuker Inc. Limited