Skip to main content
Join the Agentforce Hackathon on Nov. 18-19 to compete for a $20,000 Grand Prize. Sign up now. Terms apply.

Explore Document Types and the Document Generation Process

Learning Objectives

After completing this unit, you’ll be able to:

  • Identify the typical use cases for document generation.
  • Explain the document generation process for a quote.

Typical Use Cases

With OmniStudio Document Generation, Candace can create many types of documents for Cloud Kicks. In fact, she can create documents from any standard or custom object in Salesforce. But typical use cases for document generation include contracts, quotes, proposals, and reports.

Let’s find out who uses these common document types.

Document Type

Who Uses It?

Contract

Sales teams generate customized enterprise contracts with clauses, obligations, payment schedules, line items, e-signatures, and more, during sales close. The teams also generate non-disclosure agreements and service agreements. 

Quote

Insurance agents and customer service representatives in many industries create complex quotes for products and services. These quote documents may include sections for manufacturing rebates, retail promotions, frame agreements, and others.

Proposal

Insurance agents often generate detailed proposal documents that define coverages, risks, indemnities, and schedule details for multiple customers.

Report

Managers and other roles create formatted reports that show open opportunities, closed-won deals, leads from a particular campaign, and anything else you can imagine! 

OmniStudio Document Generation in Action

Remember Candace’s mission to streamline the sales process at Cloud Kicks? Let’s examine the flow she needs to set up so her team can generate quote documents.

Template Customization 

First things first. Candace creates a .docx or .pptx template in Microsoft Word or PowerPoint. Some parts of the quote document are dynamic. For example, customer names, order details, and quote dates are unique for each quote. For this content, she uses tokens to merge the data from a JSON source into the generated document.

Document Template Design

The next step is to upload the .docx or .pptx file to the Document Template Designer. Here, Candace defines the template with a unique name and template type and selects the token mapping methods. Token mapping is JSON-based, and data can come from internal or external data sources. After Candace defines and tests the template, she’s ready to use it in the document generation process. 

Document Generation

The final step is to launch the document generation process. Candace can set up the process using either client-side or server-side document generation. 

  • Client-side document generation requires user interaction and generates documents using an OmniScript. On the object record, the user selects an option to create a document. Salesforce provides sample OmniScripts and integration procedures that you can use and customize. It’s a synchronous process, which means that after you request document generation, you wait until the document is ready. The execution happens in a web browser, using web browser resources. And it works best for smaller files.
  • Server-side document generation typically doesn’t require user interaction. Instead, a backend server works on requests and generates documents using dedicated Salesforce computing resources. It’s an asynchronous process, which means you can generate multiple documents at the same time. And it works best for large and rendering-heavy files. It can be trigger-based, for example, when a record status changes.

So you have a server-side or client-side document generator that takes in the document template and JSON data structure to create output documents in the form of PDF or Microsoft Word/PowerPoint.

A diagram that shows client-side or server-side document generation process.

Can you match each description with the type of document generation?

Resources

Share your Trailhead feedback over on Salesforce Help.

We'd love to hear about your experience with Trailhead - you can now access the new feedback form anytime from the Salesforce Help site.

Learn More Continue to Share Feedback