๐จโ๐ปConversation script variables
Overview
In conversation scripts, besides the โLive Chatโ channel, you can control the conversation flow by setting script variables externally. In addition, there are many predefined conversation variables available. These default variables can be used during the conversation to personalize and customize your responses.
These default conversation variables can cover information such as the user's name, customer name, and other relevant details. You can use these variables to provide more personalized and timely responses. Similarly, these variables can also be used in โWebhook conversation scriptsโ for call passing.
By setting script variables and using predefined conversation variables, you can customize conversation scripts according to needs and context to provide a better user experience and solutions. Whether in live chat or via Webhook, these variables help you create more personalized and interactive conversations.
โ ๏ธ Variable usage notes
Please pay special attention,variables do not always carry corresponding values in every context, whether they are actually available will depend on the usage scenario and source conditions:
contact_*related variables: A named Contact must be created or associated, otherwise the corresponding value cannot be populated.page_*related variables: Only when the user connects viaLive Chatwill it be generated, used to track information such as the source page.contactable_liff_user_id: Only obtained when integrating LINE LIFF and whenLive Chat is initiatedin that context; other channels or when LIFF is not enabled will not have a value.
Default variables
queue.length
Queue waiting count
The total number of people waiting or being dispatched in the current conversation queue.
page.url
From webpage URL
The URL of the webpage the live chat customer came from.
page.title
From webpage title
The title of the webpage the live chat customer came from.
contactable_user_id
Source connection identifier
The identifier corresponding to the source connection, such as the ID used for LINE or Facebook Messaging API verification.
contactable_username
Source connection user name
The display name of the user corresponding to the source connection, such as the name from LINE or a Facebook profile.
contactable_liff_user_id
LIFF user number
If using Live Chat with LIFF integration, this variable can be used to obtain the LIFF user's user number.
session_id.session_id
Script Session system code
When each conversation enters the script, a unique code is automatically generated for identification.
contact.id
Customer system ID
The customer's system ID associated with the source connection.
contact.name
Customer name
The customer name associated with the source connection.
contact.first_name
Customer surname
The customerโs surname associated with the source connection.
contact.last_name
Customer given name
The customerโs given name associated with the source connection.
contact.membership_no
Customer membership number
The customer's membership number associated with the source connection.
contact.identity_no
Customer identity card number
The customer's identity card number associated with the source connection.

Last updated