Claude Cursor GitHub Copilot Skill

lead-to-cash-protocol

Use this skill to orchestrate the end-to-end lead-to-cash business process across Dynamics 365 Sales, Supply Chain Management, and Finance. It coordinates the journey from a qualified sales opportunity through order creation, fulfillment, invoicing, and final revenue recognition.

LLM Mart · 0 points · 0 views 0 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download vincentchuwaichow-vanguard-frontier-agentic-skills_cross-functional_lead-to-cash-protocol-febe32a.zip · 6 KB
Part of vincentchuwaichow/vanguard-frontier-agentic — 293 skills

Install

skills CLI npx skills add https://github.com/VincentChuWaiChow/vanguard-frontier-agentic/tree/master/skills/cross-functional/lead-to-cash-protocol
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install vincentchuwaichow-vanguard-frontier-agentic@llmmart
Git git clone https://github.com/VincentChuWaiChow/vanguard-frontier-agentic.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole vincentchuwaichow/vanguard-frontier-agentic collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

Lead-to-Cash Protocol

Purpose

This skill orchestrates the cross-functional lead-to-cash process in Microsoft Dynamics 365 environments. It bridges Dynamics 365 Sales (opportunity and quote management), Dynamics 365 Supply Chain Management (order fulfillment), and Dynamics 365 Finance (invoicing, accounts receivable, and revenue recognition). The protocol defines stage ownership, gate conditions, escalation paths, and refusal triggers so that no single agent works in isolation on a revenue-impacting flow.

When to use

  • A qualified sales opportunity must progress to a confirmed sales order.
  • A sales order requires coordination with supply chain fulfillment and finance invoicing.
  • A credit check, order accuracy review, or revenue recognition event is required.
  • Multiple Dynamics 365 modules are involved and agent handoffs must be auditable.
  • A revenue-impacting matter crosses Sales, Supply Chain, and Finance domains simultaneously.

When NOT to use

  • The matter is contained within a single Dynamics 365 module and no cross-domain coordination is needed.
  • The ask is for direct configuration advice, live system transactions, or field-level setup guidance — route to the relevant specialist agent instead.
  • The opportunity has not yet been qualified — use the prospect-to-quote process first.
  • The ask involves collection disputes or credit limit adjustments without an upstream opportunity — route directly to the finance agent.

Participating agents

  • d365-sales-revenue-operations-agent — owns opportunity qualification, quote approval, and order entry
  • d365-supply-chain-plan-to-produce-agent — owns order fulfillment, inventory reservation, and delivery
  • d365-finance-close-to-report-agent — owns invoicing, accounts receivable, revenue recognition, and cash application

Inputs required

  • Opportunity or sales order identifier
  • Legal entity and currency
  • Requested delivery date or fulfillment window
  • Revenue recognition method (ASC 606 / IFRS 15 classification if applicable)
  • Credit limit status for the customer account
  • Applicable pricing agreement or trade agreement reference

Evidence required

  • Opportunity stage confirmation from d365-sales-revenue-operations-agent
  • Credit check outcome from finance or credit management system
  • Inventory availability signal from d365-supply-chain-plan-to-produce-agent
  • Revenue recognition classification from d365-finance-close-to-report-agent
  • Approval chain documentation for discount exceptions above threshold

Workflow

  1. Receive opportunity handoff from d365-sales-revenue-operations-agent; verify stage is "Qualified" or "Proposal Accepted".
  2. Validate that a signed quote or accepted purchase order exists before advancing to order creation.
  3. Invoke credit check gate: if customer exceeds credit limit, pause and escalate to finance owner; do not proceed.
  4. Confirm order accuracy: line items, pricing, delivery terms, and tax treatment match the accepted quote.
  5. Trigger order confirmation in Dynamics 365 Supply Chain Management via d365-supply-chain-plan-to-produce-agent.
  6. Monitor fulfillment: picking, packing, and shipping status against promised delivery date.
  7. Generate packing slip / delivery note upon shipment; hand off to d365-finance-close-to-report-agent for invoice generation.
  8. Validate invoice against sales order and packing slip before posting; flag discrepancies for human review.
  9. Post invoice and initiate accounts receivable tracking; apply revenue recognition rule per contract classification.
  10. Confirm cash receipt and settlement; close the revenue cycle and update opportunity as "Closed Won".

Decision gates

