Stella Platform Documentation

Stella Platform Documentation

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

›Connect Shopify Store to Stella

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

Setup WhatsApp Chatbot for Shopify

Once you have completed the integration, you will be able to control your chatbot content in the proxy trees. In this section, you will be able to learn how to customize your WhatsApp Chatbot conversations by editing the Config Map.

Sample Tree Structure

WhatsApp Shopify Proxy Tree Structure

Part 1 - Proxy Tree

Finding the Proxy Tree

Procedure

  1. Head to "Bot Builder".

  2. Search for "[Shopify] WhatsApp - Proxy Tree".

Search for WhatsApp Shopify Proxy Tree
  1. Select the tree.
WhatsApp Shopify Proxy Tree

Viewing the Config Map

Procedure

  1. Select Config Map to edit the variables. If you do not know how to use this config map, please proceed to next step.
Edit Config Map

Part 2 - Editing the Config Map

Full Config Map

Proxy Tree Structure

WhatsApp Main Flow Tree Structure

What is Your Result?

Greeting Message

Procedure

  1. Open the config map for "[Shopify] WhatsApp - Proxy Tree". Below is a general structure of the config map.
{
  "INTEGRATION_ID": "{{INTEGRATION_ID}}",
  "MISCELLANEOUS": {...},
  "FLOW_END": {...},
  "PRODUCT_RECOMMENDATION": {...},
  "COLLECTION": {...},
  "PRODUCT_SEARCH": {...},
  "COUPON": {...},
  "RECENT_HAPPENINGS": {...},
  "MEMBER_GET_MEMBER": {...},
  "REFER_SUCCEED": {...},
  "ORDER_CREATE": {...},
  "ORDER_UPDATE": {...},
  "PAYMENT_CONFIRMATION": {...}
}
  1. Follow the table below and find out the part you wish to edit in the config map. The corresponding config map settings will be provided for each part, so that you can copy and paste it over the {...} as shown in the above sample code.
FieldContent
INTEGRATION_IDGenerated by Stella
MISCELLANEOUSChatbot Flow Openings & Miscellaneous chatbot contents. Object consists of different miscellaneous fields
FLOW_ENDChatbot contents for the Ending of Conversation Flow. Object consists of different fields related to complete flow message
PRODUCT_RECOMMENDATIONProduct Recommendation chatbot contents. Object consists of different fields related to product recommendation flow
COLLECTIONChatbot contents for the Search by Collection flow. Object consists of different fields related to collection flow
PRODUCT_SEARCHChatbot contents for the Search Product by Keyword flow. Object consists of different fields related to product search flow
COUPONCoupon Flow chatbot contents. Object consists of different fields related to coupon button in Shopify store
RECENT_HAPPENINGSRecent Happenings Flow chatbot contents. Object consists of different fields related to recent happenings flow
MEMBER_GET_MEMBERChatbot contents for the Members-Get-Members Sharing Mechanism. Object consist different fields related to member get members flow
REFER_SUCCEEDChatbot contents for Successful Member Referral. Object consists of different fields related to member get members flow
ORDER_CREATEOrder Creation flow chatbot contents. Object consists of different fields related to order creation one time notification
ORDER_UPDATEOrder Update flow chatbot contents. Object consists of different fields related to order update (delivery) one time notification
PAYMENT_CONFIRMATIONChatbot contents for Payment Confirmation. Object consists of different fields related to payment confirmation notification
  1. Select "Done" and "Save" the tree.

  2. Save and see if you can produce the expected result.

Chatbot Flow Openings & Miscellaneous (MISCELLANEOUS)

What is Your Result?

Greeting Message

Procedure

  1. Edit MISCELLANEOUS part of config map

  2. After editing the name of a field in "Flow Openings", please remember to edit the name in the "Flow Endings" accordingly. For example, if you have edited the "COLLECTION_NAME" at row 39, you will nedd to "COLLECTION" at row 135 as well.

Edit Flow Opening and Ending

Click to view code

