User Overview
Users refer to end users who initiate conversations with Agents/workflows. GPTBots allows developers to assign unique identity IDs to different users. Through this user ID (user_id), user identities can be linked across different channels, enabling cross-channel identity consolidation, business queries via Tools, and management of user attributes and chat histories.
User CDP (Customer Data Platform) information is stored under each Agent/workflow, with data being isolated for the same user across different Agents/Workflows.
用户体系示意图
flowchart LR
subgraph Col1["Source Platform"]
LC["Livechat"]
IC["Intercom"]
WG[" Widget "]
TG["Telegram"]
end
subgraph Col2_5["Source Platform Sub-Channel"]
tgb01["TGBOT01"]
tgb02["TGBOT02"]
end
subgraph Col2["Anonymous ID"]
a1["lc0001"]
a2["ic0001"]
a3["wg0001"]
tga1["tb0001"]
tga2["tg0001"]
end
subgraph Col3["UserId"]
U1["ABC123"]
U2["ABC456"]
end
subgraph Col4["ConversationId"]
c1["c001"]
c2["c002"]
c3["c003"]
c4["c004"]
c5["c005"]
end
subgraph Col5["Agent/Workflow"]
Bot["Agent
Workflow"]
end
LC -- Generate Anonymous ID --> a1
IC -- Generate Anonymous ID --> a2
WG -- Generate Anonymous ID --> a3
TG -- User from sub-channel --> tgb01 & tgb02
tgb01 -- Generate Anonymous ID --> tga1
tgb02 -- Generate Anonymous ID --> tga2
a1 -- Set user_id --> U1
a2 -- Set user_id --> U1
a3 -- Set user_id --> U2
tga1 -- Set user_id --> U2
tga2 -- Set user_id --> U2
U1 -- Generate new conversation ID --> c1
U1 -- Generate new conversation ID --> c2
U2 -- Generate new conversation ID --> c3
U2 -- Use existing conversation ID --> c4
c4 -- If expired (>60 minutes)
Generate new conversation ID --> c5
c1 --> Bot
c2 --> Bot
c3 --> Bot
c4 --> Bot
c5 --> Bot
LC:::redStyle
IC:::blueStyle
WG:::greenStyle
TG:::purpleStyle
tgb01:::purpleStyle
tgb02:::purpleStyle
a1:::redStyle
a2:::blueStyle
a3:::greenStyle
tga1:::purpleStyle
tga2:::purpleStyle
U1:::userGray
U2:::userGray
c1:::redStyle
c2:::blueStyle
c3:::greenStyle
c4:::purpleStyle
c5:::purpleStyle
classDef userGray fill:#f5f5f5,stroke:#e6e6e6,color:#222
classDef redStyle fill:#ffd6d6,stroke:#ffbdbd,color:#222
classDef blueStyle fill:#dff0ff,stroke:#cfeaff,color:#222
classDef greenStyle fill:#ecffd9,stroke:#d5ffb3,color:#222
classDef purpleStyle fill:#f1e0ff,stroke:#e1c7ff,color:#222
style Col1 stroke:#757575- The Anonymous ID (
anonymous_id) is automatically generated by the GPTBots system service based on the user's source platform. - Setting a
user_idis optional. Developers can decide whether to set auser_idbased on their business needs to enable user identity association and attribute sharing across different channels.
Definitions
User
A user refers to an end user who engages in conversations with an Agent.
User ID (user_id)
A unique identifier assigned to end users by enterprise developers. Through the API interface, developers can set a UserId for an anonymous_id. For usage scenarios and advanced applications of UserId, please refer to Set User ID.
- The
user_idtakes precedence over theanonymous_id - Multiple
anonymous_idvalues can be associated with a singleuser_idsimultaneously
Anonymous ID (anonymous_id)
When users interact with an Agent through third-party platforms (such as Telegram, WhatsApp, LINE, etc.), GPTBots uses that platform's unique user identifier as the anonymous_id. For details on anonymous ID generation logic, please refer to [Anonymous ID Generation Logic](## Anonymous ID Generation Logic).
Third-party Platforms
The GPTBots platform currently supports Agent integration with numerous third-party platforms, including Intercom, Webchat, LiveChat, Telegram, WhatsApp, and more.
Conversation ID (conversation_id)
The conversation ID (conversation_id) is a unique identifier generated jointly by the Agent, conversation type, and user_id (or anonymous_id). It serves as the smallest unit for isolating different business scenarios (typically containing multiple message IDs).
- The
conversation_idautomatically expires after 60 minutes, except for those generated through the API channel, which have no expiration time. - For third-party platforms and widget channels, when a
conversation_idexpires, a new one is generated to start a fresh conversation.
Message ID (message_id)
The message ID (message_id) identifies a single message exchange between an Agent and a user, representing the smallest unit of conversation.
- The
message_idis generated by the GPTBots platform and cannot be customized by developers. - The
message_idbelongs to aconversation_id, with oneconversation_idtypically containing multiplemessage_ids.
Conversation Type
Conversation Type (conversation_type) identifies the scenario in which a user initiates a conversation, such as Workspace-Workflow, WhatsApp, API, Workspace-Search, etc.
Conversation ID Generation Principle
When users initiate conversations with an Agent through third-party platforms, the system generates an anonymous_id based on the user's platform, and automatically creates a conversation_id based on this anonymous_id to contain one round of dialogue between the user and Agent.
- When using the API, developers must first generate a
conversation_idbefore initiating conversations with an Agent/Workflow. - For non-API channels, GPTBots automatically generates the
conversation_id.
Anonymous ID Value Logic
| Source Platform | Anonymous ID Logic | Corresponding Platform Field | Description |
|---|---|---|---|
| Telegram | Telegram User ID | tg_user_id | Unique numeric identifier for a Telegram user. |
| Telegram Group Chat | Telegram chatID + Telegram User ID | tg_chat_id + tg_user_id | Combination of group chat session ID and user ID, uniquely identifying user interactions within a group. |
| LINE | LINE User ID | line_user_id | Unique identifier for a LINE user. |
| LiveChat | LiveChat threadId | lc_thread_id | Unique identifier for a LiveChat conversation thread. |
| Slack | Slack User ID | slack_user_id | Unique identifier for a Slack user. |
| Slack Public Channel | Slack (teamId + channelId + userId) | slack_team_id + slack_channel_id + slack_user_id | Combination of Slack team ID, public channel ID, and user ID, uniquely identifying users in public channels. |
| Intercom | Intercom User ID | intercom_user_id | Unique identifier for an Intercom user. |
| DingTalk | DingTalk senderId | dd_user_id | Unique identifier for a DingTalk user. |
| DingTalk Group Chat | DingTalk (senderId + group chat ID) | dd_chat_id + dd_senderId | Combination of sender's unique ID and group chat ID, used to distinguish users in group chats. |
| WhatsApp by Meta | WhatsApp User ID | wa_user_id | Unique identifier for a WhatsApp user, usually based on the user's phone number (e.g., international format with @c.us suffix). |
| WhatsApp by EngageLab | WhatsApp User ID | wa_user_id | Unique identifier for a WhatsApp user, usually based on the user's phone number (e.g., international format with @c.us suffix). |
| Discord | Discord User ID | discord_user_id | Unique numeric identifier for a Discord user. |
| Instagram senderId | instagram_user_id | Unique identifier assigned to the sender (Instagram user) by Instagram. | |
| senderId | facebook_user_id | Unique identifier assigned to the sender (Facebook user) by Facebook. | |
| Sobot | Sobot memberId | sobot_memberId | Unique Sobot user ID. |
| Sobot Group Chat @User | Sobot (guildId + channelId + memberId) | guildId + channelId + memberId | Combination of guild ID, channel ID, and member ID, uniquely identifying user interactions in Sobot group chats. |
| Intercom | senderId | intercom_senderId | Intercom user ID. |
| Zoho Sales IQ | Zoho conversationId | zoho_sales_iq_conversationId | Unique conversation identifier in Zoho Sales IQ. |
| WeChat Customer Service | WeChat Customer Service User ID | wechat_customer_service_user_id | Unique user ID for WeChat Customer Service. |
Anonymous ID Logic for Built-in GPTBots Channels
| Integration Channel | Anonymous ID Logic | Description |
|---|---|---|
| API | No anonymous ID | Users can only generate conversation IDs using user_id. |
| Workspace | anonymous_id = Browser Fingerprint ID | Random ID generated based on browser fingerprint. A new ID may be generated when clearing cache or using incognito mode. |
| Share | anonymous_id = Browser Fingerprint ID | Random ID generated based on browser fingerprint. A new ID may be generated when clearing cache or using incognito mode. |
| Iframe | anonymous_id = Browser Fingerprint ID | Random ID generated based on browser fingerprint. A new ID may be generated when clearing cache or using incognito mode. |
| AI Search | anonymous_id = Browser Fingerprint ID | Random ID generated based on browser fingerprint. A new ID may be generated when clearing cache or using incognito mode. |
| AI Search (iframe) | anonymous_id = Browser Fingerprint ID | Random ID generated based on browser fingerprint. A new ID may be generated when clearing cache or using incognito mode. |
| Widget | anonymous_id = Browser Fingerprint ID | Random ID generated based on browser fingerprint. A new ID may be generated when clearing cache or using incognito mode. |
When a user is logged in to the GPTBots platform, the system automatically sets their GPTBots Account ID as the
user_idand associates it with theanonymous_id(browser fingerprint ID).
Conversation Types
Conversation Type (conversation_type) is used to identify the scenario in which a user initiates a conversation. You can use the conversation_type field value to filter log data by scenario.
| Conversation Type | Field Value | Description |
|---|---|---|
| All | ALL | All conversation types |
| Workspace-Search | C | Conversations generated by Workspace Agent |
| Workspace-Agent | CHAT | Conversations generated by Workspace Search |
| Workspace-Workflow | C_WORKFLOW | Conversations generated by Workspace Workflow |
| Workspace-Apps | C_APPS | Conversations generated by various AI apps in Workspace Market |
| API | API | Conversations generated via API calls |
| Iframe | EMBED | Conversations generated via Iframe |
| Widget | WIDGET | Conversations generated via Widget |
| AI Search | AI_SEARCH | Conversations generated via AI Search |
| Share | SHARE | Conversations generated via Share |
| WhatsApp by Meta | WHATSAPP_META | Conversations generated via WhatsApp by Meta |
| WhatsApp by EngageLab | WHATSAPP_ENGAGELAB | Conversations generated via WhatsApp by EngageLab |
| DingTalk Bot | DINGTALK | Conversations generated via DingTalk Bot |
| Discord | DISCORD | Conversations generated via Discord |
| Slack | SLACK | Conversations generated via Slack |
| Zapier | ZAPIER | Conversations generated via Zapier |
| WeChat Customer Service | WXKF | Conversations generated via WeChat Customer Service |
| Telegram | TELEGRAM | Conversations generated via Telegram |
| LiveChat | LIVECHAT | Conversations generated via LiveChat |
| LINE | LINE | Conversations generated via LINE. If there are multiple LINE channels, there will be multiple channel options. |
| Conversations generated via Instagram | ||
| Conversations generated via Facebook | ||
| Sobot | SO_BOT | Conversations generated via Sobot |
| Zoho Sales IQ | ZOHO_SALES_IQ | Conversations generated via Zoho Sales IQ |
| Intercom | INTERCOM | Conversations generated via Intercom |
⚠️ Note: The field values in the table can be used as filter conditions when using the Get Conversation List API.
For third-party platforms like LINE and Telegram that support multiple channels, the "Agent-Log" allows filtering by secondary conversation types.
The field values in the table can also be used as the value for theanonymous_id_sourcefield in the Update User ID API.
