Revenue Cloud project notebook, written by two Meir IT consultants who implement it.

What is Revenue Cloud?

Admin · Building block 5 of 8

Contracts and Document Generation

Create the contract from the quote, keep negotiated prices and produce the quote PDF, with Document Builder or a Word template.

Checked on against the Salesforce documentation (release 264)

On this page (7 sections)
  1. What it does
  2. What to turn on
  3. Key objects
  4. Where to set it up
  5. What goes wrong on projects
  6. Articles on this product
  7. Official documentation

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

  1. Document Builder: in Setup, Revenue Settings, turn on Document Builder, then refresh the page.
  2. The Document Builder User permission set for anyone who builds templates or generates PDFs.
  3. 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.
  4. Contracts: drag the New Contract button onto the quote and order layouts.
  5. 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.
  6. The CreateContract API permission set for anyone who creates contracts.

Key objects

UI labelAPIWhat you set there
ContractContractAccount, dates, Activated status. It must carry the RevenueLifecycleManagement usage.
Application Usage AssignmentAppUsageAssignmentThe RevenueLifecycleManagement value, set automatically by the New Contract button.
Contract Item PriceContractItemPriceThe negotiated price or discount for a product, carried over from quote lines.
Asset Contract RelationshipAssetContractRelationshipWhich asset falls under which contract, with start and end dates.
Document TemplateDocumentTemplateThe Word file, the fill method (Context Service), the status.
Context DefinitionContextDefinitionThe 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.

Generating the document from the quoteEnlarge
Generating the document from the quote, then seeing it in the PDF list.

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 __c suffix. 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

All 2 Contracts and Document Generation articles in the list

Official documentation

Every source on this page (7)
  1. Contracts in Revenue Management
  2. Manage Quote and Order Lifecycle Actions
  3. Set Up Document Builder for Quotes
  4. Generate a Quote Document with Document Builder
  5. Add a New Contract Button
  6. Create a Contract and Application Usage Assignment
  7. Add the Managed Asset Viewer Page Layouts

A question about an article or a project?

Nathan Altmann and Ilan Malka answer every message themselves.

Contact

Type at least two letters.