本文へ移動
cccskills
無料GitHub で公開

quote-to-cash-requirements

Use when designing or validating the end-to-end quote-to-cash process on standard Salesforce: Opportunity to Quote to Synced Quote to Approval Process to Quote PDF to Order creation. Trigger keywords: quote approval, discount policy, quote PDF limits, order from quote, quote sync, quote template. NOT for CPQ pricing rules or discount schedules — use admin/cpq-pricing-rules. NOT for building the quote template itself — use admin/quotes-and-quote-templates.

インストール方法を見る

含まれるファイル(7)

  • SKILL.md15.2 KB
  • references/examples.md4.2 KB
  • references/gotchas.md4.9 KB
  • references/llm-anti-patterns.md6.4 KB
  • references/well-architected.md5.6 KB
  • scripts/check_quote_to_cash_requirements.py8.9 KB
  • templates/quote-to-cash-requirements-template.md4.6 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Quote-to-Cash Requirements

Use this skill when mapping, designing, or auditing the standard Salesforce quote-to-cash process — from Opportunity through Quote, approval, PDF generation, and Order handoff. It is grounded in standard Sales Cloud objects and does not cover CPQ/Revenue Cloud.


Before Starting

Gather this context before working on anything in this domain:

  • Confirm whether the org uses standard Quotes (enabled in Setup > Quotes Settings) or CPQ/Revenue Cloud. If CPQ is in play, stop here and route to CPQ skills.
  • Identify the discount approval thresholds — typically expressed as a percentage off list price, a total deal amount, or both.
  • Determine whether Orders need to be auto-created or manually created from accepted quotes, and whether Order Products need to carry over from Quote Line Items.
  • Check if the org uses multi-currency — this affects Pricebook assignment on Quotes and Quote Line Items.
  • Confirm the Quote Template requirements: logo, legal footer, line item grouping, bundled products display, and any per-customer branding variations.

Core Concepts

1. The Standard Quote-to-Cash Object Chain

The canonical flow on standard Sales Cloud objects is:

Opportunity -> Quote (+ QuoteLineItem) -> Synced Quote -> Approval Process -> Quote Status = Accepted -> Order (+ OrderItem)

Key platform rules:

  • A single Opportunity can have multiple Quotes, but only one Synced Quote at a time. Syncing a Quote copies the Quote's line items to the Opportunity's Products (OpportunityLineItem records). Syncing a second Quote removes the first sync.
  • Quote Line Items are linked to PricebookEntry records — the Quote must reference the same Pricebook as the Opportunity.
  • When a Quote Status is set to Accepted, you can manually create an Order from the Quote (via the Create Order button), which generates an Order with OrderItem records mirroring the QuoteLineItems. This is not automatic by default — a Flow or Apex trigger is needed to automate it.
  • Orders generated from Quotes carry a reference to QuoteId on the Order record.

2. Approval Processes on Quotes

Salesforce Approval Processes can be triggered on the Quote object with entry criteria based on:

  • Discount field (Quote-level overall discount %)
  • TotalPrice or GrandTotal field
  • Custom formula fields combining both

Critical constraints:

  • The Quote record is locked during approval. Reps cannot edit line items while approval is pending — this is a common business-process pain point that must be called out in requirements.
  • Only one active approval process can run on a record at a time. If multi-tier approvals (manager then director) are needed, configure them as steps within a single process, not separate processes.
  • Email alerts used in approval steps must reference Quote-related merge fields (e.g., {!Quote.Name}, {!Quote.GrandTotal}) — these are not available via the standard Opportunity email templates.
  • Approval entry criteria are evaluated at submission time; if the Quote is edited post-submission (after recall), criteria are re-evaluated on the next submission.

3. Quote Templates and PDF Generation

Quote Templates define the layout of the generated PDF document. Platform limits:

  • Maximum 30 pages per generated Quote PDF.
  • Maximum 100 line items rendered in a Quote Template.
  • Templates are built in the Quote Template editor (not Lightning App Builder). They use a proprietary section/field layout — not standard page layouts.
  • Rich-text fields on Quote are not supported in templates. Use plain-text custom fields for dynamic legal language.
  • Quote Templates support conditional sections but logic is limited to show/hide based on field values — no scripting.

4. Order Creation and Handoff

Orders created from Quotes:

  • Must have an Account and a Price Book (inherited from the Quote).
  • OrderItems are created from QuoteLineItems — unit price, quantity, and product references carry over.
  • The Order Status field starts at "Draft" by default. Activating the Order (Status = Activated) locks it — line items cannot be changed after activation.
  • Contracts linked to Orders are a separate optional step in the lead-to-cash chain; Quote acceptance does not auto-create a Contract.

Common Patterns

Pattern: Tiered Discount Approval (Single Approval Process, Multiple Steps)

When to use: Business requires manager approval above 10% discount and director approval above 25% discount.

