Welcome to the tutorial of using the Super 8. This section will teach you how to use some advanced functions for developers - External Service and Create Dynamic Card Messages.
Question:
For many Super 8 users, "Advanced Functions for Developers" is a challenging topic to understand, so we first explain the functions of "External Service" and "Create Dynamic Card Messages" and their appropriate usage scenarios. Next, let us delve into this question to find the answer!
Description:
When you assume the operational scenario is to fetch your company's information, such as member information, product prices, or menu information and other external information, we suggest you use the "External Service" function.
When you assume the operational scenario is to use cards to present your external information, we suggest you use the "Create Dynamic Card Messages" function.
Expected operation scenario: Due to a large amount of menu information, it would be time-consuming to input the information required one by one to create the card. Super 8's users can use the functions of "External Service" and "Create Dynamic Card Messages" to quickly create cards so that customers can directly view menu information.
We will combine the functions of LINE@keyword, External Service, and Create Dynamic Card Messages in the following demonstration.
1. Establishment of processes: Create LINE@-keyword.
Preprocessing: You can use the Sending text messages function of the LINE URL scheme to allow customers to scan the QR Code, and the text you set will automatically appear in the message input field of LINE. Customers can send this text directly to trigger the chatbot.
LINE URL scheme: line://oaMessage/LINE_id/? text_message
Assuming that the LINE ID is @ouh8XXXX and the text is "I want to see the menu", put both together, it will be: line://oaMessage/@ouh8XXXX/?I want to see the menu Next, use this URL to generate a QR Code so that customers can scan it directly.
LINE URL scheme:https://bit.ly/2Ht0fl7
QR Code generator: https://bit.ly/1O2RyG2
Fetch LINE ID information in the LINE@ backend
Use the combined URL to generate QR Code
Trigger steps: In the trigger method under the Enter Condition, select "Triggered by The Content Sent by the Customer", and the condition is when the customer enters the text "I want to see the menu." The example here is for demonstration purposes only. Please define the keyword according to your actual situation.
Step 1: Leave out of Enter Condition without settings; select "Forward the process" for the behavior-type in Behavior; select "Display Menu" for the Process Name.
The scenario of this process is that after the customer scans the QR Code, the text "I want to see the menu" appears in the LINE message bar. The customer sends the text, "I want to see the menu" to trigger the "LINE@-Keyword" process, and then the chatbot will guide to the "Display Menu" process.
After scanning the QR Code, the text "I want to see the menu" appears in the message bar
The customer sends the text "I want to see the menu"
2. Establishment processes: Display Menu
Trigger steps: In the trigger method under the Enter Condition, select "Triggered by Other Process."
Step 1: Leave out of Enter Condition without settings. Select "Advanced Functions for Developers" as the behavior-type under Behavior. Set Function to "External Service", Method to GET, and URL to custom API URL. You can also set Header, Query string, and Body below. Please set it according to your situation.
How to create an API URL?
Let us recommend a straightforward method. First, please go and sign up for a SheetDB account. We recommend that you first organize the data into Google Form, and follow by pasting the link address of the Google Form to SheetDB to complete the conversion of API URLs.
Google Form
SheetDB backend interface
Step 2: Leave out of Enter Condition without settings. Select "Program Code" as the behavior-type under Behavior. Set Attribute Name to "menu", Value to Step of "Display Menu-Display Menu-API" for fetching the data. Please fill in the required program code below.
Step 3: Leave out of Enter Condition without settings. Select "Advanced Functions for Developers" as the behavior-type under Behavior. Set Function to "Create Dynamic Card Messages", Data Source to Step Reply of "Display Menu-Display Menu-API," and go to fill in the information in the option card.
The scenario of this process is when the customer enters the "Display Menu" process, the chatbot will fetch the menu information from the form defined in API URL. The fetched menu information will be put into the card for presentation.
After the customer enters the process of "Display Menu", the chatbot will send a dynamically created card.
3. Establishment of processes: Display Menu - Recording Preferences
Trigger steps: In the trigger method under the Enter Condition, select "Triggered by The Content Sent by the Customer", and the condition is when the customer enters the text "give a thumbs up". The example here is for demonstration purposes only. Please define the keyword according to your actual situation.
Step 1: Leave out of Enter Condition without settings. Select "Send Message" as the behavior-type under Behavior and fill in the message content.
Step 2: Leave out of Enter Condition without settings. Select "Set Delay" as the behavior-type under Behavior and set the delay to 2 seconds.
Step 3: Leave out of Enter Condition without settings. Select "Program Code" as the behavior-type under Behavior. Set Parameter Name to "preference", Value to Step of Trigger Step for fetching data. Please fill in the required program code below.
Suppose the customer clicks "give a thumbs up" under the "Delicious American Pancakes" card. Therefore, the code here will delete [Give a Like], leaving only Delicious American Pancakes to make it easier to set up tags in the next step.
Step 4: Leave out of Enter Condition without settings. Select "Set Tag" as the behavior-type under Behavior. Set tag to "From Step" of "Display Menu-Display Menu-API."
Step 5: Leave out of Enter Condition without settings. Select "Forward the process" for the behavior-type in Behavior; select "Display Menu" for the Process Name.
The scenario of this process is that when the customer's input includes the keyword, [Give a thumbs up], the chatbot will respond with a randomly generated text message. After 2 seconds, the chatbot will fetch the customer's data in the Trigger Step and tag the data, and then the chatbot will guide the customer to the "Display Menu" process.
When the customer's input includes the keyword, [Give a thumbs up], the chatbot will respond with a randomly generated text message.
The chatbot fetches the customer's data in the Trigger Step and tag the data.
After tagging the data, the chatbot guides the customer to the "Display Menu" process.
Tutorial files
Super 8 platform thoughtfully provides the process of setting for your reference. You can use this file to design further a scenario framework that suits your needs. Just a reminder that the purpose of this file is only for tutorial demonstration, please do not save it directly after importing the file!
Download files from URL:https://bit.ly/2OB4Sd8
Hope the above information helps you!
For any other questions, please contact the online customer service representative through the "Facebook Chat Plugin" at the Super 8 platform's bottom right.
Super 8 Messenger: https://m.me/no8.io
Super 8 Line@: https://m.me/no8.io