Category

New Features

It’s time to prepare for the Salesforce Winter ‘22 Release and how it will affect your Pardot instance.

We get three major releases from Salesforce each year — Spring, Summer and Winter. Each Salesforce release includes upgrades and enhancements that affect Salesforce orgs in different ways. 

So, if you’re using and managing Pardot for your company or organization, then you’re in the right place. We’re going to cover everything you need to know about the Salesforce Winter ‘22 Release for Pardot admins and users.

Salesforce Winter ‘22 Release Dates

Here are the Salesforce Winter ‘22 Release dates:

  • August 12, 2021: Pre-release org signup
  • August 16, 2021: Release notes available
  • August 27, 2021: Sandbox preview starts, release site available, and release Trailhead module launches
  • August 30, 2021: Release overview deck and feature matrix available
  • September 10, 2021: Release weekend
  • October 1, 2021: Release weekend
  • October 8, 2021: Release weekend
  • September 10-17, 2021: Release Readiness Live

Salesforce Winter ’22 Release: Four highlights for Pardot users and admins

Pardot users and admins are getting lots of attention from the Salesforce Winter ‘22 Release. Some updates are changing the way we work to meet evolving technology demands. Others are saving us time by connecting the dots in a logical way. All we know is, this release includes big updates for people in the sales and marketing world.

Highlight 1: Salesforce My Domain requirement

A Winter ‘22 release update has the potential to create chaos for companies that want to use branded domain names.

The Salesforce Winter ‘22 release will require all orgs to have a My Domain.

That means Pardot orgs that aren’t already configured for My Domain will get a random Salesforce-picked domain name. My Domain names have to be unique, so you’re outta luck if some other Salesforce customer has yours already.

If you don’t have a My Domain yet — then register your brand name now! You don’t have to deploy My Domain right away, but you can claim your preferred domain name now and deploy later (preferably in a Sandbox).

Salesforce My Domain Example

There’s likely to be a gold rush for domains from now until the first few weeks of the Winter ‘22 release, peaking at release, as folks register My Domains before enforcement or pick new ones after being force-registered.

What you should do: Implement a My Domain if you don’t have one

Here are resources to use when implementing a Salesforce My Domain.

(Thanks to Sercante Salesforce Solution Engineer Hayley Tuller for this one!)

Highlight 2: Pardot Classic App Retirement

Pardot Classic isn’t going away completely. But, the Winter ‘22 release includes a step toward moving in that direction. Salesforce has given soft nudges to customers encouraging them to adopt Lightning for quite some time. With that in mind, the Winter ‘22 release brings the news that Salesforce is retiring the Pardot Classic App after October 17, 2021. 

Current Pardot Classic users can refrain from panicking for now because they still have time. The Pardot Classic App is a Salesforce page with Pardot on top via iFrame. The Pardot Classic App experience is going away, but you can still access Pardot Classic for now. Salesforce will disable the Pardot Classic App for ALL users on October 17, 2022. After that date, Pardot Classic users will only be able to access Pardot using the standalone Pardot app (available at pi.pardot.com).

Say goodbye to the Pardot Lightning app

What you should do: Start planning for the switch to Pardot Lightning

Salesforce Lightning is here to stay, so expect more pushes toward making the switch if you’re using Pardot Classic.

Here are resources to prepare for switching to Pardot Lightning.

Highlight 3: Pardot marketing asset design capability enhancements

Marketers love drag-and-drop tools like fish love water. Salesforce is opening the doors for more drag-and-drop design functionality in Pardot through a few different enhancements.

Enhancement #1: Pardot drag-and-drop landing page editor

Pardot Lightning users now have the ability to build landing pages faster in Pardot with a user-friendly landing page editor. After you enable the feature, the Pardot drag-and-drop landing page editor allows you to create landing pages from templates or scratch. 

Enhancement #2: Custom components for the email content builder

You currently use standard components when you create emails in Pardot. These are the blocks you use to add elements, like graphics or text boxes, to your email drafts. 

Winter ‘22 brings an enhancement that will open the doors to using custom components in your emails to add fancy features and customizations. 

Enhancement #3: Push emails from Lightning Experience into Engagement Programs

We were all excited to start creating emails in the drag-and-drop editor in Salesforce Lightning Experience. But, we were limited in how we could use those emails.

After Winter ‘22, you can push those emails from Lightning Experience into Pardot Engagement Studio programs. All you have to do is create your emails and activate them for use in automations.

What you should do: Evaluate how your team creates Pardot marketing assets

All of these enhancements to the way marketers build assets in Pardot are meant to make the tool easier to use. It may make sense for your team to adopt them or look toward other options. You can figure that out by evaluating your team’s current process for building marketing assets like landing pages and emails.

Document your team’s current processes and talk to them about what works and doesn’t work well for them. Also, pay attention to how much time they are spending on these tasks so you can determine if it makes sense to invest in upgrades or external resources.

Highlight 4: Extending Pardot through integrations

