Stella Platform Documentation

Stella Platform Documentation

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

›Advanced Chatbot Application

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

Apply Stella API to Chatbot

Stella API allows an external application to trigger the following types of bot actions in Stella:

  • Send Responses: Send a message in a specific response type to a chatbot user.
  • Redirect Member To Node: Redirect to a specific node and execute the node for a chatbot user.

The common use case is when you want to activate Stella to send a message to a user based on the action of your external application. For example, you want to send a purchase confirmation message to a WhatsApp user after that person has completed a purchase on your online store and provided the WhatsApp number.


Getting Hands-on

This procedure will teach you how to test the Stella API (i.e. POST) on Postman.

Send Response

  1. Create a new request on Postman and add https://bot.stella.sanuker.com/v2.1/sendResponses to the request URL.

Create a new Postman request
  1. Change the request type to POST.

  2. Generate an access token with bot:sendResponses permission and put it to "VALUE" under "Params". Mark accessToken under "KEY".

Input Postman request Params
  1. Head to "Body" and choose "raw" and "JSON".

Select Postman Request Body Type
  1. Paste the body code of "Send Responses". The code below is just a sample, you should edit the response according to your needs. You can find out the JSON for the response object in advanced tab of the response builder.
{
  "channelId": "5ece50e72efaabd58ef55027",
  "fbUserRef": null,
  "memberId": "5ece50f3bf385b25c4e08db5",
  "recipientId": null,
  "messagingType": "MESSAGE_TAG",
  "messagingTag": "CONFIRMED_EVENT_UPDATE",
  "response": [
    {
      "type": "TEXT",
      "text": "Hello World"
    },
    {
      "type": "IMAGE",
      "url": "https://miro.medium.com/max/1200/1*mk1-6aYaf_Bes1E3Imhc0A.jpeg"
    }
  ]
}
  1. You should be able to find the channelID from your channel and recipientID/memberID/fbUserRef from the member page.

Input Postman Request Body
  1. Click "Send". It should return the following 200 response:
  • Successful:
{
  "ok": 1,
  "member": "5ece50f3bf385b25c4e08db5",
  "sendResults": [
    {
      "result": [
        {
          "result": {
            "recipient_id": "10152368852405295",
            "message_id": "m_U0EmmN476hlyPr-0iH2cXMcrTLJ5HeVUQjzqok8vkkF8wnJpPkagYbXU5hr0bXWHM5PPYjgd9RWG10K0oujeHQ"
          },
          "messageEvent": {
            "from": "124830722411862",
            "to": "10152368852405295",
            "data": {
              "text": "Hello World"
            },
            "type": "TEXT",
            "timestamp": 1583292367324,
            "messageId": "  -0iH2cXMcrTLJ5HeVUQjzqok8vkkF8wnJpPkagYbXU5hr0bXWHM5PPYjgd9RWG10K0oujeHQ"
          }
        },
        {
          "result": {
            "recipient_id": "10152368852405295",
            "message_id": "m_U0EmmN476hlyPr-0iH2cXMcrTLJ5HeVUQjzqok8vkkF8wnJpPkagYbXU5hr0bXWHM5PPYjgd9RWG10K0oujeHQ"
          },
          "messageEvent": {
            "from": "124830722411862",
            "to": "10152368852405295",
            "data": {
              "url": "https://miro.medium.com/max/1200/1*mk1-6aYaf_Bes1E3Imhc0A.jpeg"
            },
            "type": "IMAGE",
            "timestamp": 1583292367324,
            "messageId": "  -0iH2cXMcrTLJ5HeVUQjzqok8vkkF8wnJpPkagYbXU5hr0bXWHM5PPYjgd9RWG10K0oujeHQ"
          }
        }
      ]
    }
  ]
}
  • Failure:
{
  "ok": 0,
  "err_code": 108,
  "err": "Either memberId or recipientId or fbUserRef is required.\""
}

Redirect Member To Node

  1. Create a tree node in a tree and add this tree to the channel you will use for this POST request.

  2. Create a new request on Postman and add https://bot.stella.sanuker.com/v2.1/redirectMemberToNode to the request URL.

Create a new Postman request
  1. Change the request type to POST.

  2. Generate an access token with bot:redirectMemberToNode permission and put it to "VALUE" under "Params". Mark accessToken under "KEY".

Input Postman request Params
  1. Head to "Body" and choose "raw" and "JSON".

Select Postman Request Body Type
  1. Paste the body code of "Redirect Member To Node". The code below is just a sample, you should change the tree & nodeCompositeId to the ones in the tree node you created in step 1.
{
  "channelId": "5ece50e72efaabd58ef55027",
  "fbUserRef": null,
  "memberId": "5ece50f3bf385b25c4e08db5",
  "recipientId": null,
  "redirect": {
    "tree": "5ecf6cfba3b6643c33a64079",
    "nodeCompositeId": "j4Bivxm0GWhnNV1m",
    "runPreAction": true,
    "sendResponse": null,
    "runPostAction": false
  },
  "meta": {
    "name": "Sanuker",
    "orderId": "5ecf6be76fcfda6b139d802c"
  }
}
  1. You should be able to find the channelID from your channel and recipientID/memberID/fbUserRef from the member page.

Input Postman Request Body
  1. Click "Send". It should return the following 200 response:
  • Successful:
{
  "ok": 1,
  "member": "5ece50f3bf385b25c4e08db5",
  "sendResults": [
    {
      "result": [
        {
          "result": {
            "recipient_id": "10152368852405295",
            "message_id": "m_U0EmmN476hlyPr-0iH2cXMcrTLJ5HeVUQjzqok8vkkF8wnJpPkagYbXU5hr0bXWHM5PPYjgd9RWG10K0oujeHQ"
          },
          "messageEvent": {
            "from": "124830722411862",
            "to": "10152368852405295",
            "data": {
              "text": "Hello World"
            },
            "type": "TEXT",
            "timestamp": 1583292367324,
            "messageId": "  -0iH2cXMcrTLJ5HeVUQjzqok8vkkF8wnJpPkagYbXU5hr0bXWHM5PPYjgd9RWG10K0oujeHQ"
          }
        },
        {
          "result": {
            "recipient_id": "10152368852405295",
            "message_id": "m_U0EmmN476hlyPr-0iH2cXMcrTLJ5HeVUQjzqok8vkkF8wnJpPkagYbXU5hr0bXWHM5PPYjgd9RWG10K0oujeHQ"
          },
          "messageEvent": {
            "from": "124830722411862",
            "to": "10152368852405295",
            "data": {
              "url": "https://miro.medium.com/max/1200/1*mk1-6aYaf_Bes1E3Imhc0A.jpeg"
            },
            "type": "IMAGE",
            "timestamp": 1583292367324,
            "messageId": "  -0iH2cXMcrTLJ5HeVUQjzqok8vkkF8wnJpPkagYbXU5hr0bXWHM5PPYjgd9RWG10K0oujeHQ"
          }
        }
      ]
    }
  ]
}
  • Failure:
{
  "ok": 0,
  "err_code": 108,
  "err": "Either memberId or recipientId or fbUserRef is required.\""
}
← Apply Agenda to ChatbotOverview →
  • Getting Hands-on
    • Send Response
    • Redirect Member To Node
Stella Platform Documentation
Docs
Get StartedBest PracticesAPI ReferenceStandard Procedures
Community
FAQUser ShowcaseChat with Us
Copyright © 2021 Sanuker Inc. Limited