Automated Selective Syncing from Salesforce to Pardot
This solution will work with ALL levels of Pardot using Salesforce Enterprise Edition or greater.
Sales & Marketing Users would like to specify which Salesforce records create a New Prospect in Pardot.
Currently, the Salesforce Connector in Pardot includes the option to ‘Automatically create Prospects in Pardot if they are created as a Lead or Contact in Salesforce’.
WebhooksByCypress is an Apex Class that allows an HTTP POST from a flow in Salesforce. This class uses an @invocablemethod, which means it can be used with Process Builder or Flows in Salesforce.
Once you’ve installed the Managed Package, there are some steps you’ll need to complete before getting the package to work.
In order for our HTTP POST to work from SalesForce, we need to make sure our Remote Site settings include https://go.pardot.com. Alternatively, you can also add your tracker domain.
This assures Salesforce TRUSTS the endpoint URL for Pardot. Optionally, a tracker domain can be used. We have found using go.pardot.com is a clean solution, but remember the form handler will need to use the domain included in the remote site setting!
Webhooks by Cypress are designed to work with Process Builder or Flows in Salesforce. In this example, we’ll be using Pardot form handlers. However, we’ve tested this with many other tools that accept HTTP POST and it works just fine! (For example, Webhooks by Zapier!)
The Apex class has been built to allow a url variable to be added in Process Builder or flow (see below). This is where we’ll add a URL with some variables from Salesforce. Depending on whether you’re using Process Builder, Flow to create a formula for your URL, or using a formula field created on the record itsself is up to you. This method will execute the HTTP POST method in salesforce to whatever is passed through to the url variable.
WebHooksbyCypress with Process Builder: In Process Builder, you add an Apex Action. Name your action whatever you’d like, we recommend Send to Pardot. Find the wh4sf__WebHooksbyCypressBatchJob Apex Class and add the url variable from the Set Apex Variable. Create a formula that includes your Pardot Form handler and whichever values you’d like to send to your form handler by appending the query string to your form handler
WebHooksbyCypress with Flows: In Flow, you will likely create a New Resource to generate your webhook URL. Here’s an example of a Resource we created:
This has been designed to be a flexible way to make HTTP callouts from Salesforce flow or process builder. There are many use cases I have not yet explored, including using this with custom objects, let us know what you come up with!
The correct Apex class being used for this package is wh4sf__WebHooksbyCypressBatchJob
As a Salesforce Admin navigate to the Installed Packages section, from your Setup Menu Navigate to Apps>Packaging>Installed Packages.
Confirm the domain being used with the Pardot Form Handler is included in Salesforce’s Remote Site Settings