{
  "API_VERSION": "2020-10",
  "DEFAULT_LANGUAGE": "en",
  "MAIN_MENU_KEYWORD": "0",
  "AVAILABLE_LANGUAGES": [
    "en",
    "zh_tw"
  ],
  "LANGUAGES_MAPPING": {
    "(zh_)+": "zh_tw"
  },
  "GREETING_MENU_MESSAGE": {
    "en": "Hi there 😊, I am a robotic assistant 🤖 to {{shopName}}! \n\nWould you like to check out\n{{greetingList}}\n\nShould you wish to contact us, please visit us at {{shopUrl}}",
    "zh_tw": "你好😊,觀迎打開{{shopName}},為平淡生活帶來甜蜜驚喜👙! \n\n你今日想睇啲咩啊?\n{{greetingList}}"
  },
  "NEXT_PAGE": {
    "en": "Next page",
    "zh_tw": "下一頁"
  },
  "BACK_TO_FIRST_PAGE": {
    "en": "Back to first page",
    "zh_tw": "返回第一頁"
  },
  "OTHER_CHOICE": {
    "en": "I want to check sth else",
    "zh_tw": "我想睇其他野"
  },
  "OTHER_PRODUCT": {
    "en": "I want to check other product",
    "zh_tw": "我想搵其他野"
  },
  "PRODUCT_RECOMMENDATION_NAME": {
    "en": "Surprise me",
    "zh_tw": "今期熱賣"
  },
  "COLLECTION_NAME": {
    "en": "Our product with love",
    "zh_tw": "全部商品"
  },
  "PRODUCT_SEARCH_NAME": {
    "en": "Tell me what you desire",
    "zh_tw": "你的願望"
  },
  "RECENT_HAPPENING_NAME": {
    "en": "Recent happenings",
    "zh_tw": "最新消息"
  },
  "CUSTOMER_SERVICE_NAME": {
    "en": "Contact our CS team",
    "zh_tw": "聯絡客服"
  },
  "CS_KEYWORD": [
    "CS",
    "after sales"
  ],
  "COMPLAIN_KEYWORD": [
    "complaint",
    "complain",
    "投訴"
  ],
  "PRODUCT_INFO": {
    "en": "{{productName}}\n{{productPrice}}\n\n{{orderMessage}}",
    "zh_tw": "{{productName}}\n{{productPrice}}\n\n{{orderMessage}}"
  },
  "VARIANT_PRICE": {
    "en": "up",
    "zh_tw": "以上"
  },
  "ADD_TO_CART": {
    "en": "Add to cart",
    "zh_tw": "加入購物車"
  },
  "ADD_TO_CART_SUCCEED": {
    "en": "Product added successfully\n\nExisting item(s):\n{{otherProduct}}",
    "zh_tw": "貨品已成功加入購物車\n\n現有貨品:\n{{otherProduct}}"
  },
  "GET_YOURS_NOW": {
    "en": "Get yours NOW!",
    "zh_tw": "立即購買"
  },
  "CHECK_OUT": {
    "en": "Check out ({{numberOfItem}} item(s))",
    "zh_tw": "立即付款 ({{numberOfItem}} 件貨品)"
  },
  "VARIANTS": {
    "en": "Which style are you looking for?\n{{variantsList}}",
    "zh_tw": "請問想要邊一款?\n{{variantsList}}"
  },
  "QUANTITY": {
    "en": "How many item would you like to buy?",
    "zh_tw": "請問想買幾多件?"
  },
  "FAIL_SAFE_LIMIT": 2,
  "FAIL_SAFE_TREE": "",
  "FAIL_SAFE_NODE_ID": "",
  "SEND_ERROR_TREE": "",
  "SEND_ERROR_NODE_ID": "",
  "CS_TREE": "",
  "CS_NODE_ID": "",
  "COMPLAIN_TREE": "",
  "COMPLAIN_NODE_ID": ""
}

FieldMandatoryContent
API_VERSIONYesShopify API Version (Must the same as private app API version in Shopify)
DEFAULT_LANGUAGEYesDefault language of chatbot in Shopify flow
MAIN_MENU_KEYWORDNoKeyword for back to main menu
AVAILABLE_LANGUAGESYesAvailable language choices of the chatbot flow
LANGUAGES_MAPPINGYesMapping member's language settings to language in Shopify flow (Checking member's tempData.Shopify.customLanguage -> member.customLocale -> member.locale -> MISCELLANEOUS.DEFAULT_LANGUAGE of config map)

The key of each object will be checked by regex with case-insensitive search
i.e. (zh_)+ matches with zh_hk and zh_tw
GREETING_MENU_MESSAGEYesGreetings message in main menu (after user types "Hi/Hello")
OTHER_CHOICEYesMessage in quick reply to check other choices
OTHER_PRODUCTYesMessage in quick reply to check other products
PRODUCT_RECOMMENDATION_NAMEYesProduct recommendation flow name
COLLECTION_NAMEYesCollection flow name
PRODUCT_SEARCH_NAMEYesProduct Search flow name
RECENT_HAPPENING_NAMEYesRecent Happening flow name
CUSTOMER_SERVICE_NAMEYesCustomer service name. The customer service flow is defined by yourself. In our experience, it is usually connected to an external live chat system like Slack or Zendesk and many more choices.
PREVIOUS_PAGEYesMessage text for redirecting user back to previous page
NEXT_PAGEYesMessage text for redirecting user to the next page
BACK_TO_MAIN_MENUYesMessage text for redirecting user back to main menu
CS_KEYWORDNoKeyword to customer service flow
COMPLAIN_KEYWORDNoKeyword to complain flow
VARIANT_PRICEYesMessage included in product which has multiple variants
ADD_TO_CARTYesMessage text for redirecting user to add product to cart
ADD_TO_CART_SUCCEEDYesSuccessful add to cart message
- {{otherProduct}}: Existing product list in the shopping cart in Stella
GET_YOURS_NOWYesMessage text for redirecting to Shopify Store product page directly
CHECK_OUTYesMessage text for redirecting user to Shopify Store checkout (System will send the product list in the shopping cart from Stella to Shopify)
VARIANTSYesIf your Shopify product has different variants (e.g. colour variants). You can set up the variant question text here.
QUANTITYYesYou can let customer to choose the quantity of your Shopify products. You can set up the quantity question text here.
FAIL_SAFE_LIMITNoFail safe counter limit, larger than or equal to limit will redirect to fail safe flow
FAIL_SAFE_TREENoFail safe tree. You should create your own general fail safe tree separately and apply the tree ID here to connect to your Shopify Flow. Please also remember to add this fail safe tree to the channel.
FAIL_SAFE_NODE_IDNoFail safe node composite id. You should create your own general fail safe tree separately and apply the node composite ID here to connect to your Shopify Flow. Please also remember to add this fail safe tree to the channel.
SEND_ERROR_TREENoError tree. You should create your own general error tree separately and apply the tree ID here to connect to your Shopify Flow. Please also remember to add this error tree to the channel.
SEND_ERROR_NODE_IDNoError node id. You should create your own general error tree separately and apply the node composite ID here to connect to your Shopify Flow. Please also remember to add this error tree to the channel.
CS_TREENoCustomer service tree (You should create your own general tree separately)
Having CS_TREE and CS_NODE_ID in configMap will add one more carousel in main menu to trigger redirect to customer service node. The customer service flow is defined by yourself. In our experience, it is usually connected to an external live chat system like Slack or Zendesk and many more choices. You can build your own live chat tree and connect with to your Shopify tree. Please remember to add the tree ID here and add this CS tree to channel.
CS_NODE_IDNoCustomer service node composite id The customer service flow is defined by yourself. In our experience, it is usually connected to an external live chat system like Slack or Zendesk and many more choices. You can build your own live chat tree and connect with to your Shopify tree. Please remember to add the node composite ID here and add this CS tree to channel.
COMPLAIN_TREENoComplain tree. You should create your own general tree for customer complaints separately and apply the tree ID here to connect to your Shopify Flow. Please also remember to add this complain tree to the channel.
COMPLAIN_NODE_IDNoComplain node composite id. You should create your own general tree for customer complaints separately and apply the node composite ID here to connect to your Shopify Flow. Please also remember to add this complain tree to the channel.
  1. Select "Done" and "Save" the tree.

  2. See if you can produce the expected result.