Salesforce is highly customizable thanks to integrations. And new ways to extend Pardot through integrations are going live all the time.

Here are a few Salesforce Winter ‘22 Release enhancements that use integrations to extend Pardot functionality.

Enhancement #1: Send Slack notifications to Pardot users via completion actions (beta)

Interacting with prospects at the right time and in the right way is key to earning their trust. And now you can enable your sales team to capture those moments even more.

A Winter ‘22 enhancement allows you to set a completion action that notifies Pardot users in Slack when prospects interact with marketing assets. Because the Slack acquisition is still unfolding, this new feature also gives us a glimpse of what’s to come now that Slack is officially under the Salesforce umbrella.

Enhancement #2: New enablement resources and the Pardot API v5

Salesforce developers who work with Pardot will have access to the Pardot API v5 with the Winter ‘22 release. This update also includes super helpful enablement resources for Salesforce developers who are new to working with the Pardot API.

Enhancement #3: Pardot extensibility enhancements

You probably use third-party apps all the time for things like webinars and virtual events. But using the data from those third-party apps in Pardot can be difficult without heavy lifting. 

The Salesforce Winter ‘22 Release is opening the doors to capturing and using that third-party data in Pardot. You can now collect prospect data in third-party apps and bring it into Pardot by setting up a Marketing App Extension.  

What you should do: Integration brainstorming session

Have a brainstorming session to discover ways you can use integrations more effectively in your Pardot instance. You can kickstart the session by completing the sentence “wouldn’t it be nice if Pardot…” as many times as you can. Then, rank those sentences you created and focus on the ones that will have the greatest impact on your marketing efforts.

Implementing those integrations you identified through your brainstorming may go beyond your team’s capabilities. If that’s the case, you can reach out to Sercante Labs to find out how you can make it happen.

Pardot is getting bigger and better all the time

B2B marketers who come to Pardot are usually looking to scale their efforts and grow in a way that makes sense. These latest enhancements from the Salesforce Winter ‘22 Release get Pardot marketers closer to those goals by saving them time and resources. 

Adding more user-friendly design capabilities addresses a major pain point for many Pardot customers. And extending Pardot through integrations and feature upgrades is preparing Pardot orgs of all sizes for the future.

Contact the team at Sercante to get help implementing these enhancements in your Salesforce org and Pardot instance. And leave us a comment below to let us know what you think about the Winter ‘22 Release.

The ability to designate Pardot Accounts as campaign members is finally here!   

Included in the Salesforce Spring ‘21 release is a beta feature that’s going to make many Pardot admins and users happy. 

Here is what you need to know so you can get started using the new Accounts as Campaign Members feature in Pardot.

One action to reach all contacts within a Pardot account

Why does this new feature matter?  

There are many times when the communication you send to your customers may relate to the full account versus just a single contact.  Adding the account also mitigates potentially missing opportunities.  For example, this would be helpful for when the key contact for the account leaves. Other account contacts would still be able to receive the communication even if the contact is no longer active.

How do I set this up?  

Setup is easy!  Open Salesforce settings and search for “Accounts as Campaign member” then click enable.  That’s it! Well Almost…

Likely you will want to have the ability to add the account to a campaign from the account page.  To accomplish this, add the Campaign History Related to list to the Account Page layout.

  • Go to Salesforce setup > select objects > open the Account object then open page layouts. Add the related list and save.
Accounts as Campaign Members 2

You will also want to make sure you take full advantage of the reporting by adding a new custom report type so you can create reports that show engagement by Account!

Open Salesforce Setup > search for Report Types

  • Select “New Custom Report Type”
  • Select Campaign as the Primary object and the accounts object as secondary as shown below
  • Save 
Accounts as Campaign Members 3

Reporting considerations

What options are available to report on Accounts added to Campaigns?

  • The standard campaign with campaign members gets a new member type = Account.
Accounts as Campaign Members 4
  • The Standard report campaigns with accounts gets the account information added.
Accounts as Campaign Members 5
  • Reports created based on your new custom type allow you to review campaign activity by account.
Accounts as Campaign Members 6

Important things to know

Here are a few other considerations you should keep in mind when you enable the Accounts as Campaign members feature in Pardot.

  • If you add an Account to a campaign and that account has Opportunities but these opportunities are not added to any campaign, you cannot see those opportunities in the campaigns with Opportunity reports.
  • Opportunities created through the campaign will be associated with the account but separate from the campaign.
  • If Opportunities from the campaign are added manually to the campaign, then it will show in the pipeline and won Opportunities reports.
  • Adding accounts to the campaign will not change or affect contact roles for the account members added.
  • Records and activities created on Accounts before or after adding the account to the campaign will not impact the campaign Dashboard or campaign influence
  • Leads associated with accounts (like those through Lean Data or other tools) are not automatically added to the campaign.  These need to be added manually.

How do accounts added to a campaign appear in a Dynamic Pardot List?

