SFDC Process Builder: Update Opportunities

When a PandaDoc is completed, the opportunity status will update to "won" and the close date is auto-updated to the current date. Please note this is only available in Editor Version 1 of PandaDoc currently.

Requirements

  1. Salesforce account
  2. PandaDoc subscription (Enterprise or Business)
  3. Must use PandaDoc Salesforce Integration

Navigate to Process Builder in Salesforce Classic

Open up the opportunities tab in Salesforce and click on any existing opportunity in your system.

Click "Edit Layout" toward the top right of the page.

Search for "process builder" at the top left of the screen in the search bar.

At the far left, click "Process Builder" under Build --> Create --> Workflow & Approvals --> Process Builder.

How It Works

The purpose of the process builder is to customize your workflows within the Salesforce tool. The builder allows conditional workflows that can automate certain steps in your process, which help streamline performing actions all in one location vs. utilizing other tools to perform automated triggers in conjunction with PandaDoc.

When choosing your new process, you have the option to choose the name and when it starts.

Add Objects to Your Process

Salesforce has many existing objects, as well as the ability to add custom objects. The process builder is mapped around the object of your choosing. In the case of the screenshot below, you can see we chose "PandaDoc Document" as the precursor to the rest of the process and we told Salesforce to start the process "when a record is created or edited."

🚧

Process Mapping

You may only use one object at a time when preparing an automated process using the Salesforce Process Builder.

Add Criteria

Now that we've selected an object (PandaDoc Document), we need to add our criteria and choose what action to take when a PandaDoc document is completed.

  1. Click "+Add Criteria"
  2. Type in the name of your choosing for the Criteria Name.
  3. Make sure the "criteria for executing actions" is marked as "conditions are met."
  4. Find the field by typing in "Input JSON", mark the operator as "contains" and the value should be the template ID. See the picture below on where to find the template ID:

You must go to the template of your choosing and you can find the template ID in the URL.

  1. Type in status, mark the operator as "equals" and type in the value "document.completed."
  2. The conditions should also be marked by default, but ensure this example is marked as an AND statement (all of the conditions are met).

❗️

Default Settings

Many options in process builder will be marked by default. Often times your process builder may need alterations to these default values to make the trigger work properly.

Add Immediate Actions

Think of immediate actions as the actual trigger. The criteria determines if the action is allowed to happen, while the action is the change that takes place; in this case, our change is to update the stage of an existing opportunity.

  1. Click "+Add Action"
  2. Select the type of action, in this case we're updating an existing opportunity/record.
  3. Select the record type and a "record related to PandaDoc," type in "opportunity" and select the individual option for "opportunity" (do not select the opportunity with an arrow).
  4. Ensure "criteria for updating records" is marked as "no criteria-just update the records!"
  5. Type in "stage" in the fields section, the type must be a picklist and the value should be "closed won."
  6. Let's save our changes.

🚧

PLEASE READ

It is important to note for this automation to take place, you must create new documents from the PandaDoc iFrame within your existing opportunities in Salesforce. We cannot create documents directly in PandaDoc or the Process Builder will not trigger.

Testing Process Builder

Now that we've created our process, let's test to see the automation in action:

  1. Navigate to any existing opportunity in Salesforce, double check the stage is anything but "closed won" and go ahead and click "new document" from the PandaDoc iFrame.
  2. Create and complete a document from the template you chose to influence in your process builder.
  3. Look back at the stage in the opportunity you created the document for; you may need to refresh your webpage to see the changes. The stage should now automatically update to "closed won."

Did this page help you?