Ending of Conversation Flow (FLOW_END)

What is Your Result?

  1. You can edit the ending of the conversation flow. It will allow you to customize the display text for contacting customer service, search for product, product recommendation and search by collection.
Flow end message

Procedure

  1. Edit FLOW_END part of the config map.
{
  "END_MESSAGE": {
    "en": "Looking for recommendation? {{CS}}!\n\nOr you can select below services:\n{{servicesList}}",
    "zh_tw": "想知邊款最適合你?{{CS}}!\n\n你亦可以選擇:\n{{servicesList}}"
  },
  "END_MESSAGE_2": {
    "en": "Do you wish to see our hottest items🔥?\n\n{{servicesList}}",
    "zh_tw": "想唔想睇埋我哋嘅今期熱賣🔥?\n\n{{servicesList}}"
  },
  "CS": {
    "en": "Looking for recommendation from our live agents💁🏻‍♀️? Type",
    "zh_tw": "想問問我哋細心嘅真人客服💁🏻‍♀️?輸入"
  },
  "PREVIOUS_PAGE": {
    "en": "Back to previous page",
    "zh_tw": "上一頁"
  },
  "SEARCH_OTHER": {
    "en": "Look for sth else",
    "zh_tw": "繼續搜尋"
  },
  "SEARCH": {
    "en": "Tell me what you desire",
    "zh_tw": "你的願望"
  },
  "RECOMMENDATION": {
    "en": "Surprise me",
    "zh_tw": "今期熱賣"
  },
  "COLLECTION": {
    "en": "Our product with love",
    "zh_tw": "全部商品"
  }
}
FieldMandatoryContent
END_MESSAGEYesThe message text to indicate that the conversation flow has reached the end.
- {{CS}}: Display the message text to redirect to customer service flow
- {{servicesList}}: List options to trigger other conversation flow
END_MESSAGE_2YesAnother flow end message
- {{servicesList}}: Other flow list
CSYesMessage text to redirect to customer service flow
PREVIOUS_PAGEYesMessage text for redirecting user back to previous page
SEARCHYesQuick reply text to redirect to normal product search flow
SEARCH_OTHERYesMessage text to redirect to product search flow. You can customize this text to convey the meaning of searching the store's products again.
RECOMMENDATIONYesMessage text to redirect to product recommendation flow
COLLECTIONYesQuick reply text to redirect to collection flow
  1. Select "Done" and "Save" the tree.

  2. See if you can produce the expected result.

  3. Please note that, if they customer has added a recommended product to cart, the ending flow will not include the recommendation option.

Flow end message

Product Recommendation (PRODUCT_RECOMMENDATION)

What is Your Result?

If user selects "Surprise Me" , some preset options will be displayed. In this case, the user selects "Romantic night", the product "Pure 5.5 Seamless Bikini" was presented.

Recommended Product

