Repository navigation
docs(revenue,sales): 按 contract.hook 与续约 flow 写实 Customer Since 幽灵与提醒收件人 (#824) - #841
Merged
Merged
Conversation
`crm_account` 上不存在 `customer_since`(`grep -rn customer_since src/` 零命中), 也没有任何其它名字的字段记录客户何时成为客户。合同激活(`contract.hook.ts:104-119`) 在**合同**上盖 `signed_date`、把 `account.type` 改成 `customer`,不写日期到客户上。 #805 / PR #823 已改掉 contracts 页,同一条声明还剩 revenue/index 与 sales/accounts 两页(各三语),本次按同一口径改写,不留幽灵引用。 revenue/index 的每日续约提醒按 `contract-renewal.flow.ts` 写实:唯一的 notify 节点 收件人只有 `{currentContract.owner_id}`(合同负责人,inbox + email),账户所有者与 账户上的续约负责人都收不到;同句顺带写上通知前先建的续约任务,并把「例如结束前 60 天」 换成合同自己的 `renewal_notice_days`(defaultValue: 30)。 仅文档,未动 `src/**`。要不要真加 `customer_since` 是产品决定,不由文档倒推。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHrPAGEgFDoHjphqYG4BMa
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
yinlianghui
marked this pull request as ready for review
August 5, 2026 23:20
This was referenced Aug 5, 2026
Merged
yinlianghui
added a commit
to yinlianghui/hotcrm
that referenced
this pull request
Aug 10, 2026
…k-ai#847) (objectstack-ai#861) case-triage.skill.ts 的 tools 只有 describe_object + get_record,没有任何检索 工具,因此工单分流页宣称的「历史工单」「支持知识库文章匹配」「最匹配的 KB 文章」 在工具面上不可达;「首次回复草稿」更与 skill 第 6 步(交给 email_drafting)直接 矛盾;「建议的分类」instructions 从未指派,且选项表里的「账单」在 crm_case.type 上并不存在。 customer_360 有 query_records,属于低一档的漂移:sales 页的近期活动 / 合同 / 营销参与与 service 页的合同状态 / 接触点只是 instructions 没让它读。两处 Customer 360° 段按 instructions 第 2-4 步重写为真实枚举与三段产出。 按 objectstack-ai#841/objectstack-ai#848 口径不静默删名:每一处被删的承诺都有一段说明它真正的去处。 src/** 未改动;知识库实体是否存在见 objectstack-ai#808。 Claude-Session: https://claude.ai/code/session_01VHrPAGEgFDoHjphqYG4BMa Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #824
#805 / PR #823 只修了
revenue/contracts.mdx三语。本 PR 收掉同一条幽灵声明剩下的两页(各三语),并按contract-renewal.flow.ts改掉同页的续约提醒收件人。前提复核(逐条,基线 origin/main = a501812,#823 / #831 / #835 / #839 均已在其中)
accounts.mdx×3 今天被 #768 改过、revenue/index被 #750 一族动过,故逐条在最新 main 上重核行号与事实:customer_since不存在grep -rn "customer_since" src/零命中(exit=1);account.object.ts的字段表里也没有任何其它名字记录「何时成为客户」——最接近的两个日期字段是last_activity_date(:338)与next_renewal_date(:383),都不是contract.hook.ts:104-119:合同上盖signed_date(仅当为空)、account.type改成customer(仅当还不是);触发条件是afterUpdate且input.status === 'activated' && previous?.status !== 'activated'revenue/index.mdx:43幽灵 bullet:43)sales/accounts.mdx:69幽灵 bullet:69)。#768 改的是同页别处,未触及本行revenue/index.mdx:45收件人过宽contract-renewal.flow.ts全流程只有一个 notify 节点notify_owner,recipients: ['{currentContract.owner_id}']单值,channels: ['inbox','email'];crm_account.owner_id与crm_account.renewal_owner在该 flow 中从未被读:42「Auto-promote account to Customer」与:44「午夜到期扫描,通知所有者」经核属实(contract-expiration.flow.ts:26是0 0 * * *,notify 收件人同样是合同负责人),按「不动已对的部分」保留原样改了什么(6 个文件,三语同步)
1. Customer Since 两处 —— 描述真实行为,不留幽灵引用
按 #823 已落的口径:两处都改成「激活真正做的那次写入 + 明说账户上没有这个日期 + 指出同期群该读哪儿」。没有默默删掉
Customer Since这个名字——照着它找过的读者需要一个去处。revenue/index.mdx:43:原「Auto-stamp Customer Since date on the first activation」→ 改为写实的另一次写入(合同上的 Signed Date,仅当为空时盖),并写明账户上不盖任何日期、没有 Customer Since 字段、同期群只能读合同的 Signed Date / Start Date。sales/accounts.mdx:69:原「The Customer Since date is captured on the first contract activation」→ 改为账户侧真实发生的自动更新(Type 变成 Customer),后半句明说不随之记任何日期。这条留在「Automatic updates」小节里仍然成立,而这正是 issue 点名的危险处:它与同小节里真实的last_activity_date、商机金额汇总、开放案例数并排。刻意没有写「激活写回账户的就只有这一件事」这类全称句:
account.hook.ts:118-121在类型变化时会盖last_activity_date(且仅限ctx.user?.id的用户写),hook 内 api 写入是否带用户上下文没有测试钉住,不在本 PR 断言。2.
revenue/index.mdx:45续约提醒 —— 按 flow 写实收件人从「the owner and the account owner」改为只有合同负责人(inbox + 邮件两通道),并明说账户所有者与账户上的续约负责人都收不到——这正是 issue 影响分析里那一条。
同句一并对齐(#794 先例,已披露)
改写
:45这一句时,同句里另两处若原样保留就会与新句自相矛盾,故一并对齐:notify_owner之前的边序是create_renewal_task→notify_owner(b4),任务先建。同页 lifecycle 第 5 步本来就写着「schedules a renewal task and a renewal reminder」,只改收件人而不提任务,会让同页两句对不上。(自动开续约商机那一步属 contracts 页深度,docs(contracts): 按到期/续约 flow 与 contract.object.ts 重写三语剩余三处失真 (#826) #831 已写全,本页概览不展开。)contract.object.ts:157-162是defaultValue: 30,窗口是每份合同自己的值;凭空举例的 60 天既非默认值也非任何声明值。按 docs(contracts): 按到期/续约 flow 与 contract.object.ts 重写三语剩余三处失真 (#826) #831 在 contracts 页写下defaultValue: 30的同一口径对齐。zh 两页的字段名按语言包拼写(#825 先例):
签署日期/开始日期/续约通知(天)(zh-CN.ts:555/527/547);accountszh 页的账户类型按语言包写作类型 = 正式客户(zh-CN.ts:64-66),与该页:119/:121已有的写法一致,不引入页面里没有的「客户类型」。越界发现(已单独立单 #840,本 PR 未修改)
grep换拼法后发现同一条幽灵声明还剩最后 6 处,全在content/docs/ai-copilot/:sales-copilot的 Customer 360°「关系快照」与service-copilot的案例分诊「客户画像」各三语,英文页写作customer-since(带连字符)、zh 页写作「成为客户的日期」,所以前三轮按Customer Since关键字的搜索都没扫到。两个技能的 instructions(src/skills/customer-360.skill.ts、case-triage.skill.ts)里也没有这个数据点。已按越界纪律另立 #840(不带 label、未 assign),先做过关键字 + 文件路径去重搜索,无同类在途单。其它
不为散文加钉子测试(与 #805 / #765 同)。仅文档:无 metadata / 行为 / 字段变更,
src/**与content/docs/releases/未动。要不要在crm_account上加customer_since仍是产品决定,本 PR 只是让文档不再声称它已经存在。本 PR 未新增任何链接。changeset:
.changeset/customer-since-ghost-and-renewal-recipient.md(hotcrm, patch)。验证
全量四件套 + lint + hygiene(
flock -w 7200 /tmp/os-heavy-verify.lock,NODE_OPTIONS=--max-old-space-size=4096,vitest--maxWorkers=2):控制字符:
pnpm hygiene现已覆盖 content/(#835 已落地,自报「the control-byte scan adds 382 under content, .changeset」),另对本次 6 个 mdx + changeset 做了越出 gate 的自扫:Generated by Claude Code