Publish on Salesforce Pardot
The Scope/Pardot integration allows users to directly create scheduled list emails or to send list emails out immediately.
This integration will use the “Email List Send“ API Call and requires an existing Salesforce/Pardot user to go trough an Oauth based authentication flow.
Requirements
To complete the integration Scope needs the following values:
Consumer Key (Client ID)
Consumer Secret (Client Secret)
Pardot Business Unit ID
campaignId
listIds (can be one or more)
The following section explains where to get each of these values.
To get started, Scope, like any 3rd party integration depends on a “connected app” within the targeted Salesforce environment. The app needs to be set up with the following two permissions / OAuth Scopes and the following three callback URLs:
http://localhost:8080/v1/salesforcepardot/callback
https://auth.thescope.com/v1/salesforcepardot/callback
https://auth.test.thescope.com/v1/salesforcepardot/callback
After the creation of this app, Scope needs these two values:
Consumer Key (Client ID)
Consumer Secret (Client Secret)
Scope further needs your "Pardot Business Unit ID“
→ To find the Pardot Business Unit ID, use Setup in Salesforce. From Setup, enter "Pardot Account Setup" in the Quick Find box. Your Pardot Business Unit ID begins with "0Uv" and is 18 characters long.
For the then newly created email Scope further needs:
campaignId
This is the campaign that the newly created email is assigned to. The Id is visible when hovering over the desired campaign in the "native“ Pardot Interface (not the one directly accessed from Salesforce).
listIds
This is the targeted segmentation list of the recipients of the email. The Id of any list is visible when hovering over the desired segmentation list. Salesforce allows the email to be sent to multiple lists at the same time. This list must not be empty and contain recipients that can recieve emails ("Do not email“ is not set).
Once the connected app has been set up and the required field values have been sent to the Scope customer success team, the connection for a Pardot user can be established:
External Resources
Pardot API: https://developer.pardot.com/kb/api-version-4/emails/#sending-list-emails
How to create a connected app: https://help.salesforce.com/articleView?id=sf.connected_app_create.htm&type=5
Potential Problems
Error: "Invalid prospect ID“ or “Prospect not mailable“
Does the list (listIds) that is configured contain recipients that emails can be sent to? Is "Do Not Email" set? Does the list exist at all?
See https://www.salesforceben.com/the-drip/what-is-a-mailable-prospect-in-pardot-mailability-fields/
2022-07-14 07:52:55.659 ERROR 1 --- [scheduler_Worker-4] c.t.s.s.scope.simple.PublishToParDotJob : Failed publish to SalesForce Pardot publication: 59284 to API host https://pi.pardot.com/api. Reason Prospect not mailable
com.darksci.pardot.api.InvalidRequestException: Prospect not mailable
at com.darksci.pardot.api.response.Result.lambda$orElseThrowInvalidRequestException$0(Result.java:225)
at com.darksci.pardot.api.response.Result.orElseThrow(Result.java:207)
at com.darksci.pardot.api.response.Result.orElseThrowInvalidRequestException(Result.java:225)
at com.darksci.pardot.api.PardotClient.emailSendList(PardotClient.java:728)
at com.thescope.service.scheduling.scope.simple.PublishToParDotJob.publish(PublishToParDotJob.java:82)
at com.thescope.service.scheduling.scope.simple.AbstractPublishJob.execute(AbstractPublishJob.java:70)
at com.thescope.service.scheduling.scope.simple.AbstractPublishJob.execute(AbstractPublishJob.java:47)
at com.thescope.service.scheduling.scope.simple.PublishToParDotJob.execute(PublishToParDotJob.java:33)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)