PDF Generation with OmniScript


An Omni Script is a declarative scripting tool to create with clicks and drags. Using Omniscript designer we can drag the elements and build the structure to supply the customers with a guided path for completing their business process and complex functionality behind the scenes using Omni script actions. 

Data Raptor: 

Data Raptor is a mapping tool that enables us to read, write and transform salesforce data. There are four data raptors named “Extract”, “Turbo Extract”, “Load” and “Transform”. Using Transform Data Raptor, we can transform the JSON output format to PDF. 

  • Data Raptor Turbo Extract – Get the data from a single Salesforce Object (sObject). 
  • Data Raptor Extract – Get the data from one or more Salesforce sObjects. 
  • Data Raptor Load – Create, Update and Migrate the data to one or more Salesforce sObjects. 
  • Data Raptor Transform – Transform and manipulate the data that comes in and out of the Salesforce. 

To Generate the PDF from OmniScript form, we need to follow three steps: 

  1. Create a pdf template (Need a purchased version account – Request Admin), which has data and fields which we are going to merge fields from OmniScript form. 
  1. We need to build OmniScript where we are going to get the input fields. 
  1. Most importantly, we need a transform data raptor to map the data from OmniScript to pdf. 

Step 1: Creating a PDF Template to receive the dynamic field input 

To create the PDF template, as per our prerequisite, we need to have a purchased version of adobe reader and edit the template with dragging fields that we are going to receive in the form. Here is an example, Label Name (textbox name) 

  1. First Name (FirstName) – Read-only (User cannot to edit in template) 
  1. Last Name (LastName) – Read-only (User cannot to edit in template) 
  1. Designation (Designation) 
  1. Company (Company) 
  1. Experience (Experience) 

Step 2: Uploading PDF Template to Salesforce Documents 

Above created PDF template should be uploaded to the document folder in Salesforce to get access to the Omni Script form. 

  • Omniscript uses the files located under the document object to access the template, switch to Salesforce Classic (At the time of this writing, Document tab is not yet available in the lightning experience). Setup -> All Tabs -> Documents (Create a Document Name and upload the created pdf template 

Step 3: Creating an Omni Script Form 

Create an Omni script form to receive the data from the customer as it serves as a configurable way of creating a seamless customer experience. 

  •  Go to Omni Studio App -> Click on tab “Omni Script” -> Create New 
  •  Supply the Name, Language, Type, Sub Type and Description  

After saving the properties of newly created Omni Script, drag the Step element into the form. Inside step element, drag and drop the fields that we need to get as input. 

  1. First Name 
  1. Last Name 
  1. Designation 
  1. Company 
  1. Experience 

Step 4: PDF Action Connection 

PDF Action will connect the template that we uploaded to the document folder in step 2. 

Drag and drop the PDF Action element below the Step element in the form. 

Action Properties: 

Document: Choose the document template uploaded 

Send Transformation Section: 

Pre-Transform Data Raptor Interface: Select the data raptor that we need to create. 

Step 5: Creating Data Raptor Transform 

Go to Omni Studio App -> Click on tab “Omni Studio Data Raptors” -> Create New 

Map the fields for input JSON Path to the PDF output field (Match the name with text name created in Step 1 and save the data raptor. 

 Step 6: Generating PDF 

Finally, when we execute the form with input values, pdf gets generated automatically. 

Generated PDF: 

Here is how the generated PDF looks like: 

A customer can complete the forms for different services, such as government benefits, insurance policies, and healthcare coverage with Omni Script and Transform Data Raptors to generate the pdf after filling in the form. 

About MST

At MST Solutions our cornerstone is to adapt, engage and create solutions which guarantee the success of our clients. The talent of our team and experiences in varied business verticals gives us an advantage over other competitors.

Recent Articles

Work with us.

Our people aren’t just employees, they are key to the success of our business. We recognize the strengths of each individual and allow them time and resources to further develop those skills, crafting a culture of leaders who are passionate about where they are going within our organization.