๐Conversation scripts
How do I use it?
You can edit different scripts for different chat scenarios. For example, when a customer sends a message, show options and guide the customer to find the answer... etc., to help businesses handle customer service.
Conversation scripts help you handle dialogues in various situations. By using the three elements โEvent,โ โCondition,โ and โAction,โ you can handle more complex scenarios, for example:
Use menus to guide customers through processes,reply with more precise answers.
According to different processes, assign customerspriority to different customer service agents.
send coupons or promotional information, etc.

Start designing your custom script
To create a conversation script and make it work, just follow these simple steps:
Create a script๏ผFind the โConversation Scriptโ feature under the โChatbotโ category in โApps.โ Click the โNewโ button or the โTemplateโ button in the interface to get started.
Design the script๏ผPlan your script based on your business needs, such as setting up keyword auto-replies, promoting campaigns, etc. During editing, you can use the simulation feature for real-time testing. If you need to leave midway, you can save a draft at any time.
Publish the script๏ผAfter finishing the script design, click the โPublishโ button on the edit screen to officially publish your script from draft status.
Associate the script๏ผTo make the script take effect in real scenarios, you need to associate it with the corresponding conversation channels, such as LINE or Facebook. Find the โChannel Associationโ tab in the script list to complete the association settings.
All done๏ผAt this point, your custom conversation script is ready and can start automatically responding to customer messages on the specified channels.
โ๏ธ Interface operations
In the single-script interface, you will see several key function buttons, which are:
Name
Allows setting or modifying the scriptโs name and description, helping keep scripts organized.
Mode switch
Allows you to switch between the scriptโs edit mode and view mode. 1. In view mode, the interface hides some operation buttons. 2. In view mode, you see the published script information, while in edit mode you see the saved script draft information.
Template, Import
Use process templates provided by the FIRST LINE team, or import script JSON from other sources to save design time.
Export
Allows exporting the current script as JSON format for archival or use in other environments.
Simulate bot
Perform real-time testing of draft flows during the editing phase to see how the script actually runs and adjust based on test results.

๐ Notes
For scripts that are in progress๏ผWhen a script is updated and published, if customers are currently in that script flow, the system will proactively return them to the starting point to restart the flow.
Main script design rules๏ผThe start of the main script must place at least one โEventโ node to define the conditions for a customer entering the script. This design clarifies the trigger point for starting interactions and ensures customers can start the script flow according to preset conditions.
Limit on number of nodes traversed๏ผTo avoid poor customer experiences caused by overly complex designs, the number of nodes a customer passes through from initiating a conversation to the next utterance (including โCondition,โ โAction,โ etc.) cannot exceed 200. If this limit is exceeded, the system will automatically guide the customer back to the starting point to prevent potential faulty designs from adversely affecting the customer.