Objects that are created around the Account as Campaign members exist in Salesforce to link Account and Campaigns together on the Salesforce side.

Account contacts added to the campaign will NOT show up on Pardot Dynamics lists as a prospect.

Learn more about Accounts as Campaign Members in Pardot

Want to know more?  Check out these helpful links! 

Remember to reach out if you want to know more about setting up these features in your Pardot org. Or comment below to let us know your thoughts.

Salesforce just gifted us with their Summer 2021 Release Notes, and our team is— to say the least, ecstatic. With so many new Pardot updates, users and administrators can now optimize their workflow, prevent tedious nuances in dynamic content, and make better data-driven decisions. 

If you’ve been itching for better ways to organize your data, get the most out of your email sends, and have more control over your instance, we’re excited to show you how you can do just that with our top choices for exciting features to boost your marketing capabilities through Pardot and the Salesforce platform.

Pardot Release Highlights

#1: Einstein’s Key Account Identification

If you’ve been looking for a more accurate way of identifying who your best possible customers are, look no further. The ultimate visibility is within Einstein’s Key Account Identification— Salesforce handles all the dirty work of scrubbing data and spending hours making sense of attributions to show you which prospects are more likely to generate the most revenue.

  • Similar to Pardot grading, Einstein’s Account Tier uses letters to rank your accounts. And unlike Pardot grading, this ranking adjusts itself automatically. No longer will you rely on the decisions of individuals to set the rules, but rather you can make more informed decisions on how to convert the prospects this grading system presents to you.
  • With accounts generating so much data, it can be tedious to identify the most impactful trends in each account. In this game-changing release, Einstein will show you how certain accounts stack up against others using their industry and historical engagement.
Einstein's Key Account Identification

#2: Send List Email Your Way (Pilot)

There’s (probably) nothing worse than getting a disingenuous email that looks like all the other sales pitches your prospects receive. If your sales reps expressed frustration in their limited capability of sending list emails exclusively through Salesforce, this release is for them. Now, they have the ability to send from Outlook or Gmail, giving them more control over their workflow. 

  • Emails sent to qualified leads will look more authentic, like they came directly from a sales rep instead of a system. 
  • Due to the more authentic look, we expect to see higher delivery, open, and click-through rates

One thing we encourage teams to keep an eye on is how it will impact reporting and governance controls at an early stage, so if you participate, advocate for what you would like to see on these grounds. 

#3: Score Lead Segments Separately for More Accurate Results

If the leads your business works with are vastly different from each other, this new way of tracking conversion patterns could greatly improve your scoring. With enough data, Einstein can calculate accurate scores to better define your segments and provide more clarity into each lead’s conversion patterns.

  • Create fields of criteria that best describe your lead segments. After you’ve prioritized the criteria, Einstein will score it as part of the higher priority segment, essentially categorizing your leads for you. 

#4: Make Sure Emails Have the Right Dynamic Content

If you’re someone who somehow always has an excessive amount of tabs open at one time, this new feature will allow you to cut that down by a few and give you more confidence in your sends containing dynamic content.

“This one is a killer for me. I typically end up breaking naming conventions by adding (ID) to the end so I can quickly find the dynamic content. This will be great to still easily find without have to disrupt the naming.” – Mike Creuzer

Benefits: 

  • Avoid the back-and-forth of your QA process.
  • View ID numbers on the Dynamic Content list view so you can make sure you have the right merge field in each of your emails.

#5: Boost Email Engagement with Einstein Send Time Optimization

Send list emails to individual prospects at their preferred times. Take out the guesswork and elaborate segmentation with Einstein Send Time Optimization. Using Einstein’s machine learning skills, you can be sure your message gets to the right person at the right time.

#6: Designate a Marketing Admin to Handle Pardot Setup Tasks

Never worry about giving a user too many permissions. If you’ve been worried about losing control over Pardot administration, this feature of the release was made for you. Stop losing sleep over security concerns and give users access only to what you want them to have access to. 

A new user permission makes it easy to designate a marketing admin to handle Pardot setup and management tasks. Assign the new Manage marketing setup tasks permission and the View setup and configuration permission to grant access to all the Pardot configuration options in Salesforce Marketing Setup.

Old PermissionsNew Permissions
Required a Pardot Admin & a Salesforce Admin to fully configure PardotA single individual (Most likely the Pardot Admin) can be given permissions to configure Pardot from Salesforce without the need to give them full Admin Access in Salesforce

#7: Get More Clarity and Control on Email Marketing Settings

To call this part of the release an upgrade and say that we are “excited about it” would be a huge understatement. Before this was available, it was difficult and time-consuming to see the status of your prospects’ mailability. These settings can be edited in Automation Rules, Engagement Studio, and Prospect Import. 

Activate this feature by clicking the “Get Started” button at the top of your dashboard. Just remember that activating it would be permanent, and you should read Salesforce’s considerations when accessing the upgrade.

Doing so will give you a view of your prospects’:

  • Overall mailable status
  • Do Not Email
  • Opted Out settings
  • Bounce information

