Repository navigation
docs(sales): 按对象/流程/语言包重写联系人退订、线索评分与 zh 版 presented 状态名 (#765) - #794
Merged
Merged
Conversation
…d` sections against the shipped metadata (#765) Three sections of the sales pages (and their zh-Hans / zh-Hant siblings) described a surface that does not exist, so a reader following them looked for fields and behaviour they could never find. Contacts advertised a fax field and a Fax Opt-out flag; `crm_contact` declares neither `fax` nor `fax_opt_out`, so both rows are removed rather than answered with new fields — whether HotCRM should carry a fax number is a product decision, not something a docs page settles. The two flags that do exist are now split by how far they are actually enforced: `email_opt_out` hides the Send Email action (`contact.actions.ts` `visible: record.email_opt_out == false`) and gates the welcome email (`contact-welcome.flow.ts`), while `do_not_call` is read by nothing outside the object and the form section — the page had claimed it blocks logging a Call task. The "admin-only, reps can only request a change" sentence goes with it: no profile in `src/profiles/` declares field-level permissions on either flag. Leads described a 0-100 score plus budget and timeline fields. There is one quality field, `rating` — labelled Lead Score, `Field.rating(5)` — and the scoring section is rewritten against `computeRating` in `lead.hook.ts`: the real weights, the rounding to whole stars, and the two limits the old text hid (it runs on beforeInsert only, and never overwrites a rating the caller supplied). The SLA table follows `lead-assignment.flow.ts`: rating >= 4 is `TODAY() + 1` with an inbox + email alert, everything else `TODAY() + 3` with an inbox alert; nothing extra happens at five stars. The Qualification row is written from the object's real `qualification` group, which forced one adjacent cell: `lead_source` and `next_followup_date` are declared there, not in `assignment`, so the Assignment row is trimmed to Owner rather than left contradicting the row above it. The rep tip contrasting "the star rating" with "the score" is reworded for the same reason — they are one field. The rest of that table's rows diverge too and are filed as #792. The Chinese quote pages translated `presented` as 已呈现 / 已呈現 while the shipped zh-CN locale pack calls it 已提交, so a Chinese reader could not match the docs to the screen. Every sentence naming the status follows the locale pack, not just the status table. Fixes #765 Claude-Session: https://claude.ai/code/session_01VHrPAGEgFDoHjphqYG4BMa Co-authored-by: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
…ot an email to the contact
Self-correction on the previous commit. `contact_welcome` is a flow name and a
notify topic, not an email template: `contact-welcome.flow.ts` notifies the
contact's OWNER ("Reach out to welcome them"), so `email_opt_out` suppresses
that prompt rather than an email sent to the person. The opt-out row said the
latter, repeating a claim the page's "Built-in rules" section makes further
down — that claim is wrong on three counts and is filed as #796, not fixed
here.
Refs #765
Claude-Session: https://claude.ai/code/session_01VHrPAGEgFDoHjphqYG4BMa
Co-authored-by: Claude <noreply@anthropic.com>
yinlianghui
marked this pull request as ready for review
August 5, 2026 20:27
This was referenced Aug 5, 2026
Merged
yinlianghui
added a commit
to yinlianghui/hotcrm
that referenced
this pull request
Aug 10, 2026
…es on the zh-Hant page (objectstack-ai#793) (objectstack-ai#803) `content/docs/sales/quotes.zh-Hant.mdx` called the `expired` quote status 「已到期」 in its status table and again in the daily-sweep bullet, while `crm_quote.status.options.expired` in `src/translations/zh-CN.ts` is 「已过期」 — 「已過期」 in traditional script. 到期 and 過期 are not the same word (a deadline arriving vs having lapsed), so a reader matching the page against the screen looked for a status the product never shows. Both status-name occurrences now follow the locale pack. The page's third mention — the standard-list-view section describing the nightly sweep — already said 已過期, so the page was contradicting itself as well as the product. Verb and field usages stay as they are, on the criterion PR objectstack-ai#794 set when it aligned `presented` (it deliberately left 「擷取其呈現時刻的定價」 alone): 「自動到期」 in the frontmatter names the expiry mechanism, 「每日到期掃描」 names the nightly sweep, and 「到期日期」 is the shipped label of the `expiration_date` field (`src/translations/zh-CN.ts`), not a status name. Docs follow the locale pack rather than the reverse, so nothing under `src/` changed. The leads half of the issue is delivered by objectstack-ai#792's PR, per the scope split recorded on both issues. Fixes objectstack-ai#793 Claude-Session: https://claude.ai/code/session_01VHrPAGEgFDoHjphqYG4BMa Co-authored-by: Claude <noreply@anthropic.com>
yinlianghui
added a commit
to yinlianghui/hotcrm
that referenced
this pull request
Aug 10, 2026
….ts (objectstack-ai#805) (objectstack-ai#823) The Contracts page's "On contract activation" list promised four things and the hook that runs on activation does two, neither of which was the first item's match. `contract_on_activation` (src/objects/contract.hook.ts:77-126) stamps `signed_date` on the CONTRACT when neither the update nor the stored record carries one (:104-109), and sets the account's `type` to `customer` when the account is not already one (:111-119). That is the whole of it. Of the four documented steps, three have no implementation anywhere: - "Customer Since date stamped on the account if blank" — `customer_since` is a ghost field. `grep -rn customer_since src/` is empty, and `crm_account` declares no field of any name for when an account became a customer, so the cohort analysis a reader would build on it has nothing to read. - "Welcome email sent to the primary contact (configurable)" — the contract domain ships two flows, `contract-expiration` and `contract-renewal`, both scheduled and both notifying the OWNER. No outbound customer mail is sent at activation and there is no configuration surface behind "(configurable)". Same promise, same shape as objectstack-ai#796 on the Contacts page. - "Notification to the account owner" — the hook raises no notification at all. The two contract `notify` nodes hang off the expiration and renewal sweeps. The signed-date stamp, which does happen, was the one step the page never mentioned; it is now step 1, with the condition stated from the code — set Signed Date in the same edit that activates and your value is kept. The surviving step is stated more tightly than "if it was a Prospect". The gate is `account.type !== 'customer'`, so a *Partner* and a *Former Customer* are promoted exactly as a *Prospect* is; documenting only the Prospect case hid a promotion that a partner-account owner would not expect. Two mechanics that decide whether anything happens are written down too: the hook is `async: true` with `onError: 'log'` (:82-83), so failures are logged rather than raised, and it is an `afterUpdate` hook (:80) with a `previous?.status === 'activated'` guard (:88) — a contract created already *Activated* by an import, by seed data or by an integration writing the record in one shot triggers neither write, and its account stays a *Prospect*. Same-page consistency (the objectstack-ai#794 precedent): the admin tip called activation a "flow" and sent the reader to the flow list to customize it. It is an object hook and does not appear there, so the tip now names the file and keeps the pointer for the expiration and renewal sweeps, which really are scheduled flows. Documentation only — no metadata, behaviour or field changes. Whether HotCRM should send a welcome email or carry a `customer_since` field is a product decision and is deliberately left open. Fixes objectstack-ai#805 Claude-Session: https://claude.ai/code/session_01VHrPAGEgFDoHjphqYG4BMa Co-authored-by: Claude <noreply@anthropic.com>
os-sales
pushed a commit
that referenced
this pull request
Sep 3, 2026
…abels #837 landed the mechanism scoped to object names. This extends `TERMS` to `status.options.*` and field `label`s — the four defects #802 was filed on — and answers that card's open question 2: mechanism prose is spared by ledger granularity (the complete term), not by syntactic position. Measured, not assumed: 71 lines carry 到期 and 14 carry 呈现 across the 134 Chinese pages; zero carry 已到期, 过期日期 or 已呈现. The narrowing the card proposed (status-table cells plus `**bold**` refs) would have missed six of the nineteen historical defect sites, which carried no markup at all. The extension found one live defect: `crm_quote.crm_contact.help` in the zh-CN pack quoted 「已呈现」, a status the console does not show — introduced by #1017 (landed as #1068) after #794 had swept the repo clean of that spelling. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019hUuCQStzXGMFSX4dzww5t
This was referenced Sep 3, 2026
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 #765
三处 sales 文档描述了产品里不存在的表面。以
src/objects/*.object.ts、src/flows/*.flow.ts、src/objects/lead.hook.ts、src/translations/zh-CN.ts为唯一事实来源重写,纯文档改动,不动src/**,不为散文加钉子测试(#765 明确要求)。前提复核(基线已过期,逐条在 cdbd863 上重核)
立单基线是 c55aaf5,
leads.mdx当天已被 #768、#774 改过。逐条结论:fax只命中contacts.mdx三行文档,src/**零命中crm_contact.do_not_call只被对象声明、表单区块(contact.view.ts:97)和四个语言包引用,无 hook / flow / validation 读它src/profiles/的四处fields:字段级权限里没有这两个字段lead.object.ts只有rating: Field.rating(5)(:200,label 是Lead Score),无 score / budget / timelinelead.hook.ts:130-149的computeRating加权后Math.round到 1-5 整星,且只在beforeInsert且typeof input.rating !== 'number'时写入(:181)lead-assignment.flow.ts:67是{TODAY() + 1}(明天),另一支:91是{TODAY() + 3}e2的record.rating >= 4触发(:127),走 inbox + email 两通道,与满五星无关:132)presented译作「已呈现」:16(不是:14),且同页另有 5 处句子把该状态称作「已呈现」(:21/:89/:93/:104/:128)。只改状态表会让同一页出现两种叫法,故 6 处一并对齐按 #785 先例,实测与断言不符的地方以实测为准,已在上表标注。
改了什么
1.
contacts.mdx×3Contact Information删「传真」,Communication Preferences删「传真退订」。是删不是补 —— 是否需要传真字段是产品决定,不该由一篇文档倒推。contact.actions.ts的send_email带visible: record.email_opt_out == false(locations: record_header / list_item),contact-welcome.flow.ts的 start 条件也以它为门。:48-58区间内,重写该段时无法保留):「每个标志以红色徽章显示在界面顶部」(contact.view.ts无任何 badge 声明)、「营销活动会将其排除」(campaign-enrollment.flow.ts:80过滤的是crm_lead.email_opt_out,联系人不进这条链路)。zh-CN.ts的「拒绝邮件」「禁止致电」),与 §3 同一条 contract-first 规则。第二个 commit 是对我自己第一版措辞的订正:
contact_welcome不是邮件模板,是 flow 名与 notify topic,通知发给联系人的负责人("Reach out to welcome them"),不是发给联系人本人。所以email_opt_out挡掉的是「给负责人的打招呼提醒」。同页「Built-in rules」小节把它写成「自动向对方发送 contact_welcome 邮件模板」,三点都不对,已立 #796,本 PR 不顺手改。2.
leads.mdx×3qualificationgroup 的真实成员重写。这连带要求改一格:lead_source与next_followup_date声明在qualification(lead.object.ts:206/299)而非assignment,若只改一行,两行会在同一张表里互相打架,故 Assignment 行收敛为「负责人」。computeRating重写:真实六项权重、上限 5 下限 1 四舍五入到整星、只在创建时运行、不覆盖调用方给的 rating。删掉「互动信号——近期网页访问、网络研讨会出席」(无任何对应实现)。lead-assignment.flow.ts:四星及以上 → 明天 + inbox 与 email 双通道告警;其余(含无评级)→ 三天后 + 仅 inbox。并写明满五星不额外触发任何事。src/objects/lead.hook.ts)。3.
quotes.zh-Hans.mdx/quotes.zh-Hant.mdxpresented的译名跟zh-CN.ts:471的「已提交」,状态表加正文共 6 处。en 页无此问题,未改。:8的「呈现时刻」与:113的「以看板呈现」是动词用法,不是状态名,保留。越界发现(已单独立单,本 PR 不修)
fieldGroups不符:leads 的 Company Information / Additional Info 行字段错位、tags是幽灵字段、整个 Duplicate Management 区块缺行(表称 9 个区块而对象声明 10 个);contacts 的is_primary、reports_to位置错、漏owner_id/avatar/last_contacted_date。quotes.zh-Hant.mdx:19把expired译作「已到期」,语言包是「已过期」(zh-Hans 页是对的)。contacts.mdx「内置规则」的欢迎邮件条目:收件人、载体、触发条件三点都与contact-welcome.flow.ts不符。验证
全量跑(docs 改动,确认零测试影响):
控制字符自扫全部改动文件 + changeset:
grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f]'零命中。本 PR 未新增任何链接(只删除了一处
/docs/administration/automation链接),link-check 无新增面。changeset:.changeset/sales-docs-ghost-fields.md(hotcrm, patch)。