You are here:
Configure the Group Benefits Document Generation Omniscript for Health Cloud
The Document Generation Omniscript creates documents in .pdf and .docx format based on a template. Configure the Omniscript with details about your document template. To meet specific business requirements, you can customize the Omniscript and the template used to create quote documents. You can also create versions of the template to use in other document generation workflows.
Required Editions
| Available in: Lightning Experience |
| Available in: Enterprise and Unlimited Editions with Health Cloud, the Insurance managed package, and the Insurance Industries Extension managed package |
| User Permissions Needed | |
|---|---|
| To edit Omniscripts: | Omnistudio Admin permission set |
The Document Generation Omniscript requires Omnistudio Document Generation. To allow non-designer users to generate documents, you must add a DocGen Permission Set to the Omnistudio Permission Set Group for non-designer users. For details, see Omnistudio Document Generation.
- Enable Server-Side document generation. See Enable Server-Side Document Generation Setting.
-
Create a document template for small group quotes.
-
Copy and paste this sample template text into a .docx file. The merge fields in this
sample automatically incorporate data related to a small group quote.
{{AccountIdName}} {{AccountAddress1}}
{{AccountAddress2}}
{{City}}, {{State}} {{ZipCode}}
{{AccountPhoneNumber}}
Created Date: {{CreatedDate}}
Expiration Date: {{ExpDate}}
Quote Number: {{QuoteNum}}
PRODUCT NAME QUANTITY SALES PRICE TOTAL PRICE {{#Products}}{{ProductName}} {{Quantity}} {{SalesPrice}} {{TotalPrice}}{{/Products}} Effective Date: {{EffectiveDate}}
End Date: {{EndDate}}
Term: {{Term}}
Total Premium for Term: {{TotalPremium}}
Monthly Premium: {{MonthlyPremium}}
QUOTE ACCEPTANCE INFORMATION Signature _________________________
Name _________________________
Title _________________________
Date _________________________
- Add formatting and add or remove merge fields to meet your business requirements.
- Upload the template to Document Template Designer. See Create a Microsoft Word or Microsoft PowerPoint Template for OmniStudio Document Generation.
-
Copy and paste this sample template text into a .docx file. The merge fields in this
sample automatically incorporate data related to a small group quote.
- To give standard and Experience Cloud site users access to the document template, add standard, customer community, customer community plus, and partner community users to the Docgen Document Template Library. Or, in Files, click the action menu for your document template, click Share, and then select users to share the template with.
-
Determine the DocumentTemplateID and TemplateContentVersionID. You specify these values in
the Document Generation OmniScript.
- From the Setup menu, select Developer Console.
- Run the query SELECT Id, Name FROM DocumentTemplate.
- In the query results, copy the Id value for your document template and save it for later. You enter this ID in the Document Generation OmniScript properties.
- Run the query SELECT Id, Name, ContentDocumentId FROM DocumentTemplateContentDoc WHERE name like 'DocumentTemplateID%'. In the query, replace DocumentTemplateID with the ID you retrieved in the previous query. Make sure you include % after your ID value to indicate wildcard characters.
- In query results, copy the ContentDocumentId value for your document template.
- Run the query SELECT Id, Title, LatestPublishedVersionId FROM ContentDocument WHERE Id = 'ContentDocumentId'. In the query, replace ContentDocumentId with the ID you retrieved in the previous query.
- In the query results, copy the LatestPublishedVersionId value for your document template and save it for later. You enter this ID in the Document Generation OmniScript properties.
- From the App Launcher, find and select OmniScripts.
- Click GroupBenefits/DocumentGeneration, and then open the latest version of the DocumentGeneration Omniscript.
-
Select the SetDocumentGenerationInputParameters step and then click the Properties panel
and enter values for these fields.
Field Value DocumentTemplateId The ID of the document template from the query you ran in the previous step TemplateContentVersionId The LatestPublishedVersionId of the document template from the query you ran in the previous step DocumentName A descriptive name RecordId %quoteRecordId% - Click Activate Version.
-
To customize the Omniscript, click New Version, edit Omniscript
elements, and activate your customized version.
To use your customized Document Generation Omniscript in workflows unrelated to quotes, edit the document template and Omnistudio Data Mapper information.
- In the SetDocumentGenerationInputParameters step, customize the document template properties.
- In the GetQuoteData and TransformQuoteData steps, specify the appropriate Data Mappers. For example, if you’re using the Omniscript to generate documents for a contract, enter Data Mappers that get and transform contract data.