#8: Reporting on Email Messages

Spend less time requesting a useless email log and get more visibility into custom reporting. Previously, you only had access to the email’s delivery status— which is nothing compared to what’s available with this new feature. Now you can see if the customer opened it, when they opened it, bounces, engagement, and more. 

Bonus Platform Features Worth Noting

Inclusive terms are replacing legacy language

As part of Salesforce’s efforts to refine language in their products to more accurately reflect inclusivity, Salesforce is replacing terms deemed non inclusive. Though APIs and older API documentation aren’t included because changing terms in the code can break current implementations, this will allow your messaging to be more inclusive than ever, enabling you to reach a wider audience.

Inline editing of reports

If you have to make changes to records and reports, the previous capabilities might have made that a little tedious to deal with. In recent releases, you have been able to edit records directly in list view. Now, you can do the same thing with reports, saving you unnecessary clicks that bottleneck your workflow.

Enabling this feature is simple. Just go to your Reports and Dashboards Settings and modify the behavior of your interface by checking, “Enable Inline Editing In Reports.”

Once you’ve done that, look for the pencil icon, can click it, modify the value, and save. The field value will update on the report and in the source record, and the report reruns automatically. 

On the Salesforce Radar

It seems that as soon as we’re comfortable with the new features, even more updates are on the calendar. Here’s a couple that any user can be excited about (and will really allow you to take advantage of new Salesforce features).

Sandbox Release

Preview orgs are live now, so if you don’t have one, that should be the first thing you do after reading this!  Remember, Sandbox previews are coming, so now is a good time to look at what instance your sandboxes are on and make your plan.  

Don’t’ forget to join the Release Readiness Trailblazers group. That’s right, there’s a place for all your questions to get answers and share what you’ve found while testing out new features. 

Release Readiness Live (Week of May 21st)

This is a must-attend event. This series of webinars is run by project managers to talk about and demo new features so you can see these new items in action. Ask live questions and get live answers for all the things you’re stuck on.  

Now that you’ve seen all the ways you can customize your interface based on your needs as an administrator or consultant, check out the full Release Notes from Salesforce and let us know in the comments what your team is excited to implement! Be sure to stay on top of more updates and to add these up-and-coming deadlines to your calendar:

May 6 Cut off to refresh sandboxes for preview instance

May 7  Summer Preview Window begins 

(must have an active sandbox on a preview instance by May 6)

May 17  #LearnMOAR page goes live

May 21 Awesome Admin Release Preview

May 24 – 28 Release Readiness Live Week

June 6 – June 12 Main Release Dates

Need help with implementation or want to get training courses to gain a better understanding of Salesforce release features? Head over to our Pardot & Salesforce training page where you can sign up for mini-courses, become more familiar with Pardot basics, or attend bootcamps.

Did you know there are actually two versions of the Pardot to Salesforce connector? If you purchased your Pardot account after February 2019, you’ve likely always had the newer V2 Connector, however, if you purchased before February 2019 and haven’t upgraded, you will still be on the V1 Connector.

Pardot released a path to upgrade from V1 to V2 in the 2020 Summer release, but I’ve found that a lot of Pardot admins are still hesitant to upgrade. In this post I’ll cover all the considerations and options you have when upgrading your connector and help you squash those “this upgrade is irreversible” anxieties. 

If you don’t know which connector version your Pardot instance is currently using, follow these steps to check.

Salesforce-Pardot Connector V1 vs V2: What’s the difference?

The V2 connector has improved security and instant metadata sync, but the feature that catches the attention of most day to day admins is you can pause the sync! Gone are the days where you have to disconnect the Salesforce connector completely and then fear something will go wrong when you try to connect it again. Now you have a simple “Pause” and “Resume” button to use to your heart’s content. Wait, am I the only one who got super anxious about disconnecting the Salesforce connector? Ok fine, moving on…

With the V2 Connector you also have the option to use the B2BMA Integration user instead of a connector user. This is fantastic because

  • The B2BMA Integration user does not require a paid Salesforce license
  • Since no one can log into Salesforce as the B2BMA Integration User you can give this user all the access and permissions Pardot needs 

Connecting via the integration user also gives you access to Marketing Data Sharing, which allows you to get more granular about which records are eligible to sync from Salesforce to Pardot. 

Finally, for multiple Pardot Business Units, the V2 connector gives you access to the Business Unit Switcher which allows you to seamlessly switch between Pardot Business Units without needing a unique login to each unit. 

Considerations for the Salesforce-Pardot V2 Connector

  • Upgrading to the V2 Connector is irreversible! I know, “irreversible” is not my favorite word when it comes to new features, but take a deep breath, change is good.
  • You can’t change the Salesforce instance that your Pardot account is connected to after the upgrade. If you are thinking about moving Salesforce instances or creating a new Salesforce instance in the near future, do not upgrade.
  • If you continue to use the existing connector user rather than the B2B Integration User, make sure your connector user has access to the Pardot_to_SF_Integration_Secure_Connected_App connected app before you upgrade.
  • If you need to restrict which records are eligible to sync from Salesforce to Pardot and do not have access to Marketing Data Sharing, stick to using a connector user with the V2 Connector.
  • The V2 Connector will be created in a paused state, so don’t forget to resume the connection after the upgrade!

