Ajánlatok, rendelések és teljesítés
Elfogadott ajánlatot rendeléshez és részteljesítéshez kapcsol, megőrizve a feltételeket és pontosan fennmaradó számlázható mennyiséget.
quotes-orders-fulfillment
Ezt a skillt használó csapattagok
Mikor hasznos?
Akkor használd, ha verzió, bontott szállítás, lemondás vagy részszámla kell dupla elszámolás nélkül.
Miben segít neked?
- Megőrzi az ajánlatverziókat és elfogadott árpillanatképeket.
- Atomi, ismétlésbiztos módon alakít ajánlatot rendeléssé.
- Soronként követi a teljesített, törölt és számlázott mennyiséget.
Például ezt kérheted
Alakíts egyszer rendeléssé jóváhagyott ajánlatot, majd számlázz helyesen két részszállítást. Ismételd az ajánlatelfogadást, két részletben szállíts és egyszer-egyszer számlázz. Az összes teljesített és számlázott mennyiség ne haladja meg a rendeltet.
Részletes dokumentáció
Itt a skill eredeti útmutatóját, példáit és ellenőrzési szempontjait olvashatod az eredeti nyelven.
Összecsukás
Quotes, Orders & Fulfillment
When to Use
Use when implementing commercial CPQ (Configure, Price, Quote), sales orders, order amendments, delivery/fulfillment tracking, partial shipments, or order-to-invoice handoffs.
1. Quotes, Revisions & Commercial Snapshots
- Quote Versioning (
quote_number+revision):- When a customer requests changes to a sent or approved quote (
Q-2026-0042 v1), create a tracked revision (v2) that supersedesv1while preservingv1's exact snapshot for audit and comparison.
- When a customer requests changes to a sent or approved quote (
- Line-Item Pricing & Discount Integrity:
- Each line item must store
catalog_unit_price,discount_type(percentage|fixed),discount_value,effective_unit_price,quantity,unit_of_measure,tax_rate,line_net_amount,line_tax_amount, andline_gross_amount. - Compute document totals (
subtotal_net,total_discount,total_tax,grand_total_gross) deterministically on the server—never trust client-calculated totals!
- Each line item must store
- Expiration & Acceptance Lock:
- Enforce
valid_untilexpiration dates on quotes; an expired or unapproved quote cannot be accepted or converted into a confirmedSalesOrderwithout renewal/approval.
- Enforce
2. Quote-to-Order Conversion (Idempotent & Atomic)
- Converting an accepted/approved
Quoteinto aSalesOrdermust be idempotent:- Lock the
Quoterow (SELECT ... FOR UPDATE), verifystatus === 'approved' | 'accepted'(and verify Permit's approval payload hash matches), create theSalesOrderandSalesOrderLinescopying the exact locked commercial snapshots, linksales_order.source_quote_id = quote.id, and transition the quote toconverted.
- Lock the
3. Line-Level Fulfillment Tracking (Partial & Split Deliveries)
Real-world orders are frequently delivered in multiple shipments or milestones. Track quantities at the Order Line level (sales_order_lines):
$$\text{qty_ordered} = \text{qty_fulfilled} + \text{qty_cancelled} + \text{qty_open}$$
- Invariant: On every
sales_order_line, enforceqty_fulfilled >= 0,qty_cancelled >= 0, andqty_fulfilled + qty_cancelled <= qty_ordered. - Fulfillment / Shipment Documents (
fulfillments+fulfillment_lines):- Each physical shipment or service delivery milestone creates a
Fulfillmentdocument (draft$\rightarrow$packed$\rightarrow$shipped/delivered) referencing the specificsales_order_line_idandqty_delivered. - Derive the parent
SalesOrder.fulfillment_statusdeterministically from its lines:unfulfilledwhenSUM(qty_fulfilled) == 0partially_fulfilledwhen0 < SUM(qty_fulfilled) < SUM(qty_ordered - qty_cancelled)fulfilledwhenSUM(qty_fulfilled) == SUM(qty_ordered - qty_cancelled)(and> 0).
- Each physical shipment or service delivery milestone creates a
4. Clean Handoff to Billing / Invoicing
- Track
qty_invoiced(or milestone billed amount) per order line / fulfillment so partial deliveries can generate accurate partial invoices without double-billing or losing unbilled remainder lines.
Csomagban lévő fájlok 1
SKILL.md