Procedure

  1. Edit PRODUCT_RECOMMENDATION part of the config map. You can copy any productId in your Shopify Store and paste it to the appropriate content in this config map.
{
  "RECOMMENDATION_LIST": [
      {
        "name": {
          "en": "Adventurous 🦁",
          "zh_tw": "華麗歷險 🦁"
        },
        "type": "Bra",
        "selection": "random",
        "productId": "6126874689704"
      }
      {
        "name": {
          "en": "Romantic night 💕",
          "zh_tw": "浪漫今夜 💕"
        },
        "selection": "specific",
        "productId": "6126874689704"
      }
    ],
    "LIST_MESSAGE": {
      "en": "These are the beauties you should never miss😈 Pick one you like:\n\n{{productRecommendationList}}\n\n{{endMessage}}",
      "zh_tw": "以下嘅貨品你絕對唔可以錯過😈:\n\n{{productRecommendationList}}\n\n{{endMessage}}"
    },
    "RESULT_PRODUCT_CAPTION": {
      "en": "This is our best choice for you!\n{{productInfo}}",
      "zh_tw": "呢樣係我哋嘅心水推介:\n{{productInfo}}"
    },
    "OTHER_OPTIONS": {
      "en": "Do you wish to look for the other options?\n{{productRecommendationList}}\n\n{{endMessage}}",
      "zh_tw": "不如睇埋其他熱門商品啊?\n{{productRecommendationList}}\n\n{{endMessage}}"
    },
    "RESULT_NOT_FOUND": {
      "en": "Sorry, product recommendation not found",
      "zh_tw": "我搵唔到你想要嘅貨品啊😭"
    }
}
FieldMandatoryContent
RECOMMENDATION_LISTYesArray of product recommendations
You can change the object in selection:
- For random: this means chatbot would filter by the prodcut_type and randomly pick a product out of that type, in the above example, the product type is bra
- specific: this means chatbot will use a specific productId to retrieve the corresponding product information

name: The text for the type/name of the recommendation. (If there is no name, chatbot will display the text in type instead)

type: The "product type" displayed in your store.
LIST_MESSAGEYesMessage text before the product list is shown
- {{productRecommendationList}}: the product list from your Shopify store
- {{endMessage}}: message text to indicate next page & previous page
RESULT_PRODUCT_CAPTIONYesCaption text before the product info
- {{productInfo}}: the product info from your Shopify Store using the productInfo template configured above
OTHER_OPTIONSYesMessage text for other options
- {{productRecommendationList}}: the product list from your Shopify Store
- {{endMessage}}: message text to indicate for next page & previous page
RESULT_NOT_FOUNDYesMessage text if the product is not found
  1. Select "Done" and "Save" the tree.

  2. See if you can produce the expected result.

Please note that the product type can be customized in the product page of your store.


Search by Collection (COLLECTION)

What is Your Result?

  1. User can select a product collection (i.e. "Bra")
View Collection List
  1. The chatbot will reply with the relevant products under the selected collection.
Select Product by Collection
  1. User can view the product.
View Product

Procedure

  1. Edit COLLECTION part of the config map. As our system will automatically retrieve all the collections from your Shopify Store, there is a minimum effort to customize this part. You can simply change the display text according to your own preference.
{
  "LIST_MESSAGE": {
    "en": "Check out product collections👗! Tell us what do you want to look at:\n\n{{collectionList}}\n\n{{endMessage}}",
    "zh_tw": "以下係我哋嘅貨品目錄👗! 話比我哋知你想搵啲咩啊:\n\n{{collectionList}}\n\n{{endMessage}}"
  },
  "RESULT_CAPTION": {
    "en": "{{collectionName}}\n{{collectionDescription}}\n\n{{productList}}\n\nCheck the full collections at {{collectionUrl}}",
    "zh_tw": "{{collectionName}}\n{{collectionDescription}}\n\n{{productList}}\n\n於 {{collectionUrl}} 查看全部貨品~"
  },
  "RESULT_MORE_THAN_10_PRODUCT": {
    "en": "and more!",
    "zh_tw": "同埋更多精彩貨品!"
  }
}
FieldMandatoryContent
LIST_MESSAGEYesMessage text before the collection list;
- {{collectionList}}: the collection list from your Shopify store
- {{endMessage}}: message text to indicate for next page & previous page
RESULT_CAPTIONYesThe display text with the information of the selected Collection
- {{collectionName}}: the collection name from your Shopify Store
- {{collectionDescription}}: the collection description from your Shopify Store
- {{productList}}: the product list under the selected collection
- {{collectionUrl}}: the collection url
RESULT_MORE_THAN_10_PRODUCTYesThis message text will be shown if there are more than 10 products.
  1. Select "Done" and "Save" the tree.

  2. See if you can produce the expected result.

Please note that all the available collections will be displayed, and the display order of collections depends on Shopify's API resoponses.

Search Product by Keyword (PRODUCT_SEARCH)

What is Your Result?

User can type specific product keyword and the chatbot will display the products accordingly.

Search Product by Keyword