How to Upgrade to the Salesforce-Pardot V2 Connector

If you’re ready to upgrade to the V2 Connector, you can either dive in by upgrading and moving to the integration user at the same time, or you can take a more gradual approach in order to upgrade and then later move to the integration user.

To dive in:

  1. Open your connectors in Pardot
    1. Classic: Admin > Connectors
    2. Lightning: Pardot Settings > Connectors
  2. Select the Action Wheel next to your Salesforce Connector and click Upgrade
  1. Select the “I have read the documentation. I understand how the upgrade changes my account, and I understand that this change is permanent” checkbox and select Next
  2. Next, select the Integration User and select Choose User
  1. Your upgrade will likely take 10-15 minutes to complete. The connector will be created in a paused state, so make sure you resume the connection!

If you’d prefer a more gradual approach:

  1. Ensure your connector user has access to the Pardot_to_SF_Integration_Secure_Connected_App connected app in Salesforce
  2. Follow the steps above, but choose “Current connector user” when you are at step 4

When you are ready to move from the Connector User to the Integration User later:

  1. Open your connectors in Pardot
    • Classic: Admin > Connectors
    • Lightning: Pardot Settings > Connectors
  2. Select the Action Wheel next to your Salesforce Connector and click Pause Sync
  3. Select the Action Wheel again and click Edit Settings
  4. Enter the B2BMA integration username in the connector user box and click “Change Trusted Connection User”.
    • The B2BMA Integration username is unique for each Salesforce instance so make sure you grab the correct username from your Salesforce users table.
  5. Resume the connector

Conclusion

And easy-peasy-lemon-squeezy, your Salesforce-Pardot connector is upgraded to the V2 Connector. Hopefully this post has squashed your “this upgrade is irreversible” anxieties and you are ready to take steps to the upgrade. If you still have questions or concerns after reviewing all the considerations and options for upgrading to the V2 connector, leave a comment below and we can help you through it.

The Pardot User-Migration deadline is fast approaching. There is a lot of guidance on setting up our human users for success, but what about our code? Currently, there is a lack of specifics available on how to make changes to custom code & scripts that talk to the Pardot API. So we wrote this guide specifically for connecting Pardot API from APEX. 

Also see Part 3B: Connecting to Pardot API from Custom Code.

We’ve come across our fair share of APEX code written in Salesforce that works with the Pardot API, and in the past it was fairly simple to set up. Just get the username, password and API key of the Pardot User, copy some APEX code examples and you were ready to go.  Now that we need to authenticate through Salesforce SSO, we’ve taken the time to detail out what you need to set up. Hang on, as there’s a lot to do.

In summary we will:

  1. Create a new User for this integration
  2. Create a Salesforce Self-Signed Certificate
  3. Create a Connected App, allowing our User to be pre-authorized
  4. Create a Named Credential
  5. Write some Basic APEX that demonstrates this all working

Step 1: Create a new user

It is our recommended advice that each integration has its own user. For this Pardot integration, a Salesforce User (with an Identity License profile) linked to a Pardot SSO User should be sufficient.

In Salesforce, create a new user, commonly using the Identity Profile.

  1. In Salesforce Lightning, Navigate to Setup
  2. Navigate to Users under Administration > Users, click on New User
  3. Use the following values (or use whatever makes sense for you)
    • First Name: Pardot
    • Last Name: APEX
    • Alias: pdotapex
    • Email: use an email address you have access to
    • Username: create a username that uniquely identifies this integration
    • User License: Identity
  4. When complete, the section should look like this
  5. Using the Salesforce activation email, be sure to login, which will ask you to set a password and recovery options. Save this info somewhere.
  6. If you are using User Sync, complete one more step: in Salesforce Setup navigate to Pardot Setup > Account Setup > Manage Users. Edit User Assignments and make sure your new user is Selected (or is added as a member of a selected group or role).

In Pardot, create a new user (skip step 1 if you are not using User Sync): 

  1. If you are using User Sync, update the profile and role mapping to make sure the Salesforce profile (e.g. Identity User) is mapped to a Pardot Role that matches the abilities you want your API integration to have.
  2. Navigate to the Users page in Pardot by navigating to Admin (Pardot Settings in the Lightning app), and then User Management | Users.
  3. Click the +Add User button and complete the required information, using the same values (where possible) that you used when creating the Salesforce User
  4. In the CRM Username dropdown menu, select the new API integration User you created in Salesforce.
  5. When complete, the section should look like this
  6. After saving the new User record, click the “Enable Salesforce single sign-on” link. (If you have already enabled User Sync for this user/profile, this will be completed automatically.)

