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 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:
- 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.
- We need to build OmniScript where we are going to get the input fields.
- 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)
- First Name (FirstName) – Read-only (User cannot to edit in template)
- Last Name (LastName) – Read-only (User cannot to edit in template)
- Designation (Designation)
- Company (Company)
- 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.
- First Name
- Last Name
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.
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.
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.