On this page (7 sections)
What it does
The quote document and the contract are prepared at the same moment, when the quote is ready to go out.
For the quote document, Revenue Cloud gives you two options. Document Builder builds a PDF from a template assembled on screen with standard components. Omnistudio Document Generation fills a Word template that contains tokens. It can read the same context definition the pricing procedure already uses. Article: Generating the Quote Document from the Pricing Context
The contract, in Revenue Cloud, groups a customer's assets and holds their negotiated prices. Amendments and renewals can start from the contract page.
An example. An accepted quote has a line sold 10% below list. With the New Contract button and the option that captures prices, the contract gets a contract item price for that line. The next quote started from that contract picks up the negotiated price.
Upstream is the Transaction Management quote. Downstream are the order and the assets, which link back to the contract. Legal drafting of the contract itself (clauses, negotiation, signature) belongs to a separate product, Salesforce Contracts. See also Quote and Order: How It Works and Contracts and Renewals: How It Works.
What to turn on
- Document Builder: in Setup, Revenue Settings, turn on Document Builder, then refresh the page.
- The Document Builder User permission set for anyone who builds templates or generates PDFs.
- Word templates: turn on Design Document Templates, then in Document Generation Settings, Enable Server-Side Document Generation. The DocGen Designer permission set is needed to build templates.
- Contracts: drag the New Contract button onto the quote and order layouts.
- In Revenue Settings, Set Up Flow for Creating Contracts from Quotes: keep rev_contracts__CreateCntrFromQuote or enter your own flow. Contract pricing requires Salesforce Pricing Design Time User.
- The CreateContract API permission set for anyone who creates contracts.
Key objects
| UI label | API | What you set there |
|---|---|---|
| Contract | Contract | Account, dates, Activated status. It must carry the RevenueLifecycleManagement usage. |
| Application Usage Assignment | AppUsageAssignment | The RevenueLifecycleManagement value, set automatically by the New Contract button. |
| Contract Item Price | ContractItemPrice | The negotiated price or discount for a product, carried over from quote lines. |
| Asset Contract Relationship | AssetContractRelationship | Which asset falls under which contract, with start and end dates. |
| Document Template | DocumentTemplate | The Word file, the fill method (Context Service), the status. |
| Context Definition | ContextDefinition | The tagged attributes, which become the Word template's tokens. |
Where to set it up
Document Builder templates are created in Setup, Document Builder, New Template, on the Quote object. You start from a blank template or the default quote template, then assemble components (Company Details, Quote Line Items, Grid, Related Record Table, Rich Text, and so on). Only one default template can be active per org. The quote's Create PDF action uses it.
In a Word template, every token carries the exact name of a context definition attribute. A loop on SalesTransactionItem repeats one table row per quote line. A 14-line quote gives you 14 rows in the table. Article: Generating the Quote Document from the Pricing Context On one project, the template ID changed every time the file was replaced, which broke a button that had the ID hard-coded. Uploading a new version of the linked file kept the ID stable.
On the contract side, the asset contract relationship is created automatically when the order is linked to a contract that carries the RevenueLifecycleManagement usage. Otherwise you create it from the Asset Contract Relationships related list. Without that usage, the contract's Managed Asset Viewer shows no assets.

What goes wrong on projects
- Some bundle options are missing from the PDF. The document always shows root products. A child product only appears if its Quote Visibility field is blank, Always, or Quote Document Only. To hide zero-price lines while still letting the rep show one, I put the rule in the pricing procedure. Check: the Quote Visibility on the product relationship, in the catalog. Article: Hiding $0 Lines on the Revenue Cloud Quote PDF
- You can't add a column to the line items table. In Document Builder, the fields in the Quote Line Items component can't be customized. When the customer wants their own layout, I go with a Word template wired to the quote's context. Check: compare the columns they ask for with what the component shows before promising anything. Article: Generating the Quote Document from the Pricing Context
- Only inherited attributes show up in the Word document. An attribute only becomes a token once it has a context tag. Custom attributes have to be mapped, tagged, then published, and the token keeps the
__csuffix. Check: the tags tab on the context definition. Article: Generating the Quote Document from the Pricing Context - The total is too high, the date prints in a raw technical format, and the customer name is blank. On one project, the context's subtotal added up list prices. The right figure was the grand total. Dates came out in raw ISO format, and the context didn't follow the relationship to the account. Two text fields filled by a flow fixed the date and the name. Check: generate a document on a discounted quote and reread every amount. Article: Generating the Quote Document from the Pricing Context
- The contract keeps none of the negotiated prices. A contract created from an order has no contract item prices. Only a quote creates them. The standard Create Contract button makes a contract with none of the deal data, so you need New Contract. You can only link a contract to a draft order. Check: the contract's price list right after it's created.
Articles on this product
- Generating the Quote Document from the Pricing ContextAdmin
- Hiding $0 Lines on the Revenue Cloud Quote PDFAdmin
All 2 Contracts and Document Generation articles in the list