Salesforce Integration with PandaDoc – Part 1a: Adding PandaDoc module to Custom Objects in Salesforce

Focus: The focus of this document is to provide you steps on how to install the PandaDoc module into custom objects in Salesforce.

If you have not gone through the installation of PandaDoc into Salesforce, please click here and follow all steps.

If you created a “Custom Object” in Salesforce and you want to add the PandaDoc module to it, you will need go through the steps for each Custom Object. (Click here to learn how to create a Custom Object within Salesforce)

Salesforce Versions for Custom Objects: You will need Salesforce: “Enterprise”, “Unlimited”, or “Developer edition”. Salesforce Pro does not offer access to APEX classes and are unable to use custom objects with this integration.

For developers, click here to find detailed documentation with code examples on how to add custom objects to your Salesforce-PandaDoc integration.

Step 1: Create or Access Your Salesforce Custom Object

Step 1a: Go to Setup -> Build -> Create -> Objects

SFDC - Custom Objectss -1 SFDC - Custom Objectss -2

Step 1b: Select your Custom Object or create a new one by clicking “New Custom Object”.

SFDC - Custom Objectss -3

Step 2: Create a Fieldset for the Custom Object

Step 2a: Scroll down to the section “Field Sets” and select “New” to create a new Field Set for the Custom Object.

SFDC - Custom Objectss -4

Step 2b: Enter the Field Set information as follows and select “Save”:


For this example, we’ll create a Custom Object called “Service City”, representing an area a business provides services in. We might have documents to store for operations in each area.

SFDC - Custom Objectss -5

Step 2c: Save the Field Set

SFDC - Custom Objectss -6

Step 3: Create Custom JSON Builder for Custom Object

PandaDoc will look for a custom JSON builder for your custom object to serialize the Custom Object’s data and pass it to PandaDoc when you create a document from your Custom Object’s page.

With the new version, PandaDoc allows you to quickly setup PandaDoc module for a custom Salesforce object using the predefined JSON Builder. You will have the option to pull Pricing items and Recipients into a PandaDoc document.

If are using an older integration version or you’d like to set up a more customizable option, please see here how to Create a custom JSON builder.

Step 3a: On the top bar, click “+” and select “PandaDoc Setup.”

Step 3b: At the bottom you will find the JSON builder settings, click “Add PandaDoc to Custom object”.

The system will prompt you to select the custom object that you want to connect PandaDoc with.

Step 3c: Once done, you can further customize Pricing Items and Recipients that will be pulled automatically into the PandaDoc document.

Note: Please be aware that to pull Pricing Items and Recipients data you need to configure Recipients and Pricing items flow to a document.

In JSON builder settings under Actions select “Setup”:

In Setup, you can configure Related Pricing Items and Recipients.

Each list contains entities in lookup relationship with your selected custom object.

Once you selected and saved the Related Items, the information about Pricing items and Recipients will be automatically pulled into a PandaDoc document created from your custom object.

Step 4: Create a VisualForce Page for the Custom Object

To embed the PandaDoc module your custom object pages, you will need to create a VisualForce component and add it to custom object’s page layout.

Step 4a: Go to Setup -> Develop -> Visualforce Pages and click on “New” to add a new Visualforce page.

SFDC - Custom Objectss -19

Step 4b: Enter a Visualforce Label and Name for your page.

SFDC - Custom Objectss -20

Step 4c: Copy the source of this linked Visaulforce template and paste it into the “Visualforce Markup” section of the page settings:

Step 4d: Replace the following value in the template with your controller name:

  • Line 1: StandardController="PD_Custom_Object__c"

Step 4e: Save the Visualforce page.

SFDC - Custom Objectss -22

Step 5: Insert the Visualforce page into your Custom Object view.

Step 5a: Go to Setup -> Create -> Custom Objects, and select your Custom Object from the list of Custom Objects.

SFDC - Custom Objectss -2

Step 5b: Scroll down to “Page Layouts” and select “Edit” to edit your Custom Object’s page layout.

SFDC - Custom Objectss -23

Step 5c: From “Fields” select “Section” and drag a new section into your page layout.

SFDC - Custom Objectss -24

Step 5d: Be sure to name the section and select a 1-Column layout. Then select “OK”.

SFDC - Custom Objectss -25

Step 5e: From “Visualforce Pages” select your Custom Object Visualforce Page and drag the page into the Section you just created.

SFDC - Custom Objectss -26

Step 5f: Save the layout.

SFDC - Custom Objectss -27

Step 6: Finished

Your Custom Object layout will now have PandaDoc documents in the view that are associated with each Custom Object record.

SFDC - Custom Objectss -28

Have questions? For faster support please:

  1. Log in to PandaDoc
  2. Click on the “Help” button next to your profile icon
  3. Choose Submit Help Request option

Or feel free to contact us using our public form:

Contact Support