draft v0.1.0 2026-07-04

EPA-014 WeChat WeCom Integrations

EAOS 的咨询和线上学习业务需要站内论坛、企业微信、微信群和微信服务号协同运行。本卷定义外部微信生态接入的系统边界:EAOS 负责身份、权益、社群、任务、积分和知识沉淀;外部渠道负责触达、提醒、陪伴和项目沟通。

Positioning

企业微信、微信群和微信服务号不是 EAOS 的替代品,而是学习交付的触点。所有关键业务事实必须回到 EAOS:

Channel Responsibilities

ChannelPrimary roleEAOS source of truth
wecom_group训练营班主任服务、项目交付、任务催办LearningCommunity, CommunityMembership, CommunityChannelSyncJob
wechat_group轻量交流、活动提醒、情绪支持LearningCommunity, CommunityTopic
wechat_service_account报名确认、课程提醒、权益入口、续费提醒Entitlement, PurchaseOrder, RedemptionOrder, ReferralCommission
forum问题沉淀、案例复盘、长期检索CommunityTopic, CommunityReply, CommunityReport

Integration Boundary

第一阶段只做服务端适配层原型,不接真实商户或微信凭证。

允许:

不允许:

Core Workflow: Channel Sync Check

  1. 运营打开 /admin/
  2. 运营在社群管理中点击“同步渠道”。
  3. Admin API 创建 CommunityChannelSyncJob
  4. forum 渠道标记为 synced
  5. wecom_groupwechat_groupwechat_service_account 标记为 blocked_credentials
  6. 后台显示任务状态、渠道类型、供应方、目标和阻塞原因。
  7. 系统写入 community.channel.sync.requested 审计日志。

Core Workflow: Learning Touchpoint Queue

购买后触达必须服务于“学员下一步去哪里学”。

  1. 学员购买或兑换带社群的产品。
  2. Commerce API 创建订单、权益和社群成员关系。
  3. 系统为企业微信、微信群和微信服务号生成 CommunityTouchpoint
  4. 当前原型因没有真实凭证,外部渠道状态写为 blocked_credentials,并显示缺少凭证和回调配置。
  5. 后台展示触达队列和消息预览,运营能看到哪些提醒尚未真正发送,以及准备发送给学员的标题、正文和入口。
  6. 运营或服务端适配器可以把 queued 触达标记为 sentfailed,系统记录 sentAtlastError 和尝试次数。
  7. 生产版服务端适配器读取队列,发送报名确认、课程入口、资料提醒、直播回放和答疑通知。

同一个触达队列还用于社群公告和任务打卡:公告发布时提醒成员查看资料或安排,任务打卡后可提醒班主任复核或继续学习。所有外部触达必须能回到 EAOS 的权益、学习中心、论坛和社群任务。

消息预览字段不是最终微信模板 ID,而是 EAOS 生成的业务文案草稿。生产适配器可以把它映射为服务号模板消息、企业微信群通知或微信群人工提醒,但发送前必须再次校验授权、频率和内容安全。

Production Adapter Requirements

生产版接入前必须重新核验企业微信和微信公众平台的官方文档、账号权限、IP 白名单、回调验签、消息模板、用户授权、频率限制和数据留存要求。

服务端适配器必须满足:

Data Objects

ObjectKey fields
CommunityChannelcommunityId, type, label, externalRef, status, purpose
CommunityChannelSyncJobcommunityId, channelId, channelType, provider, operation, status, lastError, finishedAt
CommunityMembershipcommunityId, userId, role, status, sourceType, sourceId
EntitlementuserId, productId, type, status, sourceType, sourceId
CommunityAnnouncementcommunityId, title, body, targetChannels, status
CommunityTaskcommunityId, title, summary, pointsRuleCode, targetChannels
CommunityTouchpointcommunityId, userId, channelType, provider, eventType, sourceId, messageTitle, messageBody, actionUrl, status, lastError
AuditLogactorId, action, target, metadata

Acceptance

当前原型完成标准:

生产版完成标准: