Repository navigation
docs(quotes): say what Generate Quote does: stage rule, no activity stamp, inbox and email notice - #2023
Merged
Conversation
The Quotes page's "Generating a quote" section, in en, zh-Hans and zh-Hant, now matches the quote_generation flow: the deal moves to Proposal only from Prospecting, Qualification or Needs Analysis and keeps its stage while awaiting approval; no activity date is stamped; the rep is notified in the in-app inbox and by email, and the email leaves the server only once outgoing mail is configured. The phantom "built-in templating" is dropped and the Generate Quote button's open-deal-only visibility is stated. Claude-Session: https://claude.ai/code/session_012zh91QzFgePbkmuHnugLN3 Co-authored-by: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This was referenced Oct 8, 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 #2021
Clause-②: no
The Quotes page's Generating a quote section (
content/docs/sales/quotes.mdx,.zh-Hans.mdx,.zh-Hant.mdx) described a run thequote_generationflow does not perform. This PR rewrites that section only, in all three locales, so every sentence matches the flow onmain49fe305a(after #2020's approval-hold change). Nosrc/**change: the flow is right, the page was wrong.What the page said, measured against the flow before the fix
49fe305agenerate_quoteis visible only whilestageis neitherclosed_wonnorclosed_lost(src/sales/actions/opportunity.actions.ts:221):131-132, ADR-0077); now "When you submit it, the system:"prospecting/qualification/needs_analysis, and only whenapproval_statusis notpending(edgee4a,:204-206); every other case keeps the stage (edgee4b,:207-209)fields: { stage: 'proposal' }(:155); the flow's own comment at:152-153:crm_opportunityhas nolast_activity_datefieldnotify_owner(:161-169):channels: ['inbox', 'email'], topicquote_created, templatecrm.quote_created,actionUrl: '/crm_quote/{quoteId.id}'. The email leaves the server only when outgoing mail is configured (measured below)crm_quoteexist anywhere insrc/; the quote hasenable.files: true(src/revenue/objects/quote.object.ts:280)Steps 1 and 2 (Draft status, the opportunity's amount as subtotal, the discount applied) were right and stay, with the details
create_quotesets added.Measurements (pin
@objectstack/*17.7.0, on49fe305a, through@objectstack/verify)Two throwaway probes ran under the shared verify lock and were deleted afterwards (not committed). They booted the shipped artifact via
hotcrmStack()and ranflows.run/flows.resumeas asales_repwith discount 10 and validity 30 days.Stage rule, one $50K deal per stage:
The approval case is already pinned by
test/flow-quote.test.ts(the #2015 block): a rep-created $200K deal withapproval_statuspendingkeepsqualification, and the quote is still drafted. Once the approval is decided (approved), the deal advances.Quote fields written (all five runs):
statusdraft,subtotal50000,discount10,discount_amount5000,total_price45000,quote_datetoday,expiration_datetoday + 30,payment_termsnet_30, owner = the rep,tax/shipping_handlingnull.No activity stamp:
registeredFields('crm_opportunity')has nolast_activity_date(crm_accounthas one). The account'slast_activity_datewas null before and after all five runs.Notification:
successafter 1 attempt; thesys_inbox_messagetitle is "Quote created: PQ-prospecting",action_url/crm_quote/ID.new EmailServicePlugin()with no options): every delivery failed 3 times withVALIDATION_FAILED: from address required, so no mail went out.objectstack servecomputes for a deployment that configured no mail (resolveEmailCapabilityArg({}, {}), called from the CLI, not hand-copied): providerlog, senderno-reply@objectstack.local. The delivery row issuccessand thesys_emailrow readssent, but the boot log saysEmailServicePlugin: no transport configured — using LogTransport (mail will NOT be sent), and the send is[LogTransport] would send email … "subject":"Quote created: PQB-1". The settings binding also logs "Mail has never been configured — this is the out-of-the-box state."So: inbox yes; email yes as a declaration, and on a default install nothing reaches a mailbox. The page now says that and points to the Email & Calendar guide, which already documents the log-only fallback.
The fix, sentence by sentence (en; the zh pages mirror it)
opportunity.actions.ts:221:40:63-67(defaultValue: 0, label interpolatesQUOTE_DISCOUNT_CEILING)create_quote:79-88,:115; no node writescrm_quote_line_item:113-114(rounded CEL envelopes)e4a:204-206,e4b:207-209,update_opportunity:155notify_owner:161-169, and the measurement above:152-155, and the measurement abovequote.object.ts:280(files: true)UI nouns follow the page's existing usage and the language packs: the stages Prospecting / Qualification / Needs Analysis / Proposal / Negotiation in en, 寻找客户 / 资格审查 / 需求分析 / 提案 / 谈判 in zh-Hans with Traditional forms in zh-Hant; Approval Status Pending is 审批状态 审批中 (zh-CN pack
objects.pipeline.ts:286-287).Scope
content/docs/sales/quotes.mdx,quotes.zh-Hans.mdx,quotes.zh-Hant.mdx(§ Generating a quote only), and.changeset/2021-quotes-generating-a-quote.md(empty frontmatter; docs only, releases nothing).Gates
pnpm verifyran ona33872ab(git rev-parse --short HEAD, echoed by the run) underos-verify-lock.sh:VERDICT command-exit 0.objectstack validate:✓ Validation passed.tsc --noEmit: clean.objectstack lint --strict: 18 suggestions, no errors.lint:i18n-gate:✓ i18n lint gate: 0 i18n/missing-* issues.hygiene:✓ source hygiene clean.hygiene:tokens:✓ source token ratchet clean.objectstack build: artifact written.vitest run:Test Files 172 passed (172),Tests 3566 passed | 1 skipped (3567).The docs checks that read these pages run inside
vitest run.test/docs-anchor-links.test.tsparses every.mdxwithremark-mdxand fumadocs' ownremarkHeading, and resolves every link and anchor, including the two this PR adds:/docs/revenue/approvalsand/docs/guides/email-and-calendar, plus their zh siblings.Declared to CI, not run locally: the
docs-appworkflow's Fumadocs/Next build (apps/docs, which has its own lockfile and install). It is triggered bycontent/docs/**.Acceptance notes (noted, not filed here)
src/revenue/data/revenue.seed.ts:123-125says the seeded quote lines are "exactly what thequote_generationflow does when it clones opportunity lines onto a quote". The flow clones no lines. This is a source comment only, so the changeset and the page are unaffected.Generated by Claude Code