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 Generation Logic
Anonymous IDs are used to uniquely identify users across various integrated platforms and channels. The following table outlines the logic for generating anonymous IDs for each platform:
| Platform/Channel | Anonymous ID Logic | Description |
|---|---|---|
| Telegram | anonymous_id = tg_user_id | tg_user_id: Unique identifier for Telegram users |
| Telegram Group Chat | anonymous_id = tg_chat_id + tg_user_id | tg_chat_id: Unique group chat ID; tg_user_id: Unique user ID |
| LINE | anonymous_id = line_user_id | Unique identifier for LINE users |
| LiveChat | anonymous_id = lc_thread_id | Unique identifier for LiveChat conversation threads |
| Slack | anonymous_id = slack_user_id | Unique identifier for Slack users |
| Slack Public Channel | anonymous_id = slack_team_id + slack_channel_id + slack_user_id | Combination of team, channel, and user IDs for unique identification in public channels |
| Intercom | anonymous_id = intercom_user_id | Unique identifier for Intercom users |
| DingTalk | anonymous_id = dd_user_id | Unique identifier for DingTalk users |
| DingTalk Group Chat | anonymous_id = dd_chat_id + dd_senderId | Combination of group chat and sender IDs for unique identification |
| WhatsApp by Meta | anonymous_id = wa_user_id | Unique identifier for WhatsApp users, typically based on phone number (e.g., @c.us suffix) |
| WhatsApp by EngageLab | anonymous_id = wa_user_id | Same as above |
| Discord | anonymous_id = discord_user_id | Unique numeric identifier for Discord users |
| anonymous_id = instagram_user_id | Unique identifier assigned to Instagram message senders | |
| anonymous_id = facebook_user_id | Unique identifier assigned to Facebook message senders | |
| Sobot | anonymous_id = sobot_memberId | Sobot user ID |
| Sobot Group Chat @User | anonymous_id = sobot_guildId + sobot_channelId + sobot_memberId | Unique identifier for Sobot group chat interactions |
| Zoho Sales IQ | anonymous_id = zoho_sales_iq_conversationId | Unique identifier for Zoho Sales IQ conversations |
| WeChat Customer Service | anonymous_id = wechat_customer_service_user_id | WeChat Customer Service user ID |
GPTBots Built-in Channel Anonymous ID Logic
For GPTBots built-in channels, anonymous IDs are generated based on browser fingerprinting:
| Channel | Anonymous ID Logic | Description |
|---|---|---|
| API | No anonymous ID | Only user_id is used to generate conversation IDs |
| Workspace | anonymous_id = browser fingerprint ID | Random ID generated from browser fingerprint; may change if cache is cleared or in incognito mode |
| Share | anonymous_id = browser fingerprint ID | Same as above |
| Iframe | anonymous_id = browser fingerprint ID | Same as above |
| AI Search | anonymous_id = browser fingerprint ID | Same as above |
| AI Search (iframe) | anonymous_id = browser fingerprint ID | Same as above |
| Widget | anonymous_id = browser fingerprint ID | Same as above |
When a user is logged into the GPTBots platform, their GPTBots account ID is automatically set as
user_idand linked to theanonymous_id(browser fingerprint ID).
Conversation Types and Source IDs
- Conversation Type (
conversation_type): Identifies the integration channel through which a conversation is initiated (e.g., Workspace, API, Iframe, WhatsApp, LINE, etc.). This field allows for filtering log data by channel type. - Source ID (
source_id): Identifies the sub-type of the integration channel (e.g., different LINE Channel IDs, different Telegram Bot IDs). This field allows for filtering log data by sub-channel.
| Conversation Type | conversation_type | Description |
|---|---|---|
| All | ALL | Conversations from all integrated channels |
| Workspace - Search | C | Conversations from Workspace Agent |
| Workspace - Agent | CHAT | Conversations from Workspace Search |
| Workspace - Workflow | C_WORKFLOW | Conversations from Workspace Workflow |
| Workspace - Apps | C_APPS | Conversations from Workspace Market AI Apps |
| API | API | Conversations from API integration |
| Iframe | EMBED | Conversations from Iframe integration |
| Widget Bubble | WIDGET | Conversations from Widget integration |
| AI Search | AI_SEARCH | Conversations from AI Search integration |
| Share | SHARE | Conversations from Share integration |
| WhatsApp by Meta | WHATSAPP_META | Conversations from WhatsApp by Meta integration |
| WhatsApp by EngageLab | WHATSAPP_ENGAGELAB | Conversations from WhatsApp by EngageLab integration |
| DingTalk Bot | DINGTALK | Conversations from DingTalk Bot integration |
| Discord | DISCORD | Conversations from Discord integration |
| Slack | SLACK | Conversations from Slack integration |
| Zapier | ZAPIER | Conversations from Zapier integration |
| WeChat Customer Service | WXKF | Conversations from WeChat Customer Service integration |
| Telegram | TELEGRAM | Conversations from Telegram integration |
| LiveChat | LIVECHAT | Conversations from LiveChat integration |
| LINE | LINE | Conversations from LINE integration; multiple channels supported |
| Conversations from Instagram integration | ||
| Conversations from Facebook integration | ||
| Sobot | SO_BOT | Conversations from Sobot integration |
| Zoho Sales IQ | ZOHO_SALES_IQ | Conversations from Zoho Sales IQ integration |
| Intercom | INTERCOM | Conversations from Intercom integration |
| Livedesk | LIVEDESK | Conversations from Livedesk integration |
⚠️ Note: The field values in the tables above can be used as filter criteria when querying conversation data via the API: Get Conversation List.
For third-party platforms such as LINE and Telegram that support multiple sub-channels, the "Agent-Log" supports two-level filtering by conversation type.
