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

Overview

In this section, we will walk you through the programming concept of Stella, so that you can apply your code to the Actions and Advanced mode of any node.

Example: Save Payload Value to tempData

Stella Runs on JavaScript

Stella is running on the latest JavaScript version. Specifically @babel/preset-env with @babel/plugin-proposal-async-generator-functions.


Chatbot Concept

Tree Diagram

Chatbot Tree Diagram

Node to Match

Stella will save the node a member is last in. Then, the child nodes of the current node, the global nodes of the current tree or the global nodes of the channel can be the nodes to be matched when the member has another input.

Node to Match Diagram

For your quick reference, child nodes are the nodes directly connected to the current node. Global nodes are nodes in the upper section of the tree view. Channel global nodes are selected in channel view.

Priority

Every matched node will be sorted by their priority, with the lower value comes first. The first matched node will then be executed. If there are more than 1 nodes with the lowest value, a random one will be chosen and executed. The default priority of a node is 0. The priority of a normal node doesn’t have an upper limit and can be set as low as -9. Nodes with priority less than or equal to -10 is called a muted node and will be included in the documentation soon.

Node to Match with Priority

Channel Global

For a new user, the head node of all trees in channel, and the channel global nodes will be matched instead. Any global nodes which is selected in a channel can be triggered across a channel.

Channel Global Node

Node to Match for New User

Processing of Tree Node & Global Node

When a node is matched, there is an order of execution from top-down as shown in the diagram below.

Order of Execution

You may refer to the table below and find out how does a specific component (advanced) function in a node:

ReferenceDescriptionOrder of Execution
TriggerA node is matched by computing its trigger.1
Pre-action/ActionAn action is a Promise function that can be used for logics, internal database manipulation and external API calling. It runs before a response is sent.2
ResponseA response object or an array of response objects can be resolved by the “resolve” callback of the promise function. It contains the chatbot message.3
Post-action/ActionAn action is a Promise function that can be used for logics, internal database manipulation and external API calling. It runs after the response is sent.4
Member TaggingStella will add tags to a member when the member is passing through a node with member tag is toggled on.5
AnalyticsWhen a node with analytics toggled on is executed for a member, either from trigger or redirect, an analytics event will be recorded.6
RedirectWhen a node is successfully executed and if the redirect of the node is toggled on, the redirected node will be executed next.7

"this" Scope, Reference & Methods

During a chatbot session, i.e. from the point Stella receives a message event, to the point where all subsequent redirected nodes are executed, Stella will store temporary data and other related functions in the this scope. All changes in this will be passed through all parts of the nodes and redirections.

Stella has a list of Reference documentation for any advanced function or reference object.

ReferenceDescription
Message EventMessage event is an object provided by the platforms which contain the information about the message, which can be accessed by this.messageEvent.
NodeNode is an object that exists in our database, which contains the information about the node, which can be accessed by this.node.
MemberMember is an object that exists in our database, which contains the information about the chatbot member, which can be accessed by this.member.
ChannelChannel is an object that exists in our database, which contains the information about the chatbot channel, which can be accessed by this.channel.
IntegrationsIntegrations is an object that exists in our database and allows users to access related information regarding the integrations between Stella and available applications, which can be accessed by this.integrations.
Agenda MetaAgenda Meta allows users to pass different data to nodes for the use of agenda. Users can use this.newAgenda or redirectMemberToNode with meta object, the object can be later accessed by this.agendaMeta.
GroupAvailable only on Teamwork and WhatsApp. Group is an object that contains all the information about the group. This is a property available only in live chat. Whenever there are some incoming or outgoing messages need to be processed by the bot or tree during live chat, this property will be added into the this object, which can be accessed by this.group.
MethodsThese are the methods that can be accessed by this. Most of the methods are crud operations on the database. You can make use of these method to perform different kinds of features like setting new agenda, sending emails, etc.
Radiate.jsYou can make use of Radiate.js to create different interactions between your web and the web chat.
3rd Party LibrariesThere are third-party libraries in the this scope. Node-fetch (this.fetch) is a library for sending http(s) requests. Moment (this.moment) is a library for time related logic. Lodash (this.lodash) is a utility library that improves QoL.

Applying Advanced Functions to Chatbot

You can try applying the above methods & objects to your chatbot flow. Follow the documentations below and test out some functions!

  • 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
← 1.2: Apply Member Unsubscription Flow to ChatbotApply Datasource to Chatbot →
  • Stella Runs on JavaScript
  • Chatbot Concept
    • Tree Diagram
    • Node to Match
    • Priority
    • Channel Global
    • Processing of Tree Node & Global Node
  • "this" Scope, Reference & Methods
  • Applying Advanced Functions to Chatbot
Stella Platform Documentation
Docs
Get StartedBot API ReferenceAPI ReferenceStandard Procedures
Community
FAQUser ShowcaseChat with Us
Copyright © 2023 Sanuker Inc. Limited