A Permission Set is what will enable our User to connect via the Connected App without needing to manually authorize it.

  1. In Salesforce Lightning, Navigate to Setup
  2. Navigate to Permission Sets under Administration > Users, click on New
  3. Use the following values (or use whatever makes sense for you)
    • Label: Pardot API Access
    • API Name: let it auto populate
    • Description: Grants access to Pardot via API. No permissions specified
    • Click Save
  4. Add the new Permission Set to the User created/chosen above
    • When viewing the Permission Set, click Manage Assignments
    • Click Add Assignments, and select the correct User

Step 2: Create a Salesforce Self-Signed Certificate

Certificates are actually composed of 2 pieces: a private key (often called just a key) and a public key (often called just a cert/certificate). For our purposes, the private key is used to “prove” that it is actually your code that is trying to login, and is the reason that passwords and security tokens are not required. For our purposes, the public key is used to verify that the correct (authorized) process is trying to access Salesforce.

  1. In Salesforce Lightning, Navigate to Setup
  2. Navigate to Certificate and Key Management under Security, click Create Self-Signed Certificate
  3. Use the following values (or use whatever makes sense for you)
    • Label: Pardot Integration Certificate
    • Unique Name: let it auto populate
    • Key Size: Leave it as the default value
  4. When complete, the section should look like this:
  5. Save the Certificate
  6. Once saved, click the Download Certificate button, as  you will need it when setting up the Connected App later on.

It is important to note that this certificate is only going to be valid for 1 year. You can create a longer-lived certificate, but you will have to import it from a Keystore and we will leave that for another blog post.

Step 3: Create the Connected App

