logo
Entwicklung
Suchen
System Variables

System Variables

System variables are used during the runtime of an agent to access variable value data, enabling dynamic logic and responses within the agent. Users can quickly reference variables by typing {{ in text input fields, FlowAgent components, and workflows. When the agent is running, system variables are automatically replaced with their correct values; if a value does not exist, it will be empty.
System variables include global variables and user source variables. The values of system variables cannot be set by developers; they are automatically assigned by the GPTBots platform based on the current runtime environment.

Global Variables

Field Name Type Description
sys_dev_id string The developer ID of the agent
sys_agent_id string The agent's ID
sys_conversation_id string The current conversation ID
sys_anonymous_id string The anonymous ID of the user interacting with the agent, usually the unique user identifier from a third-party channel platform. See Anonymous ID Logic for details.
sys_user_id string The user ID of the person interacting with the agent, defined by the developer as a unique user identifier
sys_lang string The language used in the user portal
sys_conversation_source string The integration channel of the conversation, such as WhatsApp, Telegram, etc. This matches the source field in logs.
sys_user_message_count number The total number of messages sent by the user in the current conversation

All global variables are automatically assigned by the GPTBots platform; manual assignment is not required.

User Source Variables

When users send messages via browsers, WhatsApp, LINE, and other channels, the user source platform refers to that channel. The values of user source platform variables differ depending on the channel used. Therefore, when using user source platform variables in an agent, be aware of the differences between platforms.

The GPTBots platform will continue to support more user source platform variables, such as Telegram, Facebook, etc.

Browser Variables

Browser variables are automatically obtained and assigned by the GPTBots platform when users access shared pages, workspaces, etc., via a browser. Manual assignment is not required. When users send messages via API, WhatsApp, LINE, and other channels, browser variables will be empty.

Field Name Type Description
browser_info string Browser name
browser_lang string Current language used by the browser
browser_os string Operating system
browser_timezone string Time zone
browser_region string Country or region
browser_current_url string Current page URL
browser_source_url string Referrer page URL
browser_duration_of_stay number Duration of stay on the current page

WhatsApp Properties

WhatsApp properties are automatically obtained and assigned by the GPTBots platform only when users send messages via the WhatsApp channel. Manual assignment is not required.

Field Name Type Description
wa_user_name string WhatsApp user's nickname or display name
wa_user_id string WhatsApp user's unique identifier, usually based on the user's phone number (e.g., international phone number suffix @c.us)

Telegram Properties

Telegram properties are automatically obtained and assigned by the GPTBots platform only when users send messages via the Telegram channel. Manual assignment is not required.

Field Name Type Description
tg_user_id string Telegram user's unique identifier, used for internal system distinction
tg_user_name string Telegram user's nickname or display name, e.g., @username
tg_lang_code string Telegram user's language preference code, such as en, zh-CN, etc.

LiveChat Properties

LiveChat properties are automatically obtained and assigned by the GPTBots platform only when users send messages via the LiveChat channel. Manual assignment is not required.

Field Name Type Description
lc_org_id string Unique identifier for the LiveChat organization
lc_chat_id string Unique identifier for the LiveChat conversation, used to track the entire conversation
lc_thread_id string Unique identifier for a specific thread within a LiveChat conversation, used to organize subtopics or message sequences within the conversation
lc_user_id string Unique identifier for the LiveChat end user, used for internal system distinction