How to get the number of customer groups?

What are we trying to achieve?

Why isn’t the Feishu group chat showing up? I want to know how many groups are connected in WeCom and what the chat type is. The number 195 is definitely incorrect.

Related Configuration

Whether to use the knowledge base, AI skills, or MCP tool calls:

Methods Tried

If none, please write “None”.

Please do not post full system keys, customer information, or unmasked conversations.

3Chat Historical Message Query - MCP Related Enumerations

Sender

The sender is determined by senderType; other fields are used to supplement name, avatar, and platform account information.

senderType Meaning
-1 Unknown
0 System
1 Visitor
2 Human Agent
3 AI Agent
4 Third-party System

Supplementary Fields:

  • senderId: Sender ID.
  • senderName: Sender name, often used for third-party platform customer service.
  • senderInfo: Group chat member information, including member ID, channel account ID, name, and avatar.
  • humanAgent: Human agent information, including name, avatar, and employee ID.
  • processedBy: The party that processed the message, not the sender. 0 indicates unknown, 1 indicates human agent, and 2 indicates AI agent.

Message Status

status Meaning
2 Sent
4 Read
5 Send Failed

Common Message Types

messageType Meaning
0 Unknown
1 File
2 Voice
3 Business Card
4 Chat History
5 Emoji
6 Image
7 Text
8 Location
9 Mini Program
10 Money-related Message
11 Recall
12 Link
13 Video
14 Video Channel Message
15 Voice or Video Call
16 Group Chat Relay
17 Note
20 Xiaohongshu Note Message
1001 Xiaohongshu Note Comment
9999 Group Join Invitation
10000 System Message
10001 WeCom System Message
10002 Application Type Message

Channel Information

Each message may contain the following channel fields:

  • channelId: Specific channel record ID.
  • channel.type: Technical integration type, indicating which channel adapter was used for access.
  • channel.sourceType: Actual business channel, used for display, filtering, and statistics.
  • Top-level channelType: Optional field on the message; not recommended as the primary basis for determining the channel.

When determining which channel a message comes from in a business context, prioritize using message.channel.sourceType; when determining which integration adapter processed it, use message.channel.type.

Technical Integration Types

channel.type Channel
email Email
liveChat Website Live Chat
wechatPublic WeChat Official Account or Service Account
feishu Feishu
lazadaSeller Lazada
openApi OpenAPI
qywechat WeCom or WeChat Customer Service Access
chatly Chatly
wxxd WeChat Store
shopify Shopify
shopline Shopline
meta Meta
instagram Instagram
sandbox Sandbox
manychat ManyChat
discord Discord
craftAgent Craft Agent
chatperson ChatPerson
unknown Unknown

Business Source Channels

channel.sourceType Channel
unknown Unknown
wechat WeChat
wecom WeCom
wechatPublic WeChat Official Account
wechatCustomerService WeChat Customer Service
whatsapp WhatsApp
facebook Facebook
instagram Instagram
tiktok TikTok
microApp Mini Program
douyin Douyin
dingding DingTalk
feishu Feishu
xhs Xiaohongshu
email Email
liveChat Website Online Chat
lazadaSeller Lazada
openApi OpenAPI
qywechat WeCom Compatible Type
chatly Chatly
shopify Shopify
shopline Shopline
wxxd WeChat Store
discord Discord
craftAgent Craft Agent
chatperson ChatPerson
line LINE
sms SMS
telegram Telegram
sandbox Sandbox
  • DingTalk Enumerations: Yes

    • channel.sourceType = "dingding"
  • Feishu Enumerations: Yes

    • channel.type = "feishu"
    • channel.sourceType = "feishu"
  • Group Chat Enumerations:

    • The field is located in conversations[conversationId].subjectType in the response:
      • "VISITOR": Direct chat
      • "GROUP": Group chat

The system does not have a separate “Feishu Group Chat” enumeration. You should use a combined check:

conversation.subjectType === "GROUP" &&
message.channel?.sourceType === "feishu"

The same logic applies to DingTalk group chats:

conversation.subjectType === "GROUP" &&
message.channel?.sourceType === "dingding"