A Salesforce Connected App is how you enable external code / systems access to use the Salesforce API.  Now it may seem a little weird as your APEX is already inside Salesforce, however the Authentication methods work the same way.

  1. In Salesforce Lightning, Navigate to Setup
  2. Navigate to App Manager under Platform Tools > Apps, click on New Connected App
  3. Use the following values for Basic Information
    • Connected App Name: APEX Access to Pardot
    • API Name: (let it auto populate, or make up your own name)
    • Contact Email: use a company email address
    • Description: Grants access to Pardot from our APEX
    • When complete, the section should look like this:
  4. Use the following values for API (Enable OAuth Settings)
    • Enable OAuth Settings: Checked
    • Callback URL: https://login.salesforce.com/services/oauth2/callback
    • Use digital signatures: Checked
    • Browse: Use the certificate you downloaded earlier
    • Selected OAuth Scopes:
      1. pardot_api (allows you to actually call the Pardot API
      2. offline_access (allows your code to make API calls when it needs to)
    • When complete, the section should look like this:
  5. Save the new Connected App, click Continue after observing the warning
  6. From the Saved Record screen, take special note of the Consumer Key, you will need to use it in your APEX

Preauthorize user to use Pardot API

Regardless of how the Connected App was set up (above), we need to pre-authorize the correct user to use the Pardot API.

  1. In Salesforce Lightning, Navigate to Setup
  2. Navigate to App Manager under Platform Tools > Apps, find the APEX Access to Pardot app, click the drop down menu and then Manage
  3. Click Edit Policies
  4. Under OAuth Policies > Permitted Users, change to: Admin approved users are pre-authorized, Save
  5. Back at the Connected App, new sections have appeared. In Permission Sets, click Manage Permission Sets
  6. Assign the Pardot API Access permission set

Step 4: Create a Named Credential

The Named Credential is what allows your APEX code to login and be able to actually use the Pardot API.

  1. In Salesforce Lightning, Navigate to Setup
  2. Navigate to Named Credentials under Security, click New Legacy Named Credential (use the dropdown next to the New button)
  3. Use the following values
    • Label: APEX Pardot Credential
    • Name: (let it auto populate, or make your own name)
    • URL: https://pi.pardot.com/api (adjust if https://pi.demo.pardot.com/api)
    • Certificate: leave this blank, this is used for 2-way SSL connections
    • Identity Type: Named Principal
    • Authentication Protocol: JWT Token Exchange
    • Token Endpoint URL: https://login.salesforce.com/services/oauth2/token (adjust if test.salesforce.com)
    • Issuer: OAuth Consumer Key that you created earlier
    • Named Principal Subject: The username of the User you want to use (from the first steps of this post)
    • Audiences: https://login.salesforce.com (adjust if required)
    • Token Valid for: 30 Seconds
    • JWT Signing Certificate: Pardot Integration Certificate
    • Callout Options: leave all these at their default settings.
  4. When complete, this section should look like this
  5. Save

Sample working APEX

The following APEX code can be called to demonstrate a working solution.

public class PardotTesting {
    public static void tryItOut() {
        HttpRequest req = new HttpRequest();
        req.setEndpoint('callout:APEX_Pardot_Credential/account/version/4/do/read?format=json');
        req.setHeader('Pardot-Business-Unit-Id', '0Uv4W0000000056SAA');
        req.setMethod('GET');
        Http http = new Http();
        HTTPResponse res = http.send(req);
        //Ideally you would parse the JSON response and work with it
        System.debug(res.getBody());
    }
}

Key things to note: Setting the Request’s Endpoint, the Name of the Named Credential is used in the String. Following the Named Credential is the rest of the Pardot API endpoint you want to hit.

Conclusion 

Following the above steps will get your code ready for SSO in preparation for the February 15th deadline. Have some additional insights? We would love for you to  share your experiences and tips as you work through getting your code ready for SSO. Stuck and need help – let us know and we would be glad to help audit your unique instance needs. 

Learn more

Pardot API and Getting Ready with Salesforce SSO Users Series: 

The Salesforce SSO deadline is fast approaching, and there isn’t a lot of specifics out there on how to make changes to our custom code & scripts that talk to the Pardot API. There is a lot of guidance on setting up our human users for success, but what about our code? So we wrote this guide specifically for connecting Pardot API from Custom Code. 

Also See Part 3A: Connecting to Pardot API from APEX

We’ve come across our fair share of custom code that works with the Pardot API, and in the past it was really easy to set up. Just get the username, password, and API key of the Pardot User, copy some code examples and you were ready to go.  Now that we need to authenticate through Salesforce SSO, we’ve got the details here on what you need to set up. Hang on, as there’s a lot to do. In summary, we will:

  1. Create a new user for this integration
  2. Create a Self Signed Certificate
  3. Create a Connected App, allowing our User to be pre-authorized
  4. Run some custom code, with examples in different languages

Create a new user

It is our recommended advice that each integration has its own user. For this Pardot integration, a User with an Identity License profile should be sufficient.

In Salesforce, create a new user, possibly using the Identity Profile.

  1. In Salesforce Lightning, Navigate to Setup
  2. Navigate to Users under Administration > Users, click on New User
  3. Use the following values (or use whatever makes sense for you)
    • First Name: Pardot
    • Last Name: Python
    • Alias: pypardot
    • Email: use an email address you have access to
    • Username: create a username that uniquely identifies this integration
    • User License: Identity
  4. When complete, the section should look like this
  5. Using the Salesforce activation email, be sure to login which asks you to set a password and recovery options. Save this info somewhere.
  6. If you are using User Sync, complete one more step: in Salesforce Setup navigate to Pardot Setup > Account Setup > Manage Users. Edit User Assignments and make sure your new user is Selected (or is added as a member of a selected group or role).

In Pardot, create a new user (skip step 1 if you are not using User Sync): 

  1. If you are using User Sync, update the profile and role mapping to make sure the Salesforce profile (e.g. Identity User) is mapped to a Pardot Role that matches the abilities you want your API integration to have.
  2. Navigate to the Users page in Pardot by navigating to Admin (Pardot Settings in the Lightning app), and then User Management | Users.
  3. Click the +Add User button and complete the required information, using the same values (where possible) that you used when creating the Salesforce User
  4. In the CRM Username dropdown menu, select the new API integration User you created in Salesforce.
  5. When complete, the section should look like this
  6. After saving the new User record, click the “Enable Salesforce single sign-on” link. (If you have already enabled User Sync for this user/profile, this will be completed automatically.)

A Permission Set is what will enable our User to connect via the Connected App without needing to manually authorize it.

  1. In Salesforce Lightning, Navigate to Setup
  2. Navigate to Permission Sets under Administration > Users, click on New
  3. Use the following values (or use whatever makes sense for you)
    • Label: Pardot API Access
    • API Name: let it auto populate
    • Description: Grants access to Pardot via API. No permissions specified
    • Click Save
  4. Add the new Permission Set to the User created/chosen above
    • When viewing the Permission Set, click Manage Assignments
    • Click Add Assignments, and select the correct User

Create a Self-Signed Certificate

Certificates are actually composed of 2 pieces:

  1. a private key (often called just a key)
  2. a public key (often called just a cert/certificate)

For our purposes, the private key is used to “prove” that it is actually your code that is trying to login, and is the reason that passwords and security tokens are not required. For our purposes, the public key is used to verify that the correct (authorized) process is trying to access Salesforce.

For our example, we will use a Command Line Interface app called openssl to generate our certificate.

  1. Make sure you have openssl installed
  2. Open a Terminal / Command Prompt
  3. Issue the following command:
    openssl req -x509 -sha256 -nodes -days 36500 -newkey rsa:2048 -keyout mycoolcert.key -out mycoolcert.crt
    • You will be prompted to provide some information. These are all optional, though it is not a bad idea to fill it out, especially since Salesforce will show the info when you look at the Connected App later on
    • What this command does, is create a 100 year certificate with the Private Key being stored in the .key file, and the Public Key being stored in the .crt file. Both of these files are text files that you can view with any text editor.
    • You will want to protect the .key file, as it is very uniquely created for YOU. This .key file will be used by your code as part of the authentication process.
    • The .crt file will be used when creating the Connected App

Create the connected app

A Salesforce Connected App is how you enable external code / systems access to use the Salesforce API.  

  1. In Salesforce Lightning, Navigate to Setup
  2. Navigate to App Manager under Platform Tools > Apps, click on New Connected App
  3. Use the following values for Basic Information
    • Connected App Name: Internal JWT Access to Pardot
    • API Name: (let it auto populate, or make up your own name)
    • Contact Email: use a company email address
    • Description: Grants access to Pardot from our own custom written solutions
    • When complete, the section should look like this:
  4. Use the following values for API (Enable OAuth Settings)
    • Enable OAuth Settings: Checked
    • Callback URL: https://login.salesforce.com/services/oauth2/callback
    • Use digital signatures: Checked
    • Browse: Use the certificate you created earlier
    • Selected OAuth Scopes:
      1. pardot_api (allows you to actually call the Pardot API
      2. offline_access (allows your code to make API calls when it needs to)
    • When complete, the section should look like this:
  5. Save the new Connected App, click Continue after observing the warning
  6. From the Saved Record screen, take special note of the Consumer Key, you will need to use it in your code later on

Preauthorize user to use Pardot API

Regardless of how the Connected App was set up (above), we need to pre authorize the correct user to use the Pardot API.

  1. In Salesforce Lightning, Navigate to Setup
  2. Navigate to App Manager under Platform Tools > Apps, find the Internal JWT Access to Pardot app (that you just created moments ago), click the drop-down menu and then Manage
  3. Click Edit Policies
  4. Under OAuth Policies > Permitted Users, change to: Admin approved users are pre-authorized, Save
  5. Back at the Connected App, new sections have appeared. In Permission Sets, click Manage Permission Sets
  6. Assign the Pardot API Access permission set

Sample working code

Here we aim to provide a few different samples of working code. Note: because these are samples, we are following some Minimal, Reproducible Example guidelines. These should help you understand how to incorporate the approach into your well-architected code projects.

Python sample code

This sample code was extended from a great GitHub Gist from booleangate. Save it locally as pythonExample.py

#!/usr/bin/env python3
# pip install jwt cryptography requests

from datetime import datetime
import jwt, time, requests

# *** Update these values to match your configuration ***
IS_SANDBOX = False
KEY_FILE = ‘mycoolcert.key’
ISSUER = ‘YOUR_OAUTH_CONSUMER_KEY’
SUBJECT = ‘YOUR_SALESFORCE_IDENTITY_USERNAME’
BUSINESS_UNIT_ID = ‘0Uv…..’
pardotUrl = ‘https://pi.demo.pardot.com/api/account/version/4/do/read?format=json’
# *******************************************************

DOMAIN = ‘test’ if IS_SANDBOX else ‘login’

print(‘Loading private key…’)
with open(KEY_FILE) as fd:
    private_key = fd.read()

print(‘Generating signed JWT assertion…’)
claim = {
    ‘iss’: ISSUER,
    ‘exp’: int(time.time()) + 604800,
    ‘aud’: ‘https://{}.salesforce.com’.format(DOMAIN),
    ‘sub’: SUBJECT,
}
assertion = jwt.encode(claim, private_key, algorithm=’RS256′, headers={‘alg’:’RS256′}).decode(‘utf8’)

#you could take the JWT and paste it in https://jwt.io to see what it ends up looking like
print(‘assertion=%s’ % assertion)
print(‘Making OAuth request…’)
loginResponse = requests.post(‘https://{}.salesforce.com/services/oauth2/token’.format(DOMAIN), data = {
    ‘grant_type’: ‘urn:ietf:params:oauth:grant-type:jwt-bearer’,
    ‘assertion’: assertion,
})

print(‘Status:’, loginResponse.status_code)
print(loginResponse.json())
accessToken = loginResponse.json().get(‘access_token’)

# Now for doing the Pardot Fun Stuff
pReqHeaders = {
    ‘Authorization’: ‘Bearer ‘+ accessToken,
    ‘Pardot-Business-Unit-Id’: BUSINESS_UNIT_ID
}

print(‘Making Pardot Account API request…’)
accountResponse = requests.get(url=pardotUrl, headers=pReqHeaders).json()
print(accountResponse)

Some tips to get this code working for you:

  1. Be sure to put the Private Key file from your self-signed certificate in the same directory as this code sample
  2. Be sure to replace the configuration values at the top of the script to match what you created
  3. Add print() statements where you want to further understand values that are being setup
  4. Make the code file executable, then just call it directly:  ./pythonExample.py and watch the output

Conclusion 

Following the above steps will get your code ready for SSO in preparation for the February 15th deadline. Have some additional insights? We would love for you to  share your experiences and tips as you work through getting your code ready for SSO. Stuck and need help – let us know and we would be glad to help audit your unique instance needs. 

Learn more

Pardot API and Getting Ready with Salesforce SSO Users Series: 

No more posts to show