Integration · Revenue operations
How to build a quote-to-order integration
A quote is approved at a discount nobody records, signed in a tool nobody reads, and booked at a figure that does not match either. The shape of quote-to-order that holds together, the prompts that build it, and the production detail that decides whether it holds.
Built with Tray Headless
- System Salesforce CPQ
- Step Approval state
- System DocuSign
- Step Compare to signed
- Step Booked order
- System NetSuite
Approval travels with the quote, and the booking is compared to the signed document before it is accepted.
The short answer
What is quote-to-order?
Quote-to-order comes down to four things: an approval state that travels with the quote rather than living in an email thread, a signature event that is the trigger instead of something somebody checks, a booking that matches the signed document exactly, and amendments treated as first-class rather than as a new deal. Where this usually goes wrong is amendments. A mid-term upgrade handled as a fresh quote produces two contracts for one customer and a renewal nobody can calculate.
What matters here
- The approved discount must travel on the record. An approval that lives in a Slack thread cannot be audited or enforced.
- Signature is an event, not a status somebody checks. Book on the webhook, not on a nightly scan of a signing tool.
- What gets booked must match what was signed, line for line. If they differ, stop rather than reconciling.
- Treat an amendment as an amendment. A mid-term change filed as a new quote breaks the renewal calculation permanently.
- Carry the quote id all the way through. Without it nobody can trace a booked figure back to the approval that allowed it.
Who this is for
You run revenue operations or deal desk. Quotes are approved in one place, signed in another and booked in a third, and reconciling the three at quarter end is somebody's week.
How it works in practice
Everything that sits between a rep building a quote and revenue being booked.
- 1
Approval state is written onto the quote
Who approved, at what discount, against which policy, and when. Not an email thread.
- 2
The signature request carries the approved version
So the document sent is provably the one that was approved, not a later edit.
- 3
Signature fires a webhook and booking begins
Event-driven, because a nightly scan means a Friday signature books on Monday.
- 4
The booking is compared to the signed document
Line for line. A mismatch stops the process instead of being resolved by whichever system wrote last.
- 5
The quote id travels to the order and the invoice
So a booked figure traces back to the approval that permitted it.
- 6
Amendments reference the original
A mid-term change is an amendment with a link, never a fresh contract that orphans the renewal.
What quote-to-order is made of
Quote-to-order spans three systems and one commercial commitment. It is four parts.
Portable approval state
The approver, the discount, the policy and the timestamp, written on the quote itself so it survives the handoff.
A signature trigger
A webhook from the signing tool, not a status field somebody refreshes. Same-day booking depends on it.
An exact booking
What is booked equals what was signed. A difference is a stop condition, not something to average out.
Amendments as first-class
Upgrades, downgrades and co-terms link to the original contract, because the renewal figure is derived from the chain.
The Tray Headless prompts
Paste these into Claude Code or Codex with the Tray Headless plugin installed. Each stage runs on its own. The systems named in them are the worked example rather than a requirement, and every prompt says so.
Once per project, run
/tray-workflows:set-workspace
to pick the workspace these build in. Point it at a sandbox first.
- 1
Set up, then map the three systems
Quote, signature and booking each hold part of the truth.
Headless skills
build-workflowUse build-workflow. The systems in play are Salesforce CPQ, DocuSign and NetSuite, or whatever we run in those seats. I need SBQQ__Quote__c and SBQQ__QuoteLine__c with whichever fields hold approval state, the DocuSign envelope and what its Connect webhook actually sends on completion, and NetSuite SalesOrder and the contract record on the ERP side. Show me where a discount is stored in each. They will not agree, and that disagreement is the integration.
- 2
Make the approval travel with the quote
An approval in an email thread cannot be enforced or audited.
Headless skills
build-workflowUse build-workflow. When a quote is approved, write onto the quote record: the approver, the approved discount percentage, the policy threshold it was tested against, the justification, and the timestamp. Then lock the approved version. If any line item, quantity or price changes after approval, revoke the approval and require it again. A quote that can be edited after approval is not an approved quote. Never let the integration approve anything itself. It records and it enforces, it does not decide.
- 3
Trigger on signature, and book exactly what was signed
The comparison that stops a customer being invoiced for something else.
Trigger booking on the DocuSign envelope completed webhook, not on a scheduled scan. A Friday signature should book on Friday. Then compare, line for line, before writing anything to the ERP: Every product on the signed document appears on the order Quantities match exactly Prices match the approved discount, to the cent Term dates match The total matches Any difference stops the process and raises it to the deal desk. Do not reconcile a mismatch automatically. The signed document is the contract, and an integration quietly adjusting it is how a customer receives an invoice they did not agree to.
This comparison is the whole control. Without it, an edit made between approval and signature books silently and is found at renewal.
- 4
Handle amendments as amendments
Where most quote-to-order implementations quietly break.
Headless skills
tray-gotchasUse tray-gotchas, then handle the amendment cases: Mid-term upgrade. Create an amendment linked to the original contract, co-terminated to the same end date, prorated from the effective date. Never a fresh contract. Downgrade. Same linkage, and flag it for revenue recognition rather than processing it silently. Renewal. Reference the expiring contract so the renewal figure derives from the chain, including every amendment along the way. Cancellation within a cooling-off period. Reverse the booking and record why, rather than leaving a booked order nobody will invoice. A mid-term change filed as a new deal produces two contracts for one customer, and the renewal number is wrong from that point on.
- 5
Carry the ids, and reconcile the chain
So a booked figure can be traced back to the approval that allowed it.
Stamp the quote id on the envelope, the order and the invoice, and the contract id on every amendment. Then reconcile weekly across the chain: Signed envelopes with no booked order Booked orders with no signed envelope Bookings where the discount exceeds what was approved Amendments with no parent contract Report days from approval to signature, signature to booking, and the count of mismatches caught. If mismatches are frequent, the problem is upstream in quoting rather than here.
- 6
Prove it works, then hand it to deal desk
Because approval thresholds change with the comp plan.
Run the per-step schema checks and the whole-workflow audit before this touches production. Then open the same workflow in Tray Build so the deal desk can adjust approval thresholds and the mismatch tolerance in the visual canvas. Those move with the comp plan, and they should not need a coding assistant.
What it connects to
Three systems hold one commercial agreement between them.
Salesforce CPQ
Read the quote, its line items, the approved discount and any ramp structure. Write approval state back onto the record.
Reads and writes
DocuSign
Send the approved version and take the completed webhook as the booking trigger.
Reads and writes
NetSuite
Create the order and contract matching the signed document exactly, and read the invoice back.
Reads and writes
Salesforce
Write the order number, contract id and booking status onto the opportunity so the account team can see it.
Reads and writes
Slack
Raise a mismatch to the deal desk the same hour, because it blocks the customer being invoiced.
Writes
Snowflake
Land the whole chain with its timestamps, so approval to cash cycle time is a query.
Writes
Same build, other stacks
The design does not change if you run something else in one of these seats. The same prompts build it against Microsoft Dynamics 365, SAP S/4HANA, Google BigQuery, Microsoft Teams, HubSpot or Oracle.
Named systems are the ones most teams run, not the only ones that work. Each is an authentication in your Tray workspace, referenced by name, so the workflow never holds a credential. Where we have a connector page, the name links to it.
Running it in production
This moves a signed commercial commitment into a financial system. It is audited every quarter.
It runs where production runs, not on a laptop
Signature webhooks arrive when they arrive, including at the end of a quarter. They are handled on the platform with retries rather than by an endpoint somebody maintains.
The chain is traceable end to end
Quote to envelope to order to invoice, with ids carried through and an audit trail behind each write.
Credentials live in the workspace, never in the repo
Three systems and three authentications, each scoped separately. The signing tool credential in particular should not be able to do anything else.
Deal desk owns the thresholds
Approval limits and mismatch tolerance open in Tray Build, adjusted by the team that owns discount policy.
A mismatch stops the line
It does not warn and continue. A booking that differs from the signed document is a customer-facing error waiting to happen.
Questions people ask
Where does this stop and order-to-cash begin?
This one ends at a booked order: approval on the quote, signature, and a booking checked against the signed document. Everything after the order exists, the invoice and the payment against it, is order-to-cash. The two meet at the order and do not overlap.
Why must approval state live on the quote?
Because an approval in an email or a Slack thread cannot be enforced or audited. Writing the approver, the discount and the policy onto the record is what lets the booking step check it.
What if the booking does not match the signature?
Stop and raise it. Never reconcile automatically. The signed document is the contract, and an integration quietly adjusting a price is how a customer receives an invoice they never agreed to.
Why are amendments treated separately?
Because a mid-term upgrade filed as a new quote creates a second contract for one customer. The renewal figure is derived from the contract chain, and it is wrong from that point onward.
Should booking run on a schedule?
No. Trigger on the signature webhook. A nightly scan means a Friday signature books on Monday, and that delay is visible to the customer and to the forecast.
Can deal desk change approval thresholds themselves?
Yes. Thresholds and mismatch tolerance open in Tray Build, so the team that owns discount policy owns the settings that enforce it.
Vibe-coding app guides
Vibe-code an entire app with Helix
This moves the data between systems. It does not give anybody a screen to work in. Build that app in Claude Code, Codex or Cursor, then deploy and run it governed on Tray Helix. Same kind of guide, same kind of prompts.
How to build a deal desk discount approval app (opens helix.tray.ai in a new tab)
Related guides
Revenue operations
How to build an order-to-cash integration
Closed-won to sales order to invoice to cash applied, as a CRM to ERP integration. Idempotent writes, a reconciliation loop, and the Headless prompts that build it.
Revenue operations
How to build pipeline hygiene automation
Detect the staleness that matters, nudge the owner rather than the report, escalate on the deals that count, and measure whether it worked. The prompts that build it.
Revenue operations
How to build a CPQ to ERP sync
Map the product catalogue as data, carry ramps and proration intact, keep both catalogues aligned, and fail loudly on an unmapped SKU. The prompts that build it.
Customer success
How to build a closed-won to onboarding handoff
Carry what was promised, not only what was sold. Generate the plan from the deal, and start the clock at close. The Headless prompts that build it.
Revenue operations
How to build partner deal registration
Check submissions against pipeline in seconds, protect for a fixed window, expire visibly, and settle conflicts with a rule rather than an argument. The prompts.
Last reviewed September 2026.