How it works:

  1. Create one Approval Process on the Quote object.
  2. Set entry criteria: Quote.Discount >= 10 (or formula combining discount + deal size).
  3. Step 1: Route to Quote.Opportunity.Owner.Manager with step-entry criteria Quote.Discount < 25. Mark step as "Go to Next Step" on approval.
  4. Step 2: Route to a named Director user (or queue) with no additional step-entry criteria (catches >= 25%).
  5. On Final Approval action: set Quote.Status = Approved.
  6. On Rejection action: set Quote.Status = Denied and send email alert to rep.

Why not two separate processes: Salesforce only processes one approval at a time per record. A second process would not trigger if the first is already satisfied or would cause unpredictable behavior.

Pattern: Auto-Create Order on Quote Acceptance via Flow

When to use: Business wants an Order automatically generated when a rep sets Quote Status to Accepted — without requiring a manual button click.

How it works:

  1. Create a Record-Triggered Flow on Quote, fired on Update, with entry criteria Status changed to Accepted.
  2. Use a Create Records element to create an Order: set AccountId, Pricebook2Id, QuoteId, Status = Draft, EffectiveDate = TODAY().
  3. Loop over QuoteLineItems related to the Quote and create OrderItem records for each: OrderId, Product2Id, UnitPrice, Quantity, PricebookEntryId.
  4. Optionally set Quote ContractId if contract generation is also required.

Why not a Process Builder trigger: Process Builder is legacy. Flow is the current standard and gives more control over the OrderItem loop.


Decision Guidance

SituationRecommended ApproachReason
Single discount threshold for approvalOne-step Approval Process on Quote with entry criteria on Discount fieldSimplest; native; no code required
Two or more discount tiers require different approversSingle Approval Process with multiple steps, each with step-entry criteriaSalesforce only runs one approval process at a time on a record
Auto-create Order on quote acceptanceRecord-Triggered Flow on Quote (Status = Accepted)Approval Process Final Actions cannot create related child records; Flow can
Quote PDF needs custom branding per customer segmentMultiple Quote Templates assigned by Record Type or Flow logicQuote Templates are per-template; not dynamic — use multiple templates
More than 100 line items on a single quoteSplit quote into multiple quotes or upgrade to CPQStandard Quote Template limit is 100 line items rendered
Bundle products with configuration logicEvaluate CPQ/Revenue CloudStandard Quote Line Items have no bundle hierarchy or attribute logic
Multi-currency quotesEnsure Quote references the correct Pricebook with currency-specific PricebookEntriesQuote Line Items inherit currency from the Quote Pricebook — mismatch causes errors

Recommended Workflow

Step-by-step instructions for an AI agent or practitioner working on this task:

  1. Confirm standard vs. CPQ scope — Verify Quotes are enabled in Setup > Quotes Settings and that the org is not running CPQ/Revenue Cloud. If CPQ is active, route to the CPQ skill.
  2. Map the approval policy — Document discount thresholds, approver hierarchy, and what happens on rejection (Status change, rep notification). Confirm whether a single-level or multi-level approval is needed.
  3. Assess Quote Template requirements — Gather layout specs: logo placement, line item grouping, conditional sections, legal text. Flag if more than 100 products are expected on a single quote (hard platform limit).
  4. Design the object and field model — Identify custom fields needed on Quote or QuoteLineItem (e.g., custom discount %, override justification). Confirm Pricebook alignment with Opportunity.
  5. Build the Approval Process — Configure entry criteria, steps, approver sources, lock behavior, and final approval/rejection actions. Test with a sandbox quote at each discount tier.
  6. Implement Order creation automation — Build a Record-Triggered Flow on Quote to auto-create Order and OrderItems on Status = Accepted. Validate that OrderItem PricebookEntry references are correct.
  7. Validate end-to-end in sandbox — Walk through: create Opportunity -> add Products -> create Quote -> sync Quote -> submit for approval -> approve -> verify Order created -> preview PDF against template limits.

Review Checklist

Run through these before marking work in this area complete:

  • Quotes feature is enabled in Setup (Setup > Quotes Settings > Enable Quotes)
  • Approval process entry criteria match documented discount/amount thresholds
  • Record lock behavior during approval has been communicated to business stakeholders
  • Quote Template has been tested with the maximum expected line item count (confirm < 100)
  • Order creation (manual or automated) tested end-to-end in sandbox
  • Multi-currency Pricebook entries are consistent with Quote currency if multi-currency is enabled
  • Approval rejection path sets Quote Status and notifies rep via email alert
  • Flow for Order creation handles zero-quantity or $0 line items without errors

Salesforce-Specific Gotchas