Procedure

  1. Edit PRODUCT_SEARCH part of config map
{
  "GREETINGS": {
    "en": "Tell us what you want by typing the keywords here💁🏻‍♀️!",
    "zh_tw": "話比我哋知你想搵啲咩啊💁🏻‍♀️!"
  },
  "RESULT": {
    "en": "Are you looking for:\n{{result}}",
    "zh_tw": "你係唔係搵緊:\n{{result}}"
  },
  "FAIL_SAFE": {
    "en": "Please enter correct number",
    "zh_tw": "請輸入正確數字"
  },
  "CHOOSE_TAG": {
    "en": "Are you searching for gentleman or lady?\n\n{{tagMessage}}",
    "zh_tw": "請問係搵緊男士定女士衣物?\n\n{{tagMessage}}"
  },
  "GENTLEMAN": {
    "en": "Gentleman 🕺🏼",
    "zh_tw": "男士 🕺🏼"
  },
  "LADY": {
    "en": "Lady 💃🏼",
    "zh_tw": "女士 💃🏼"
  },
  "OUT_OF_STOCK": {
    "en": "Sorry, product(s) is/are out of stock:\n{{outOfStockList}}\n\n{{endMessage}}",
    "zh_tw": "唔好意思,以下嘅貨品無晒貨喇🙇🏻‍♀️:\n{{outOfStockList}}\n\n{{endMessage}}"
  },
  "NO_PRODUCT_FOUND": {
    "en": "We cannot find what you are looking for😭\n\n{{endMessage}}",
    "zh_tw": "我搵唔到你想要嘅貨品啊😭\n\n{{endMessage}}"
  },
  "VARIANTS": {
    "en": "Which style are you looking for?\n{{variantsList}}",
    "zh_tw": "請問想要邊一款?\n{{variantsList}}"
  }
}
FieldMandatoryContent
GREETINGSYesThe Greeting message when user activates the product search flow
RESULTYesProduct search result
- {{result}}: the product search result
CHOOSE_TAGYesChoose tag (Only apply to male or female tag) if the target product list has both male and female products
GENTLEMANYesMale tag name
LADYYesFemale tag name
OUT_OF_STOCKYesMessage for the Out of stock product list ({{outOfStockList}} is the product list which is out of stock)
NO_PRODUCT_FOUNDYesNo product is found during product search
VARIANTSYesIf your Shopify product has different variants (e.g. colour variants). You can set up the variant question text here.
  1. Select "Done" and "Save" the tree.

  2. See if you can produce expected result.


Coupon Flow (COUPON)

What is Your Result?

User types the keyword to receive a coupon.

Enter Code to Get Coupon

Procedure

  1. Edit COUPON part of config map
{
  "KEYWORD": "sanuker",
  "IMAGE_URL": "https://miro.medium.com/max/1400/1*mk1-6aYaf_Bes1E3Imhc0A.jpeg",
  "IMAGE_ATTACHMENT_ID": "{{>COUPON_IMAGE_ATTACHMENT_ID}}",
  "MESSAGE": "We got a small gift to you. [You may enjoy 5% discount on your first purchase]",
  "CODE": "SS20"
}
FieldMandatoryContent
KEYWORDYesThe keyword to trigger the system to send out a coupon
IMAGE_URLNoImage URL
either IMAGE_URL or IMAGE_ATTACHMENT_ID is required
IMAGE_ATTACHMENT_IDNoWhatsApp Media ID; You can create this ID via the attachment ID uploader, which shortens the time to send an image out
either IMAGE_URL or IMAGE_ATTACHMENT_ID is required
MESSAGEYesMessage text before displaying the coupon code
CODEYesCoupon Code. You must create the discount code in Shopify first)
  1. Select "Done" and "Save" the tree.

  2. See if you can produce the expected result.


Recent Happenings Flow (RECENT_HAPPENINGS)

What is Your Result?

User can check out the latest happenings of your Shopify store from the chatbot.

Recent Happenings

Procedure

  1. Edit RECENT_HAPPENINGS part of the config map and customize the content or the displayed product accordingly.
{
  "NEW_PRODUCT_ID": "6117243715752",
  "MESSAGE": {
    "en": "Breaking news❗️{{productName}}({{productPrice}}) is arriving at Secret Wardrobe👙\n\n{{orderMessage}}",
    "zh_tw": "最新消息❗️{{productName}}({{productPrice}}) 現正登錄私密衣櫃👙 \n\n{{orderMessage}}"
  }
}
FieldMandatoryContent
NEW_PRODUCT_IDYesThe Shopify's product id of any products you want to highlight in recent happeneings.
MESSAGEYesYou can customize the message in recent happenings flow
- {{productName}}: product name from your Shopify Store
- {{productPrice}}: is the product price from your Shopify Store
- {{orderMessage}}: is the order message from Stella
  1. Select "Done" and "Save" the tree.

  2. See if you can produce the expected result.


Members-Get-Members Sharing Mechanism (MEMBER_GET_MEMBER)

What is Your Result?

  1. When user types "I want MGM", the chatbot will offer a code to the user. If the user's friend uses the code to buy a product, then the user will also receives a coupon.
Members-Get-Members
  1. Upon successful coupon usage by user's friend, the user will receive a successful message as shown in the next part - Successful Member Referral.

Procedure

  1. Create a separate Tree and a Global Node with the text trigger "MGM".
MGM Tree Structure
  1. Toggle on "Redirect" and click on the "Advanced" tab. Paste the following code and edit the "tree ID" accordingly:
return new Promise((resolve, reject) => {
  // Logic here...
  resolve({
    tree: "Insert your Shopify proxy tree ID here",
    nodeCompositeId: "Wz2TtiIB9gZJSGWB",
    runPreAction: true,
    sendResponse: true,
    runPostAction: true,
  })
})
Redirect to Proxy Tree
  1. Save the Global Node and add to your WhatsApp Channel.

  2. Go back to your "[Shopify] WhatsApp - Proxy Tree" and edit MEMBER_GET_MEMBER part of the config map.

