Before you work with this guide, make sure you've installed PandaDoc for Salesforce, please click here and follow all steps.
Note, 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.
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.
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 detailed documentation attached at the end of the article.
- On the top bar, click “+” and select “PandaDoc Setup”;
- 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.
Create a Fieldset for the Custom Object
You first need to create a field set for your custom object for the PandaDoc module to be displayed.
- Open your custom object, scroll down to the section “Field Sets” and select “New” to create a new Field Set for the Custom Object.
- Enter the Field Set information as follows and select “Save”:
- Field Set Label: OBJECTNAME_PANDADOC
- Field Set Name: OBJECTNAME_PANDADOC
- Save the Field Set. Drag fields into the field set in order to pass data into PandaDoc.
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.
- Go to Setup > Develop > Visualforce Pages and click on “New” to add a new Visualforce page;
- Enter a Visualforce Label and Name for your page;
- Follow the link and copy the source of the Visaulforce template and paste it into the “Visualforce Markup” section of the page settings: https://github.com/PandaDoc/pandadoc-sfdc-examples/blob/master/src/pages/CustomObjectPandaDoc.page
- Replace the following value in the template with your object name which you can find in JSON Builder Settings section, in the Object Name column:
Save the Visualforce page.
Insert the Visualforce page into your Custom Object view
- Go to Setup > Create > Custom Objects, and select your Custom Object from the list of Custom Objects;
- Scroll down to “Page Layouts” and select “Edit” to edit your Custom Object’s page layout. From “Fields” select “Section” and drag a new section into your page layout;
- Name the section and select a 1-Column layout. Then select “OK”;
- From “Visualforce Pages” select your Custom Object Visualforce Page and drag the page into the Section you just created;
- Save the layout.
Your Custom Object layout will now have PandaDoc documents in the view that are associated with each Custom Object record.
Configure passing recipients and pricing items data into PandaDoc
Now you should set up lookup relationship for your custom object:
- In JSON builder settings under Actions select “Setup”;
- Configure Related Pricing Items and Recipients by selecting lookup relationship for them;.
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.