Non-obvious platform behaviors that cause real production problems:

  1. Syncing a second Quote removes the first sync — When you sync a new Quote to an Opportunity, all Opportunity Products (OpportunityLineItem records) are replaced with the new Quote's line items. Any Products manually added to the Opportunity are lost. This surprises reps who juggle multiple quote versions.
  2. Quote is locked during approval including line items — The entire Quote record and its related QuoteLineItems are locked when an approval is pending. Reps cannot add, remove, or reprice products until the quote is recalled or a final decision is made.
  3. Approval Process Final Actions cannot create child records — Final Approval/Rejection actions on an Approval Process support field updates, email alerts, tasks, and outbound messages — but not record creation. A Flow triggered by the resulting field update is required for Order creation.
  4. Quote Template PDF limit: 30 pages and 100 line items — These are hard platform limits. Quotes exceeding 100 line items will silently truncate the PDF. There is no warning to the user.
  5. Quote currency is set at creation and cannot be changed — The currency on a Quote is locked at creation time. If the Opportunity currency or Pricebook changes, the Quote must be deleted and recreated.

Output Artifacts

ArtifactDescription
Quote-to-cash process mapSwimlane diagram showing stages, owners, object transitions, and approval handoffs
Approval process design documentEntry criteria, step definitions, approver sources, lock behavior, final actions
Quote Template specificationLayout sections, fields, conditional blocks, line item grouping, PDF output expectations
Order creation requirementsTrigger condition, field mapping from Quote to Order and QuoteLineItem to OrderItem
CPQ gap analysisList of requirements that cannot be met by standard Quote objects, requiring CPQ evaluation

Related Skills

  • products-and-pricebooks — Required prerequisite: products and Pricebook entries must exist before Quote Line Items can be added.
  • approval-processes — Detailed approval process design and troubleshooting patterns.
  • opportunity-management — Opportunity stage gates and how they interact with quote sync status.
  • architect/cpq-vs-standard-products-decision — Use when line item volume, bundle logic, or pricing complexity exceeds standard Quote object capabilities.

Official Sources Used

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Use this skill when writing test-first, behavior-driven acceptance criteria in Given/When/Then format for a Salesforce user story. Covers happy path, edge cases, negative paths, permission boundaries, and data-state preconditions so the AC block can drive UAT scripts and Apex test design downstream. Trigger keywords: given when then, gherkin, behavior driven AC, test first acceptance criteria, scenario outline, BDD acceptance criteria. NOT for the user-story format itself (use admin/user-story-writing-for-salesforce). NOT for UAT script writing (use admin/uat-test-case-design). NOT for Apex test method generation (use agents/test-class-generator). NOT for high-level UAT planning (use admin/uat-and-acceptance-criteria). More triggers: acceptance criteria record, ac_id, req_id on a criterion, artefact under test, negative case for a rule-type requirement, no-match fall-through criterion, oracle for a Then clause, test type apex flow manual, criteria linter, check_ac_format.py, --manifest-dir.

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

Task and Event objects: polymorphic WhatId/WhoId, Activity object model, ActivityHistory vs OpenActivity, activity timeline customization, bulk task creation, Einstein Activity Capture boundaries. NOT for turning on EAC or calendar sync — use admin/einstein-activity-capture-setup. NOT for Email-to-Case — use admin/case-management-setup. Covers ActivitiesSettings metadata, enableActivities, shared Task/Event custom fields and FLS, TaskStatus value sets, Shared Activities and TaskRelation/EventRelation, recurring and child activities, and partial-success bulk DML on Task.

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

Design Invocable Apex actions that return deterministic, agent-friendly errors instead of surfacing raw exceptions to the LLM. NOT for authoring the action itself — @InvocableMethod schema, labels, security context — use agentforce/custom-agent-actions-apex. NOT for the Apex tests that force each error branch — use agentforce/agent-action-unit-tests.

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

Use when designing how an Agentforce agent extracts structured input parameters (slots) from a user's natural-language utterance to invoke an action. Triggers: 'agent extract date from user', 'agent action argument extraction', 'agentforce slot filling', 'agent invocable input mapping', 'agent fails to fill required parameter'. NOT for action authoring (use agentforce/agent-actions) or for prompt-template variable binding (use agentforce/prompt-builder-templates).

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

Apex test patterns for @InvocableMethod agent actions: per-reason-code branch coverage, bulk safety, callout mocking, deterministic assertions. NOT for testing whether the agent routes to the right topic or answers well — use agentforce/agent-testing-and-evaluation. NOT for designing the error envelope the tests assert on — use agentforce/agent-action-error-handling.

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

Designing or reviewing Agentforce actions: Flow actions, Apex invocable actions, prompt-template actions, action naming, input and output contracts, confirmation requirements, and safe error behavior. Triggers: 'agent actions', 'build an agent that can look up an order', 'make the agent able to check order status', 'give the agent a capability', 'agent that can retrieve a record', 'flow action for agent', 'agent invocable action', 'action schema design'. NOT for writing the Apex class itself — use agentforce/custom-agent-actions-apex. NOT for the reason_code error envelope that stops an agent retry loop — use agentforce/agent-action-error-handling.

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

PranavNagrecha のスキルをすべて見る

このスキルの問題を報告する