Gate Condition Action if not met
Credit check Customer credit within approved limit Pause; escalate to finance credit manager
Order accuracy Line items and pricing match accepted quote Return to d365-sales-revenue-operations-agent for correction
Inventory availability Stock confirmed before order confirmation Notify d365-supply-chain-plan-to-produce-agent; assess ATP date
Revenue recognition Contract classification confirmed Escalate to d365-finance-close-to-report-agent and finance owner
Invoice match Invoice matches order and packing slip Hold posting; flag discrepancy for human review

Refusal triggers

  • A production system transaction is requested without human confirmation — refuse and escalate.
  • Credit limit override is requested without documented approval — refuse.
  • Revenue recognition treatment is ambiguous and jurisdiction is unknown — pause and escalate to finance owner.
  • Customer PII or payment credentials are included in any input — stop immediately; redact and escalate.
  • A live pricing or discount change is requested outside an approved workflow — refuse.

Handoff rules

  • Every handoff uses a structured context capsule containing: matter_id, stage, evidence quality, open questions, do_not_do_list, and privilege sensitivity flag.
  • Primary agent per stage: Sales (opportunity → quote), Supply Chain (order → fulfillment), Finance (invoice → cash).
  • No parallel edits to the same sales order from multiple agents without explicit sequencing.
  • All escalations to human owners are logged with timestamp, reason, and agent that triggered them.

KPIs

  • Days from opportunity close to order confirmation
  • Order accuracy rate (lines matching quote on first pass)
  • Days sales outstanding (DSO)
  • Invoice-to-cash cycle time
  • Revenue recognition compliance rate (no late adjustments)

References

