Salesforce Lightning. Create and send PandaDoc documents
Note:
This guide covers the functionality of the latest version of the PandaDoc <> Salesforce integration.Availability:
- PandaDoc: Business Annual* and Enterprise Annual plans*.
- Salesforce: “Professional”, “Enterprise”, “Unlimited”, “Developer edition”, "Performance".
*This integration is available as a paid add-on.
The integration will work for Opportunities, Leads, Contacts, Accounts, and custom objects.
Skip to:
- Features
-
Pass data from Salesforce into PandaDoc
- Configure templates
- Configure variables
- Passing recipients from Salesforce to PandaDoc
- Configure merge fields
-
Configure pricing blocks
- Send product information to a pricing table in PandaDoc
- Send product information into a quote builder in PandaDoc
- Sending multiple related lists to the PandaDoc pricing table or quote builder
- Pushing products from different related lists to different sections of a pricing table or quote builder block
- Create and send documents
- Link a document to an Opportunity in Salesforce
- Update a document with field values from Salesforce
Learn how to install and configure PandaDoc module here.
Features
- Variables: You can pass information from Salesforce to PandaDoc documents automatically with the help of variables and back.
- Products: Transfer product information from Salesforce deals to PandaDoc pricing tables and quote builder blocks and back.
- Create documents: You can create PandaDoc documents from Salesforce Opportunities, Accounts, Contacts, Leads, and custom objects.
- Status tracking: You can track the status of documents in Salesforce.
- Sync data between Salesforce and PandaDoc (not available on Group and Professional editions)
Pass data from SFDC into PandaDoc
Note:
When you create documents from your Salesforce opportunities, document value currency will inherit opportunity currency.To pass data from Salesforce to PandaDoc document, first, you should create your template and set it up with variables (same as merge fields).
Passing Salesforce fields into PandaDoc
Before setting up your template with variables, create a variable list for each object you will use PandaDoc with.
Note:
Variables must be set up for each object individually. Only the variables listed in that particular object will be available when creating a document from it (no cross-object population).- For that, find Pandadoc Setup in the App Launcher
- Scroll down to Salesforce to PandaDoc data flow and click Configure tokens
- Next, select an object you want to modify the tokens list for. If you have PandaDoc installed in another object, click Add object. You will see a default list of variables/tokens on the right. To add more, check the fields you want to add to the variables/tokens list and click Save
Note:
In case the field in Salesforce is empty, the variable in the document will not be populated later and you will have to fill it in manually.Configure templates
Note:
Salesforce template extension is compatible with package version 1.73 and higher.To push information from Salesforce into PandaDoc documents, you must first configure your template to specify what data to transfer and where it should be placed.
- In PandaDoc, open your template (click here to learn how to create a new one)
- Go to Extensions on the right panel and select Salesforce
- Connect the extension by selecting the +Add to document > Connect
- Select Connect and log in to your Salesforce account
Note:
Once you've successfully connected to Salesforce you may need to wait for up to 5 minutes, the side panel will refresh once the connection with the platform is established.
Configure variables
Add Salesforce opportunity variables
Pre-set a PandaDoc template with variables that will pull information from Salesforce opportunity and associated Account and Contact each time you create a new document from this template.
In the Salesforce extension on the right, select View related variables. From here, you can search for, copy, and paste the needed Salesforce variables into your template.
Note:
- Date variables formatting depends on the default date format set up in your workspace settings.
- Custom money variables will pass to the document without a currency symbol and formatting.
Warning:
Encrypted text fields cannot be passed through a variable.Passing recipients from Salesforce to PandaDoc
Note:
Passing recipients info best works with PandaDoc Roles. Learn how to setup roles on a template here.By default Salesforce pushes the following recipient information depending on an object where your PandaDoc module is located:
- from Opportunity: Contact Role info
- from Account: Contact info + possible to push Account info
- from Lead: Lead info
- from Contact: Contact info
- from Quotes: Contact info
In case you pre-assign a recipient on the template level, they will be automatically assigned to the role when the document is created via Salesforce.
You can configure which field from Salesforce will be mapped to a role in PandaDoc as well as set up which fields will be sent as the following parameters:
- First name
- Last name
- Company field
- Phone field
- Role field
- Go to App Launcher and find PandaDoc setup
- Scroll down to Salesforce to PandaDoc data flow and select Configure Recipients.
Note:
You will see default mapping for default objects. You can change them or add new mappings for custom objects.If you want PandaDoc to automatically map recipient to a specific role, you need 2 things:
- Role field configured in the Recipients mapping.
- Have identical Role names in Salesforce and in the PandaDoc template.
If you have this set up right, PandaDoc will insert the respective recipient into the respective role when you will be creating documents.
Note:
PandaDoc pulls all related contacts from Salesforce into the document. If you want to remove any, delete them on the role popup window or in the recipients section on the document.If you generate documents from a quote or a case, you might be using a lookup field to a specific contact record. You can specify what lookup fields to use as recipients by going to PandaDoc Setup > scrolling down to Object Customization settings. Find the object you need to set this up for and click Setup on the right-hand side.
Then choose the field to use as a recipient and click Save. You can choose up to five fields.
Next, set up the recipient mapping. And that's it!
Filter recipients
You can filter contacts that get transferred into PandaDoc documents as recipients based on yes/no fields in a record (aka Boolean fields).
- Go to App Launcher, find PandaDoc Setup, and select Configure Recipients
- Scroll down to Recipients Filtering
- Click Enable Filtering
- Choose a field based on which value recipients will be filtered
- Choose the value of the field based on which recipients will be filtered: true - yes, false - no.
If you have set up Recipient mapping for Accounts, you can then configure it to pass this Account info (email, phone number, etc) as a recipient to PandaDoc.
For that, go to PandaDoc Setup, then scroll down to Object Customization settings. Next to the Account Object name click Setup, tick the box next to Sending Account as recipient, and click Save.
Note:
Salesforce Contact Roles and PandaDoc template roles cannot have 2 contacts assigned to one role.If you have any suggestions regarding PandaDoc functionalities, please submit an idea on the idea portal or reach out to our Support team.
Configure merge fields
You can pass data into PandaDoc fields similarly to how variables operate. Unlike with variables, however, you must not include square brackets.
Add Salesforce opportunity merge fields
- Select a field or add a new one and select Properties on the floating panel
- In Properties on the right, the Merge field data source should list the ‘Salesforce opportunity’
- You can search and select the needed Salesforce opportunity and opportunity-associated variables
Once the document has been sent, the recipient will see the pre-filled data and be able to update this field, provided the field has been assigned to them.
Configure pricing blocks
Note:
The current order of line items in the opportunity is maintained in the pricing table and quote builder block when you create a document from your opportunity or update information in the document using the ‘Import from CRM’ button.Send product information to a pricing table in PandaDoc
PandaDoc can send Products from an Opportunity, Leads, Contacts, or Account to a pricing table in a document. In this guide, we'll review how to pass Opportunity Products into PandaDoc, but the setup is the same for other objects.
First, map Opportunity product fields to pricing table fields.
- Go to PandaDoc Setup, then click on PandaDoc Configure Pricing Items.
- Opportunity products will be displayed by default but you can select another object to set up the mapping for.
- Next, map Opportunity product fields to pricing table fields and click Save.
- Below, under Pricing Items Sorting, you can set up the order in which you want the products listed in the PandaDoc pricing table.
Now, set up the pricing table to accept products from Salesforce.
- Open your PandaDoc template and add a pricing table
- Data merge will be enabled by default.
That's it for the setup! When you start a new document from an Opportunity (assuming products have been added to it), make sure you select your template. Products will be added to the pricing table. If certain fields are not displayed, click the plus sign on the right side of the pricing table and select the fields under Add hidden.
Pass custom product fields into pricing table
Sometimes, you need to pass more than the standard set of product fields.
- First, add Opportunity product fields into the tokens/variables list by going to PandaDoc Setup > Configure tokens. Select Opportunity product, and check the fields you need to pass on the right, and they will show up in the tokens list on the left
- Click Save. That's it for the setup
- Make sure the pricing table in the template has Data merge enabled
- When you create a document from the template, click the plus sign on the right side of the pricing table
- Select the custom product fields under Add hidden.
If adding custom fields from hidden columns every time you create a document seems like too many clicks, there's a way around that.
- Create a document and unhide custom product fields
- Then, click the vertical ellipses in the top right corner and select Convert to Template. Your new template will open in a new browser tab
- In the template, you can delete the products from the pricing table, but make sure you keep the custom field columns
- Next time you start a document from Salesforce, use this template. The columns will be populated with custom product field values.
Send product information into a quote builder in PandaDoc
Availability: Business* and Enterprise plans
*Quote builder is a part of our CPQ add-on
Note:
The current order of line items in the opportunity is maintained in the pricing table and quote builder block when you create a document from your opportunity or update information in the document using the ‘Import from CRM’ button.You can send product information to a quote builder block from an opportunity in Salesforce. Start by adding a quote builder block to your template, then create a document from an opportunity in Salesforce.
Once you’ve created a document using this template, the following product information will be sent to the quote block:
- Product name
- Price
- Quantity
- Discount
To unhide custom fields in your newly created document, click on the quote builder block, select Edit quote on the floating panel, select Add column at the top right of the section, then select your custom column from the dropdown under Show hidden.
Note:
If your quote builder block contains several sections, products will be pulled to the last section. If your template contains several quote builder blocks, products from your opportunity will be pulled to each block.Sending multiple related lists to the PandaDoc pricing table or quote builder
Note:
Make sure to update your PadaDoc package in Salesforce to the latest version for this functionality to become available.This functionality will work across all Salesforce objects (Opportunities, Leads, Contacts, Accounts, Quotes, and custom objects) and it allows:
- Sending a combined array of up to 5 related lists to PandaDoc pricing tables or quote builder blocks.
- Sort pricing items from different related lists by merge rules based on unique related list’s field. Can be applied to a single quote builder block (section assignment) and to different quote builder blocks on the same or different templates.
- Send additional property “sObjectType” in the item’s “custom_fields” object, containing the API name of the source object (e.g. OpportunityLineItem).
To configure multiple related lists for your Salesforce object:
- Open the Salesforce object you want to configure multiple related lists for.
- Click on the gear icon on the top of the PandaDoc widget, and select the ‘Configure related objects’ option.
- In the ‘Pricing items related list(s)’ section, choose objects that will be used as pricing items for your object.
- ‘Save’ your configuration.
Pushing products from different related lists to different sections of a pricing table or quote builder block
Product mapping needs to be configured on a template level. By default, data merge for column mapping is enabled for all newly added quote builder blocks in your templates. You can easily verify this by looking at the top-left corner of the quote builder block, where you will find a label 'Data merge is on' if it is enabled.
Click here to learn more about Salesforce product mapping.
If data merge is disabled for a quote builder block in the template you're using to create documents from Salesforce:
- Select a quote builder you’d like to set column mapping for, or add a new one.
- Select Properties on the floating panel.
- On the right, select Set up data merge.
- Next, access the data merge in quote builder settings on the right and click Enable.
In the pop-up, select Merge rules > Add rule.
Use ‘sObjectType’ Salesforce field to filter pricing items of different related objects to separate quote builder sections.
When you create a document from your object with multiple related lists, pricing items from the related objects will be distributed into different sections of your quote builder block:
Important to know:
- If you choose 'OpportunityLineItems' and some other related list as pricing items, and have the “Update Opportunity Products” trigger enabled, only opportunity products will be updated. Trigger will not create or update opportunity products from pricing items of other types of objects configured as related lists.
- If you choose multiple relations, items from all objects will be sent as pricing items to PandaDoc pricing table or quote if you have pricing item mappings for all of them.
If mapping is not configured for some of the pricing items, a warning message appears on the setup page, and items from that relationship won’t be sent to PandaDoc. Other relationships with mappings will be sent.
Create and send documents
Now that you've created and set up your template, you can proceed to creating and sending documents from Salesforce.
- Go to a record, find the PandaDoc module, and click New Document
- Choose a template or select the templates you’d like to bundle, then select Add items and assign recipients to roles, if applicable
- Click Continue and check your document: variables, content, recipients list, reminders and Send your document
- You can now go back to the record in Salesforce and track your document status
- When a document is completed, its .pdf will show up under Files in the record. (Although it is a part of the sync triggers functionality, it's enabled by default when you install the PandaDoc package.)
Add Files in your object view
If you do not see Files in your object, you may need to add it to your object view.
To do this you will need to go back to the Object’s Page Layouts in Salesforce Settings:
- Open your Salesforce, in the top right corner, click the gear icon, and select Setup
- Go into the Object Manager list and select Opportunity
- In the Opportunity, go to Page Layout, and select Opportunity Layout
- From the Opportunity Layout page, use the top toolbar to find Related Lists. Next, find Files, drag and drop where needed, then click Save
- Double-check your Opportunities to ensure Files can now be seen from the page.
Link a document to an Opportunity in Salesforce
Note:
This feature is available for users with a Member, Manager, and Admin role. If you use custom roles make sure to enable “Can view and request integrations” permission for the role to allow users to link documents to Salesforce and import data.If you have a document created in PandaDoc that you would like to link to an Opportunity in Salesforce, we’ve got you covered!
Click here to learn more.
Update a document with field values from Salesforce
Note:
The document must be in the Draft status for this feature.Note:
This feature is available for users with a Member, Manager, and Admin role. If you use custom roles make sure to enable “Can view and request integrations” permission for the role to allow users to link documents to Salesforce and import data.If the information in a Salesforce record is updated after the document has already been created from this record, you can update the document with the correct values:
- In the document, go to the Integrations panel by clicking the Salesforce icon on the left inside the PandaDoc document
- Under Document data, select “Import from CRM”
-
The variables and products in quote builder/pricing table will be updated with the latest information from Salesforce provided the document was created from Opportunity. The list of products in PandaDoc will change based on the addition or removal of opportunity products.
Note:
The current order of line items in the opportunity is maintained in the pricing table and quote builder block when you create a document from your opportunity or update information in the document using the ‘Import from CRM’ button. - You can use the "Import from CRM" feature in any object in Salesforce: Opportunity, Account, Lead, Contact, or custom objects.
If the field in Salesforce is empty, the corresponding variable won't be refreshed.
Warning:
You cannot update PandaDoc fields or role variables.Troubleshooting steps can be found here.