{
  "REFEREE_DISCOUNT": "-5",
  "REFERRER_DISCOUNT": "-10",
  "REFEREE_END_AFTER": 7,
  "REFERRER_END_AFTER": 7,
  "REFEREE_VALUE_TYPE": "percentage",
  "REFERRER_VALUE_TYPE": "percentage",
  "REFEREE_USAGE_LIMIT": null,
  "REFERRER_USAGE_LIMIT": 1,
  "COUPON_TITLE_PREFIX": "",
  "PRICE_RULE_PROPERTIES": {
    "allocation_method": "across",
    "entitled_collection_ids": [],
    "entitled_country_ids": [],
    "entitled_product_ids": [],
    "entitled_variant_ids": [],
    "once_per_customer": true,
    "prerequisite_quantity_range": {},
    "prerequisite_shipping_price_range": {},
    "prerequisite_subtotal_range": {},
    "prerequisite_to_entitlement_purchase": {},
    "customer_selection": "all",
    "target_selection": "all",
    "target_type": "line_item",
    "usage_limit": null,
    "prerequisite_product_ids": [],
    "prerequisite_variant_ids": [],
    "prerequisite_collection_ids": [],
    "prerequisite_to_entitlement_quantity_ratio": {},
    "allocation_limit": null
  },
  "SHARE_TO_FRIEND_MESSAGE_1": {
    "en": "Lucky🌟! Invite your friends to purchase with a 5% discount! You will also reward 10% OFF for your next purchase (Upon successful purchase)!",
    "zh_tw": "快閃活動🌟!用以下優惠代碼比朋友用95折購買心水貨品!成功購買後,你亦可以於下一次購買時享有9折優惠!"
  },
  "SHARE_TO_FRIEND_MESSAGE_2": {
    "en": "Share this code to your friend now: {{couponCode}}",
    "zh_tw": "立即分享優惠代碼:{{couponCode}}"
  },
  "SHARE_TO_FRIEND_MESSAGE_3": {
    "en": "Note: The code can be used ONCE only❗️",
    "zh_tw": "注意:此優惠代碼只能使用一次❗️"
  }
}
FieldMandatoryContent
REFEREE_DISCOUNTYesDiscount of the referee
REFERRER_DISCOUNTYesDiscount of the referrer (After successful referral)
REFEREE_END_AFTERNoDays until the Referee's discount offer expires
REFERRER_END_AFTERNoDays until the Referrer's discount expires
REFEREE_VALUE_TYPEYesReferee discount type (percentage or fixed_amount). percentage means the discount code discounts a percentage from the marked price of the Shopify store's product; fixed_amount means the discount codes discounts a fixed amount of price from the marked price of the Shopify store's product
REFERRER_VALUE_TYPEYesReferrer discount type (percentage or fixed_amount). percentage means the discount code discounts a percentage from the marked price of the Shopify store's product; fixed_amount means the discount codes discounts a fixed amount of price from the marked price of the Shopify store's product
REFEREE_USAGE_LIMITNoThe number of times that the referee discount can be used
REFERRER_USAGE_LIMITNoThe number of times that the referrer discount can be used
COUPON_TITLE_PREFIXNoPrefix of the coupon title
PRICE_RULE_PROPERTIESYesPrice rule of the coupon based on Shopify documentation
SHARE_TO_FRIEND_MESSAGE_1NoReferral message part 1
SHARE_TO_FRIEND_MESSAGE_2YesReferral message part 2 ({{couponCode}} is generated from Shopify's API via Stella)
SHARE_TO_FRIEND_MESSAGE_3NoReferral message part 3
  1. Select "Done" and "Save" the tree.

  2. See if you can produce the expected result.


Successful Member Referral (REFER_SUCCEED)

What is Your Result?

As mentioned in "Members-Get-Members Sharing Mechanism". When the user's friend used the code to purchase anything in the store, the user will also get a coupon too.

Successful Referral

Procedure

  1. Edit REFER_SUCCEED part of the config map.
{
  "ELEMENT_NAME": "shopify_refer_succeed",
  "LANGUAGE_CODE": {
    "customer_language": "target_language_code",
    "en": "en",
    "zh_HK": "zh_HK",
    "zh_tw": "zh_HK"
  },
  "PARAMETERS": [
    {
      "default": "{{couponCode}}"
    }
  ],
  "LANGUAGE_POLICY": "deterministic",
  "DISABLE_REFER_SUCCEED": false
}
FieldMandatoryContent
ELEMENT_NAMEYesWhatsapp template name of the successful referral message
LANGUAGE_CODEYesCustomer language map to WhatsApp template language code
COMPONENTSNoComponents of the Whatsapp template
- {{couponCode}}: coupon code generated for referer

Either COMPONENTS or PARAMETERS is required for WhatsApp template
PARAMETERSNoParameters of the Whatsapp template
- {{couponCode}}: coupon code generated for referer

Either COMPONENTS or PARAMETERS is required for WhatsApp template
LANGUAGE_POLICYYesWhatsApp template's language policy
DISABLE_REFER_SUCCEEDNoYou can disable this feature if it is marked as true
  1. Select "Done" and "Save" the tree.

  2. See if you can produce the expected result.


Order Confirmation (ORDER_CREATE)

What is Your Result?

  1. User checks out in your Shopify Store and enters user's WhatsApp number.
User checks out
  1. User receives an order confirmation message on WhatsApp.
Order Confirmation

Procedure

  1. Edit ORDER_CREATE part of the config map.
{
  "ELEMENT_NAME": "shopify_order_confirmation",
  "LANGUAGE_CODE": {
    "customer_language": "whatsapp template language code",
    "en": "en",
    "zh_HK": "zh_TW",
    "zh_tw": "zh_HK"
  },
  "COMPONENTS": [
    {
      "type": "body",
      "parameters": [
        {
          "type": "text",
          "text": "{{firstName}}"
        },
        {
          "type": "text",
          "text": "{{orderId}}"
        }
      ]
    },
    {
      "type": "button",
      "sub_type": "url",
      "index": "0",
      "parameters": [
        {
          "type": "text",
          "text": "{{order_status_url}}"
        }
      ]
    }
  ],
  "LANGUAGE_POLICY": "deterministic",
  "SYSTEM_ORDER_CREATION_TREE": "",
  "SYSTEM_ORDER_CREATION_NODE_ID": "",
  "DISABLE_ORDER_CONFIRMATION": false
}
FieldMandatoryContent
ELEMENT_NAMEYesWhatsApp template name for order confirmation
LANGUAGE_CODEYesCustomer's language is mapped to WhatsApp template's language code, so that the languages are synced
COMPONENTSNoComponents of order confirmation's WhatsApp template
- {{firstName}}: the first name of the customer name
- {{orderId}}: order id of the items ordered by user in Shopify
- {{order_status_url}}: the url showing order status for the items oredered by user in Shopify

Either COMPONENTS or PARAMETERS is required for WhatsApp template
PARAMETERSNoParameters of order confirmation's Whatsapp template
- {{firstName}}: the first name of the customer name
- {{orderId}}: order id of the items ordered by user in Shopify
- {{order_status_url}}: the url showing order status for the items oredered by user in Shopify

Either COMPONENTS or PARAMETERS is required for WhatsApp template
LANGUAGE_POLICYYesOrder confirmation WhatsApp template's language policy
SYSTEM_ORDER_CREATION_TREENoTree ID to pass data to external tree if user did not provide WhatsApp number
SYSTEM_ORDER_CREATION_NODE_IDNoNode composite ID to pass data to external tree if user did not provide WhatsApp number
DISABLE_ORDER_CONFIRMATIONNoYou can disable this feature if it is marked as true
  1. Select "Done" and "Save" the tree.

  2. See if you can produce the expected result.


Order Update (ORDER_UPDATE)

What is Your Result?

  1. User can receive an order update message from WhatsApp.
Order Update
  1. User can click the URL button and view the shipping status.
Shipping Information

Procedure

  1. Edit ORDER_UPDATE part of config map
{
  "ELEMENT_NAME": "shopify_order_update_v5",
  "LANGUAGE_CODE": {
    "en": "en",
    "zh_HK": "zh_HK",
    "zh_tw": "zh_HK"
  },
  "COMPONENTS": [
    {
      "type": "body",
      "parameters": [
        {
          "type": "text",
          "text": "{{firstName}}"
        },
        {
          "type": "text",
          "text": "{{orderId}}"
        },
        {
          "type": "text",
          "text": "{{trackingCompany}}"
        },
        {
          "type": "text",
          "text": "{{trackingNumber}}"
        }
      ]
    },
    {
      "type": "button",
      "sub_type": "url",
      "index": "0",
      "parameters": [
        {
          "type": "text",
          "text": "{{trackingUrl}}"
        }
      ]
    }
  ],
  "LANGUAGE_POLICY": "deterministic",
  "SYSTEM_ORDER_UPDATE_TREE": "",
  "SYSTEM_ORDER_UPDATE_NODE_ID": "",
  "DISABLE_ORDER_UPDATE": false
}
FieldMandatoryContent
ELEMENT_NAMEYesWhatsApp template name for order updates
LANGUAGE_CODEYesCustomer's language is mapped to WhatsApp template's language code, so that the languages are synced
COMPONENTSNoComponents of order updates' WhatsApp template
- {{firstName}}: the first name of the customer name
- {{orderId}}: order id of the items ordered by user in Shopify
- {{trackingCompany}}: tracking company used for the order
- {{trackingNumber}}: tracking number or user's order
- {{trackingUrl}}: tracking url of user's order

Either COMPONENTS or PARAMETERS is required for WhatsApp template
PARAMETERSNoParameters of order updates' WhatsApp template
- {{firstName}}: the first name of the customer name
- {{orderId}}: order id of the items ordered by user in Shopify
- {{trackingCompany}}: tracking company used for the order
- {{trackingNumber}}: tracking number or user's order
- {{trackingUrl}}: tracking url of user's order

Either COMPONENTS or PARAMETERS is required for WhatsApp template
LANGUAGE_POLICYYesOrder updates WhatsApp template's language policy
SYSTEM_ORDER_CREATION_TREENoTree ID to pass data to external tree if user did not provide WhatsApp number
SYSTEM_ORDER_CREATION_NODE_IDNoNode composite ID to pass data to external tree if user did not provide WhatsApp number
DISABLE_ORDER_CONFIRMATIONNoYou can disable this feature if it is marked as true
  1. Select "Done" and "Save" the tree.

  2. See if you can produce the expected result.


Payment Confirmation Flow (PAYMENT_CONFIRMATION)

What is Your Result?

  1. Create an order manually from the Shopify Store admin panel and completes the payment.
Create an order in Shopify
  1. An order & payment confirmation message can be sent to user.
Payment confirmation

Procedure

  1. Edit PAYMENT_CONFIRMATION part of the config map.
{
  "ELEMENT_NAME": "shopify_order_payment_confirmation",
  "LANGUAGE_CODE": {
    "customer_language": "whatsapp template language code",
    "en": "en",
    "zh_HK": "zh_TW",
    "zh_tw": "zh_HK"
  },
  "PARAMETERS": [
    {
      "default": "{{firstName}}"
    },
    {
      "default": "{{orderId}}"
    }
  ],
  "LANGUAGE_POLICY": "deterministic",
  "SYSTEM_PAYMENT_CONFIRMATION_TREE": "",
  "SYSTEM_PAYMENT_CONFIRMATION_NODE_ID": "",
  "DISABLE_PAYMENT_CONFIRMATION": false
}
FieldMandatoryContent
ELEMENT_NAMEYesWhatsApp template name for payment confirmation
LANGUAGE_CODEYesCustomer's language is mapped to WhatsApp template's language code, so that the languages are synced
COMPONENTSNoComponents of payment confirmation's WhatsApp template
- {{firstName}}: the first name of the customer name
- {{orderId}}: order id of the items ordered by user in Shopify
- {{trackingCompany}}: tracking company used for the order
- {{trackingNumber}}: tracking number or user's order
- {{trackingUrl}}: tracking url of user's order

Either COMPONENTS or PARAMETERS is required for WhatsApp template
PARAMETERSNoParameters of payment confirmation's WhatsApp template
- {{firstName}}: the first name of the customer name
- {{orderId}}: order id of the items ordered by user in Shopify
- {{trackingCompany}}: tracking company used for the order
- {{trackingNumber}}: tracking number or user's order
- {{trackingUrl}}: tracking url of user's order

Either COMPONENTS or PARAMETERS is required for WhatsApp template
LANGUAGE_POLICYYesPayment confirmation WhatsApp template's language policy
SYSTEM_ORDER_CREATION_TREENoTree ID to pass data to external tree if user did not provide WhatsApp number
SYSTEM_ORDER_CREATION_NODE_IDNoNode composite ID to pass data to external tree if user did not provide WhatsApp number
DISABLE_ORDER_CONFIRMATIONNoYou can disable this feature if it is marked as true
  1. Select "Done" and "Save" the tree.

  2. See if you can produce the expected result.


Part 3 - Global Node Trigger Table

Here is the table of all the nodes' priority and triggers for your reference. If you are adding any other general tree to the channel, please make sure they do not have any conflict with the Shopify tree. For details in node matching & priority, please refer here.

Trigger type (extra requirement)PriorityFunction
config.MISCELLANEOUS.MAIN_MENU_KEYWORD TEXT(set in config)10Redirect to Main Menu
Any TEXT11If user input is the product name, the chatbot will display the product directly. If the member's fail safe count is larger than FAIL_SAFE_LIMIT in config map, chatbot will redirect to the targeted fail safe tree. Otherwise, the chatbot will redirect to the Main Menu
config.COUPON.KEYWORD TEXT (enabled coupon flow)10Redirect to coupon flow
config.CUSTOMER_CARE_OPT_OUT_KEYWORD TEXT10Unsubscribe customer care messages
config.CUSTOMER_CARE_OPT_IN_KEYWORD TEXT10Subscribe customer care messages
config.MISCELLANEOUS.CS_KEYWORD TEXT (set in config)10Redirect to customer service tree (external tree)
config.MISCELLANEOUS.COMPLAIN_KEYWORD TEXT (set in config)10Redirect to complain tree (external tree)

Redirect to Customer Service

In the table above, pre-sales PAYLOAD and config.MISCELLANEOUS.CS_KEYWORD TEXT allows your users to trigger the customer service flow. If you want to make use of it, you will need a few more steps to set it up.

  1. The customer service tree is not included in the config map. Therefore, you have to first build an external tree for the customer service flow.

  2. After that, insert the treeID and nodeID of your customer service tree into the config map. Normally, the "CS_TREE" and "CS_NODE_ID" are located at line 100.

CS_TREE and CS_NODE_ID
  1. Once you have added the treeID and nodeID to the config map, a new option for the CS flow will be displayed on the menu
CS_TREE and CS_NODE_ID
  1. You can edit the displayed text at "CUSTOMER_SERVICE_NAME". It is normally located at line 51.
Customer Service Name
← 2.1: Setup Facebook Messenger Chatbot for Shopify2.3: WhatsApp Customer Care Notification for Shopify →
  • Sample Tree Structure
  • Part 1 - Proxy Tree
    • Finding the Proxy Tree
    • Viewing the Config Map
  • Part 2 - Editing the Config Map
    • Full Config Map
    • Chatbot Flow Openings & Miscellaneous (MISCELLANEOUS)
    • Ending of Conversation Flow (FLOW_END)
    • Product Recommendation (PRODUCT_RECOMMENDATION)
    • Search by Collection (COLLECTION)
    • Search Product by Keyword (PRODUCT_SEARCH)
    • Coupon Flow (COUPON)
    • Recent Happenings Flow (RECENT_HAPPENINGS)
    • Members-Get-Members Sharing Mechanism (MEMBER_GET_MEMBER)
    • Successful Member Referral (REFER_SUCCEED)
    • Order Confirmation (ORDER_CREATE)
    • Order Update (ORDER_UPDATE)
    • Payment Confirmation Flow (PAYMENT_CONFIRMATION)
  • Part 3 - Global Node Trigger Table
    • Redirect to Customer Service
Stella Platform Documentation
Docs
Get StartedBot API ReferenceAPI ReferenceStandard Procedures
Community
FAQUser ShowcaseChat with Us
Copyright © 2023 Sanuker Inc. Limited