Files (vanguard-frontier-agentic)
  • references
    • workflow-and-output.md 7.2 KB
      # Lead-to-Cash Protocol — Workflow and Output Contract
      
      ## Overview
      This document provides the detailed step-by-step workflow, decision tree, and output contract for the lead-to-cash-protocol skill. It is the authoritative reference for agent implementations and human reviewers who need to trace execution through the protocol.
      
      ---
      
      ## Detailed Step-by-Step Workflow
      
      ### Phase 1 — Opportunity Qualification (d365-sales-revenue-operations-agent)
      
      **Step 1.1 — Receive and validate opportunity signal**
      - Confirm the opportunity record exists in Dynamics 365 Sales with a stage of "Qualified" or "Proposal Accepted".
      - Verify that an estimated revenue, close date, and primary contact are populated.
      - If the opportunity stage is earlier than "Qualified", stop and return to the prospect-to-quote process; do not advance.
      
      **Step 1.2 — Quote or purchase order confirmation**
      - Confirm that a signed customer quote (in Dynamics 365 Sales) or an accepted customer purchase order is on file.
      - Validate that pricing, discount bands, and delivery terms on the quote match the approved trade agreement or contract.
      - Any discount that exceeds the configured approval threshold must have a documented manager approval before advancing.
      
      **Step 1.3 — Revenue recognition pre-classification**
      - Identify whether the contract contains multiple performance obligations (ASC 606 / IFRS 15).
      - If contract complexity is detected (e.g., bundled products and services, milestone billing, variable consideration), flag for d365-finance-close-to-report-agent before order creation.
      - Document classification decision and evidence quality in the handoff capsule.
      
      ---
      
      ### Phase 2 — Credit and Order Gate (d365-finance-close-to-report-agent + human)
      
      **Step 2.1 — Credit check**
      - Query the customer's credit limit and current exposure in Dynamics 365 Finance.
      - If the order value plus existing open AR balance exceeds the credit limit, the protocol halts.
      - Produce a credit risk summary for the finance credit manager; do not override or assume approval.
      - Record the outcome (approved / denied / escalated) before proceeding.
      
      **Step 2.2 — Order accuracy review**
      - Compare line items, quantities, unit prices, delivery addresses, and tax codes on the draft sales order against the accepted quote.
      - Flag any discrepancy for human correction. Do not post an inaccurate order.
      - Confirm that the legal entity, currency, and applicable price list are correct.
      
      ---
      
      ### Phase 3 — Order Fulfillment (d365-supply-chain-plan-to-produce-agent)
      
      **Step 3.1 — Inventory availability check**
      - Query available-to-promise (ATP) data for each order line.
      - If ATP date is after the requested delivery date, surface the gap to the sales agent and human owner; propose alternatives but do not commit a delivery date unilaterally.
      
      **Step 3.2 — Order confirmation**
      - Confirm the sales order in Dynamics 365 Supply Chain Management once credit and order accuracy gates are passed.
      - Trigger warehouse picking and packing workflows.
      
      **Step 3.3 — Shipment and delivery note**
      - Monitor picking and packing completion.
      - Upon shipment, generate a packing slip / delivery note in the system.
      - Hand the packing slip reference and shipment date to d365-finance-close-to-report-agent.
      
      ---
      
      ### Phase 4 — Invoicing and Revenue Recognition (d365-finance-close-to-report-agent)
      
      **Step 4.1 — Invoice generation**
      - Create a sales order invoice in Dynamics 365 Finance based on the confirmed packing slip.
      - Validate that invoice lines match the packing slip quantities and the original sales order pricing.
      - Apply the correct revenue recognition schedule per the pre-classification in Step 1.3.
      
      **Step 4.2 — Invoice posting**
      - Human owner confirms invoice accuracy before posting if the invoice exceeds a configurable materiality threshold.
      - Post the invoice; accounts receivable entry is created.
      
      **Step 4.3 — Cash application and close**
      - Monitor customer payment receipt.
      - Apply cash to the open AR entry and settle the invoice.
      - Update opportunity status in Dynamics 365 Sales to "Closed Won" and record the final revenue amount.
      
      ---
      
      ## Decision Tree
      
      ```
      START: Opportunity signal received
      │
      ├─ Opportunity stage < Qualified?
      │   └─ YES → STOP; return to prospect-to-quote process
      │
      ├─ Signed quote or accepted PO on file?
      │   └─ NO → STOP; escalate to d365-sales-revenue-operations-agent
      │
      ├─ Discount within approval threshold?
      │   └─ NO → PAUSE; require documented manager approval
      │
      ├─ Revenue recognition complexity detected?
      │   └─ YES → FLAG to d365-finance-close-to-report-agent before order creation
      │
      ├─ Credit check passed?
      │   └─ NO → HALT; escalate to finance credit manager; do not proceed
      │
      ├─ Order accuracy confirmed?
      │   └─ NO → RETURN to d365-sales-revenue-operations-agent for correction
      │
      ├─ ATP date within requested delivery window?
      │   └─ NO → SURFACE gap to human owner; do not commit delivery date
      │
      ├─ Invoice matches packing slip and order?
      │   └─ NO → HOLD posting; flag for human review
      │
      └─ Cash received and applied?
          └─ YES → CLOSE revenue cycle; update opportunity to Closed Won
      ```
      
      ---
      
      ## Output Contract
      
      Every execution of this protocol produces a structured output capsule with the following mandatory fields:
      
      | Field | Type | Description |
      |---|---|---|
      | matter_id | string | Unique identifier for this lead-to-cash instance |
      | opportunity_id | string | Dynamics 365 Sales opportunity record ID |
      | sales_order_id | string | Confirmed sales order number |
      | current_stage | enum | One of: qualification, credit_check, order_confirmed, fulfillment, invoiced, closed |
      | gate_outcomes | object | Pass/fail/escalated for each gate: credit, order_accuracy, atp, invoice_match |
      | agents_involved | array | List of agent IDs that participated in this execution |
      | escalations | array | Each escalation: {trigger, timestamp, escalated_to, reason} |
      | open_questions | array | Any unresolved items requiring human input |
      | do_not_do_list | array | Actions explicitly prohibited in the current state |
      | evidence_quality | enum | high / medium / low — reflecting confidence in input data |
      | privilege_sensitivity | boolean | True if the matter contains legally sensitive commercial terms |
      | last_updated | ISO8601 timestamp | When the capsule was last updated |
      
      ### Example output capsule (partial)
      ```json
      {
        "matter_id": "L2C-2026-001234",
        "opportunity_id": "OPP-98765",
        "sales_order_id": "SO-20260001",
        "current_stage": "invoiced",
        "gate_outcomes": {
          "credit": "pass",
          "order_accuracy": "pass",
          "atp": "pass",
          "invoice_match": "pass"
        },
        "agents_involved": [
          "d365-sales-revenue-operations-agent",
          "d365-supply-chain-plan-to-produce-agent",
          "d365-finance-close-to-report-agent"
        ],
        "escalations": [],
        "open_questions": [],
        "do_not_do_list": [
          "Do not adjust invoice amounts without human approval",
          "Do not override credit limit without documented approval"
        ],
        "evidence_quality": "high",
        "privilege_sensitivity": false,
        "last_updated": "2026-06-16T10:30:00Z"
      }
      ```
      
      ---
      
      ## Audit Log Fields
      - matter_id, skill_id, skill_version, invoked_by, input_hash, evidence_quality, output_verdict, escalation_fired, timestamp
      
  • metadata.json 1.8 KB
    {
      "id": "lead-to-cash-protocol",
      "name": "Lead-to-Cash Protocol",
      "type": "skill",
      "provider": "generic",
      "harnesses": ["codex", "claude-code", "cursor", "gemini", "kiro", "other"],
      "summary": "Orchestration protocol for the end-to-end lead-to-cash process in Dynamics 365 environments, coordinating Sales (opportunity and quote), Supply Chain Management (order fulfillment), and Finance (invoicing and revenue recognition). Defines stage gates, agent handoff rules, credit check escalation, and revenue recognition decision logic across d365-sales-revenue-operations-agent, d365-supply-chain-plan-to-produce-agent, and d365-finance-close-to-report-agent.",
      "source_type": "original",
      "official_docs": [
        "https://learn.microsoft.com/dynamics365/guidance/business-processes/order-to-cash-overview",
        "https://learn.microsoft.com/dynamics365/guidance/business-processes/prospect-to-quote-overview",
        "https://learn.microsoft.com/dynamics365/finance/accounts-receivable/revenue-recognition-overview"
      ],
      "security_notes": "This protocol is a recommendation and orchestration guide only — it is never an authorization for system transactions, credit approvals, revenue recognition treatments, or pricing changes. All production-impacting steps must be confirmed by the relevant human owner or specialist agent. The protocol never requests customer credentials, tenant IDs, payment card data, or personal customer data. Credit limit overrides require documented approval before any agent proceeds. Revenue recognition ambiguity triggers an immediate pause and human escalation rather than an agent judgment call.",
      "last_verified": "2026-06-16",
      "path": "skills/cross-functional/lead-to-cash-protocol",
      "author": "github: VincentChuWaiChow",
      "version": "0.1.0"
    }
    
  • SKILL.md 6.9 KB
    ---
    name: lead-to-cash-protocol
    description: Use this skill to orchestrate the end-to-end lead-to-cash business process across Dynamics 365 Sales, Supply Chain Management, and Finance. It coordinates the journey from a qualified sales opportunity through order creation, fulfillment, invoicing, and final revenue recognition. The skill defines stage gates, agent handoff rules, escalation triggers, and decision logic for cross-functional coordination. It does not make business decisions, approve credit limits, authorize revenue recognition treatments, or execute any system transactions; all production-impacting steps are escalated to the relevant specialist or human owner.
    allowed-tools: Read Grep Glob
    metadata:
      author: "github: VincentChuWaiChow"
      version: "0.1.0"
      updated: "2026-06-16"
      category: operational
      lifecycle: experimental
    ---
    
    # Lead-to-Cash Protocol
    
    ## Purpose
    This skill orchestrates the cross-functional lead-to-cash process in Microsoft Dynamics 365 environments. It bridges Dynamics 365 Sales (opportunity and quote management), Dynamics 365 Supply Chain Management (order fulfillment), and Dynamics 365 Finance (invoicing, accounts receivable, and revenue recognition). The protocol defines stage ownership, gate conditions, escalation paths, and refusal triggers so that no single agent works in isolation on a revenue-impacting flow.
    
    ## When to use
    - A qualified sales opportunity must progress to a confirmed sales order.
    - A sales order requires coordination with supply chain fulfillment and finance invoicing.
    - A credit check, order accuracy review, or revenue recognition event is required.
    - Multiple Dynamics 365 modules are involved and agent handoffs must be auditable.
    - A revenue-impacting matter crosses Sales, Supply Chain, and Finance domains simultaneously.
    
    ## When NOT to use
    - The matter is contained within a single Dynamics 365 module and no cross-domain coordination is needed.
    - The ask is for direct configuration advice, live system transactions, or field-level setup guidance — route to the relevant specialist agent instead.
    - The opportunity has not yet been qualified — use the prospect-to-quote process first.
    - The ask involves collection disputes or credit limit adjustments without an upstream opportunity — route directly to the finance agent.
    
    ## Participating agents
    - d365-sales-revenue-operations-agent — owns opportunity qualification, quote approval, and order entry
    - d365-supply-chain-plan-to-produce-agent — owns order fulfillment, inventory reservation, and delivery
    - d365-finance-close-to-report-agent — owns invoicing, accounts receivable, revenue recognition, and cash application
    
    ## Inputs required
    - Opportunity or sales order identifier
    - Legal entity and currency
    - Requested delivery date or fulfillment window
    - Revenue recognition method (ASC 606 / IFRS 15 classification if applicable)
    - Credit limit status for the customer account
    - Applicable pricing agreement or trade agreement reference
    
    ## Evidence required
    - Opportunity stage confirmation from d365-sales-revenue-operations-agent
    - Credit check outcome from finance or credit management system
    - Inventory availability signal from d365-supply-chain-plan-to-produce-agent
    - Revenue recognition classification from d365-finance-close-to-report-agent
    - Approval chain documentation for discount exceptions above threshold
    
    ## Workflow
    1. Receive opportunity handoff from d365-sales-revenue-operations-agent; verify stage is "Qualified" or "Proposal Accepted".
    2. Validate that a signed quote or accepted purchase order exists before advancing to order creation.
    3. Invoke credit check gate: if customer exceeds credit limit, pause and escalate to finance owner; do not proceed.
    4. Confirm order accuracy: line items, pricing, delivery terms, and tax treatment match the accepted quote.
    5. Trigger order confirmation in Dynamics 365 Supply Chain Management via d365-supply-chain-plan-to-produce-agent.
    6. Monitor fulfillment: picking, packing, and shipping status against promised delivery date.
    7. Generate packing slip / delivery note upon shipment; hand off to d365-finance-close-to-report-agent for invoice generation.
    8. Validate invoice against sales order and packing slip before posting; flag discrepancies for human review.
    9. Post invoice and initiate accounts receivable tracking; apply revenue recognition rule per contract classification.
    10. Confirm cash receipt and settlement; close the revenue cycle and update opportunity as "Closed Won".
    
    ## Decision gates
    | Gate | Condition | Action if not met |
    |---|---|---|
    | Credit check | Customer credit within approved limit | Pause; escalate to finance credit manager |
    | Order accuracy | Line items and pricing match accepted quote | Return to d365-sales-revenue-operations-agent for correction |
    | Inventory availability | Stock confirmed before order confirmation | Notify d365-supply-chain-plan-to-produce-agent; assess ATP date |
    | Revenue recognition | Contract classification confirmed | Escalate to d365-finance-close-to-report-agent and finance owner |
    | Invoice match | Invoice matches order and packing slip | Hold posting; flag discrepancy for human review |
    
    ## Refusal triggers
    - A production system transaction is requested without human confirmation — refuse and escalate.
    - Credit limit override is requested without documented approval — refuse.
    - Revenue recognition treatment is ambiguous and jurisdiction is unknown — pause and escalate to finance owner.
    - Customer PII or payment credentials are included in any input — stop immediately; redact and escalate.
    - A live pricing or discount change is requested outside an approved workflow — refuse.
    
    ## Handoff rules
    - Every handoff uses a structured context capsule containing: matter_id, stage, evidence quality, open questions, do_not_do_list, and privilege sensitivity flag.
    - Primary agent per stage: Sales (opportunity → quote), Supply Chain (order → fulfillment), Finance (invoice → cash).
    - No parallel edits to the same sales order from multiple agents without explicit sequencing.
    - All escalations to human owners are logged with timestamp, reason, and agent that triggered them.
    
    ## KPIs
    - Days from opportunity close to order confirmation
    - Order accuracy rate (lines matching quote on first pass)
    - Days sales outstanding (DSO)
    - Invoice-to-cash cycle time
    - Revenue recognition compliance rate (no late adjustments)
    
    ## References
    - [Dynamics 365 order-to-cash overview](https://learn.microsoft.com/dynamics365/guidance/business-processes/order-to-cash-overview)
    - [Prospect to quote end-to-end overview](https://learn.microsoft.com/dynamics365/guidance/business-processes/prospect-to-quote-overview)
    - [Manage accounts receivable — Dynamics 365 Finance](https://learn.microsoft.com/dynamics365/guidance/business-processes/order-to-cash-areas-overview#manage-accounts-receivable)
    - [Revenue recognition in Dynamics 365 Finance](https://learn.microsoft.com/dynamics365/finance/accounts-receivable/revenue-recognition-overview)
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related