Stella Platform Documentation

Stella Platform Documentation

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

›Advanced Chatbot Application

Get Started

  • Build your First Chatbot

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 Comment Reply

Basic Instagram Chatbot Setup

  • Overview
  • 1.1: Connect to Channels
  • 1.2: Create New Tree
  • 1.3: Build the First Node
  • 1.4: Create Global Node
  • 1.5: Build Child Nodes
  • 2.1: Create Story Mention
  • 2.2: Create Comment Reply
  • 2.3: Send Push Message

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
  • 1.3: Check Approval Status of WABA
  • 1.4: Setup WABA with Used WhatsApp Number
  • 1.5: Reset / Terminate 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
  • 4.1: Create Product Message

Common Use Case Application

  • Overview
  • 1.1: Apply Fail-Safe to Chatbot
  • 1.2: Apply Member Unsubscription Flow to Chatbot

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
  • Apply Web Event to Webchat Chatbot

Error Handling

  • Handle Errors for Chatbot

Stella Partner Portal Setup

  • Overview
  • 1.1: Partner Portal Setup
  • 1.2: New Customer Onboarding
  • 1.3: WABA Setup
  • 1.4: Check Approval Status of WABA
  • 1.5: Setup WABA with Used WhatsApp Number
  • 1.6: Reset / Terminate WABA

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
  • 2.2: Auto End Live Chat Function

FAQ Chatbot Setup

  • Overview
  • 1.1: Exact Keyword Match
  • 1.2: Keyword Groups Match & Diversion
  • 2.1: Redirect to Existing Chatbot Tree
  • 2.2: Data Analytics for FAQ Chatbot
  • 2.3: NLP for FAQ Chatbot
  • 3.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: Setup Facebook Messenger Chatbot for Shopify
  • 2.2: Setup WhatsApp Chatbot for Shopify
  • 2.3: WhatsApp Customer Care Notification for Shopify

Stella Inbox Setup

  • Overview
  • 1.1: Connect Channel to Slack
  • 1.2: Access Control & Admin Panel
  • 1.3: Set up Customizable Message
  • 1.4: Inbox Channel
  • 2.1: Turn on Live Chat Directly
  • 2.2: End Live Chat Mode
  • 2.3: Ticketing
  • 2.4: Manage Ticket Helper
  • 2.5: Add Member Tag
  • 3.1: Send Chatbot Message

Apply Payload Value to Chatbot

Payload value lets you assign a unique value to each button. This is particularly useful if you want to know or record which button the user has selected in a chatbot flow.

By saving the payload value, you can also apply it to the rest of the chatbot flow. The following objects will be used in the application of payload value:

  • this.member.botMeta.tempData
  • this.messageEvent.data.payload.payload
  • this.messageEvent.data.payload.value

For more object references, please refer to the Reference documentation.


Expected Outcome

The following chatbot conversation is just an example for illustrating the application of payload value. Please feel free to utilize the objects/code as you see fit.

  1. User answers a survey question (Score is 5).
Payload Value Sample Flow
  1. The user answer is reused in the response following after member tag & analytics.

Member Tagging & Analytics with Payload Value

Sample Tree Structure

Payload Value Sample Tree Structure

Getting Hands-on

Click here to create your tree node.

Creating the 1st Tree Node - Survey Question

  1. Create a the 1st tree node and rename it as "Survey Question".

Response Object with Payload Value
  1. Create a quick reply response (you may choose other response type with payload button if you want) for the survey question. Then head to "Response Object" under "Advanced" and apply the following sample code format:
{
  "type": "QUICK_REPLIES",
  "quickReplies": [
    {
      "id": "HzpoWVKa",
      "content_type": "text",
      "title": "1",
      "payload": {
        "payload": "TEMP_RESULT",
        "value": "1"
      }
    },
    {
      "id": "DKo8lI9d",
      "content_type": "text",
      "title": "2",
      "payload": {
        "payload": "TEMP_RESULT",
        "value": "2"
      }
    },
    {
      "id": "EMtZb2P8",
      "content_type": "text",
      "title": "3",
      "payload": {
        "payload": "TEMP_RESULT",
        "value": "3"
      }
    },
    {
      "id": "ALFY2WtR",
      "content_type": "text",
      "title": "4",
      "payload": {
        "payload": "TEMP_RESULT",
        "value": "4"
      }
    },
    {
      "id": "jWqgikj1",
      "content_type": "text",
      "title": "5",
      "payload": {
        "payload": "TEMP_RESULT",
        "value": "5"
      }
    }
  ],
  "text": "Rate your experience 1-5"
}
The above format allows you to add a value to the payload.
  1. Save this tree node.

Creating the 2nd Tree Node - Save Survey Answer

  1. Add the 2nd tree node and rename it as "Save Survey Answer".

payload.payload Trigger
  1. Create the following trigger for matching payload.payload:
  • Condition 1: Type Payload
this.messageEvent.type === "PAYLOAD"
  • Condition 2: TEMP_RESULT
this.messageEvent.data.payload.payload === "TEMP_RESULT"
The above payload.payload format allows the node to be triggered by any specific payload with value.

Save Payload Value to tempData
  1. Create an action to save the payload with the following code sample:
return new Promise((resolve) => {
  this.member.botMeta.tempData.score = this.lodash.get(this.messageEvent,"data.payload.value")
  resolve({
    member: this.member
  })
})
The above sample code save the payload.value from the messageEvent as tempData in the member object, so that saved data can be reused in other nodes.
  1. If you want to display the saved payload.value in your chatbot response, you can apply the following code sample on the "Response Object":

Response Object with payload value
{
  "type": "TEXT",
  "text": "Your score is {{botMeta.tempData.score}}"
}
As the payload.value is saved in the tempData of the member object, the above format allows Stella to retrieve the data from member and display in the response. You can use {{}} instead of this.member in the response.

Advanced Member Tagging & Analytics with Payload Value
  1. You can also apply the this.member.botMeta.tempData.score to member tag and analytics. Please refer to the following sample code:
  • Member Tag
return new Promise((resolve) => {
  resolve({
    tags: [`Score:${this.member.botMeta.tempData.score}`]
  })
})
  • Analytics
return new Promise((resolve) => {
  resolve({
    category: "tempData Sample",
    action: "Survey",
    label: `Score: ${this.member.botMeta.tempData.score}`
  })
})
For member tagging, if you set add a ":" between the field (i.e. Score) and the variable (i.e. this.member.botMeta.tempData.score), the variable will become dynamic. That means when the user answers with a different score (i.e. 4), the member tag will be updated (i.e. Score:4).
  1. Check and see if you can produce a result similar to the expected outcome.
← Apply Datasource to ChatbotApply API to Chatbot →
  • Expected Outcome
  • Sample Tree Structure
  • Getting Hands-on
    • Creating the 1st Tree Node - Survey Question
    • Creating the 2nd Tree Node - Save Survey Answer
Stella Platform Documentation
Docs
Get StartedBot API ReferenceAPI ReferenceStandard Procedures
Community
FAQUser ShowcaseChat with Us
Copyright © 2023 Sanuker Inc. Limited