Skip to main content

You can source the JSON input from various origins to associate document templates with input JSON data. It can be derived from a DataRaptor extraction step within the OmniScript or collected from the user during the OmniScript process. During document generation, a remote call can transmit the JSON data. Within the text, variables (also known as tokens) reference the input JSON data, and these variables are merged into the document.

Documents can be generated as part of a guided interaction flow based on the OmniScript framework. Sample OmniScripts are provided as a starting point, which you can customize according to your requirements. The generated document can be converted to PDF or Microsoft Word format, enabling seamless integration within the OmniScript. Additionally, you have the flexibility to attach the document to the appropriate object record or even email it to recipients. For advanced customization, you can create your own OmniScripts, Integration Procedures, or Apex classes to facilitate document generation.

Each document template record must possess a unique name. While you can create multiple versions of a document template, only one version can be active at a given time. Furthermore, you have the capability to clone, activate, and deactivate templates as needed.

Here is a Example How to Generate Document. Follow this step.

Step 1: create Data Raptor Extract. Use DocumentTemplates object.

DocumentTemplates Object

Map DocumentTemplates Field.

DocumentTemplates Field

check preview using Key.

check preview

Step 2: create docgenGetQuoteDetails Extraxt data raptor.

Get Quote Details

Add Fields.

Map Field

Step 3: create transformGetQuoteDetails transform data raptor. Copy current Json from Data raptor extract and Paste that Json in Input json or Expected Json. now click on Quick Match. and auto match.

Quick Match

check preview

Step 4: create OmniScript. Add Data Raptor Extract Action and pass the parameter.

Document Generate Document

Add New step in OmniScript. add omnistudio__clmOsDocxGenerateDocument lwc component and pass the parameter.

pass the parameter

Now Active omniscript and click on how to launch button. copy lightning URL.

lightning URL

Step 5: create a generate document button in Quote object. paste here that lightning link. after link paste you need to add this things. “&c__TemplateType=MicrosoftWord&c__ObjectId={!Quote.Id}”. Add this button in page layout.

Generate Document

Step 6 : create one doc and Add parameters in curly brackets.

Add value in curly brackets

Step 7 : create Template. add details using below scrrenshot.

create Template

Useful links.

https://help.salesforce.com/s/articleView?id=ind.doc_gen_foundation_document_generation_overview_389381.htm&type=5

https://developer.salesforce.com/files/industries/SalesforceContracts/Explore_Client_Side_Document_Generation.pdf

https://developer.salesforce.com/files/industries/SalesforceContracts/Explore_Server_Side_Document_Generation.pdf

 

Join the discussion 2 Comments

  • Hello! I could have sworn I’ve been to this website before but after reading through some of the post I realized it’s new to me. Nonetheless, I’m definitely happy I found it and I’ll be book-marking and checking back often!

  • Hey there! Someone in my Myspace group shared this site with us so I came to check it out. I’m definitely enjoying the information. I’m book-marking and will be tweeting this to my followers! Great blog and fantastic style and design.

Subscribe For More Updates

 

Join our mailing list to receive the latest news and updates from our team.

You have Successfully Subscribed!