What are the script node types?
Conversation script nodes are categorized into several types depending on their purpose:
Entry
The entry is the starting point where a user enters the flow; it can connect to other nodes afterward but cannot be deleted.
Event
Wait for a specified event to occur; it can be connected after an โActionโ to continue the flow. For example, after sending the message โPlease enter the service you want,โ determine the next step based on the userโs content.
Conditions
Can evaluate user data, such as current time or the message sent. For example, determine to send promotional messages during a specific time period.
Action
Can perform flow operations such as sending messages or options. It can be connected after an โEventโ or โConditionโ and will operate only when specific situations are met.
Exit
Represents the end of the entire flow and exit. After leaving, other final operations can also be executed, such as assigning to a specialist or continuing with another script.
Each node type contains various corresponding functions and settings, which will be explained below.
๐ฉEntry
In script design,the โEntryโ acts as the critical starting point for users to enter the flow, so the โEntryโ is a fixed node and cannot be deleted.
The rule for the first script node connected to the entry depends on the nature of the script:
Formain scripts, the first node must be the โWhen customer message matchesโ event under โEventโ; this design ensures the flow can be triggered and executed under specific conditions.
ForSub-scripts(i.e., scripts called by another script within a script flow) do not have this restriction. A sub-script does not need to start with an โEventโ node; regardless of its starting node, the system will automatically execute subsequent steps when invoked.
๐ Events
Events will โwaitโ for specified occurrences before continuing to execute connected steps, for example if you add an event โWhen customer message matches,โ it will wait for the customer to send a message before continuing with the subsequent flow. The current related functions are as follows.
Customer sends a message
The customerโs message matches one of the set keywords.
Customer browses a page
When the customer browses a specific webpage.
Customer sends an email
When a customer sends an email and it meets the set conditions.
๐ Conditions
Decide whether the flow should continue or proceed to another flow based on data.
Weekday matches
If the current date matches the specified weekday.
Send promotional messages, specific event reminders, etc.
Memory variable comparison
Compare whether the data stored in the eventโs memory is set or equals a specified value.
Customized responses, flow branching, data validation, etc.
When customer message matches
The customerโs message matches one of the set keywords.
Trigger specific dialogue flows, label classification, reply messages, etc.
Agent is online
Whether an agent is currently online using the system.
Route to human service, show wait time, auto-reply, etc.
Whether customer data exists
Whether the incoming customer has linked customer information.
Customer identity verification, data update prompts, personalized services, etc.
Message type
Whether the message sent by the customer is text or a file.
File handling flows, keyword responses, etc.
Web URL
Whether the incoming customerโs URL matches a specific URL.
Website navigation assistance, personalized ad display, event page direction, etc.
โก Actions
Send message
Send a message to the customer, text or image.
Customer service notifications, event promotion, product information sharing, etc.
Send options
Send up to three options to the customer; display varies by channel. Three items are the current common intersection limit across social media platforms.
Service menu, quick response choices, etc.
Send carousel message
Send horizontally scrollable carousel cards.
Product showcase, event introduction, user guides, etc.
Send quick replies
Send non-repeatable clickable options to guide the customer.
FAQ answers, appointment selection, service guidance, etc.
Webhook script
Call a webhook script for API integration.
Data synchronization, third-party service integration, automated task handling, etc.
Search knowledge base articles
Search the knowledge base for the article closest to the keyword using conversation variables.
FAQ answers, self-service solutions, knowledge sharing, etc.
๐ Exit
End flow
End the current conversation flow.
Complete inquiries, end interactions, automatically close after resolving issues, etc.
Other scripts
End and immediately call another script.
Transition from one service process to another related process, such as from product inquiry to order placement.
Assign to agent
Route the user conversation into the system and assign it to a specialist.
When automated service cannot resolve the customerโs issue and human intervention is needed
Frequently Asked Questions
Script design completed โ how to associate with channels?
Once you have completed the script design, you can associate your carefully designed script with the conversation channels you choose, such as LINE or Facebook, via the โChannel Associationโ tab in the script list interface.
Then, when customers send messages through these channels or other specified events are triggered, the system will start executing according to the flow you designed.

How to test the script flow?
After completing the script design, testing to ensure the flow works properly and meets expectations is a very important step. Whether you are in the design phase or ready to publish the script, there are appropriate testing methods:
Draft-stage testing๏ผIn edit mode, use the โSimulate botโ feature in the script interface for real-time testing. This allows you to preview and evaluate the draft flowโs effect before official publishing, and promptly discover and adjust potential issues.
Post-publish testing๏ผIf the script is already published, you can test through the official channel. If you donโt want to affect channels currently in normal use, you can create a dedicated โLive Chatโ channel for testing. After creating the channel, click the live view button in the live chat interface to start evaluating the scriptโs performance in a real application environment.
Are templates provided for reference?
To help you get started quickly and spark creative ideas, we provide a variety of process templates. These templates cover basic applications and demonstrate how to effectively use our script design features to optimize customer service and interaction experiences.You can find the template button in the script list or at the top-right of a single scriptโs edit interface.


How to edit the script name, description, or disable it?
To make minor changes to the conversation script, such as changing its name or adding notes, you can operate directly in the single-script edit interface.
Enter the interface of the script you want to modify.
At the top of the single-script interface, find the conversation script title. Click the title to edit it. Note that changing the script name takes effect immediately, but this action does not trigger publishing the script or saving the current edits.

How to use conditions or events to make decisions
Throughout the flow, when you need to make branching decisions, you can use the โEventโ and โConditionโ blocks in the block to make determinations. These two types of blocks will evaluatethe same-type blocks at the same level.

As shown above, the flow evaluates โEventโ blocks at the same level; if the evaluation for a condition is false, it will automatically proceed to the next โEventโ block based on the evaluation until the condition is true or it connects to a different-type block.
Advanced usage
Use sub-scripts to subdivide flows
When your single script becomes larger and harder to maintain and manage, it is recommended to split the script into other different scripts, for example by usage scenario or different options.
Then, use the โExitโ blockโs function to call other sub-scripts to continue the flow, making it easy to simplify complexity.
Of course, if different scripts share a small portion of the same flow, it is recommended to create that common step as another script for reuse.
Use โmessage variablesโ to determine subsequent flows
In some script block settings, you can store messages into variables of the current script to facilitate smoother subsequent flows. For example, when you ask the customer for a nickname and the customer responds, store the customerโs nickname into the variable nickname, then continue the flow using โSend message,โ setting {{ nickname }} Mr./Ms., hello! Greet the customer and confirm.
Send personalized messages using template syntax
You can process the transmitted message content using memory variables and template syntax to easily send the messages you need.
If using template syntax, you can simply use it like this.
For more complex applications, please refer to the following articles.
๐จโ๐ปTemplate syntaxLast updated