Implementing Pardot External Activities Natively in Salesforce

Pardot is delivering a whole new way to leverage your prospect data in the Salesforce Winter ‘22 release. Our earlier blog post covers this new feature and how to set up the Pardot External Activity in Salesforce so any third-party service can begin sending these activities to Pardot via API. This post explains what third-party services need to do to send these activities to Salesforce using Salesforce declarative solutions (Flow/Process builder). 

At a high level, we need to:

  • Configure Salesforce to allow our solution to call the Pardot API
  • Implement Salesforce APEX code to handle the Pardot API request
  • Add an action to a Flow to make use of our new code
  • Test

This solution is a little more technical than our post on Zapier. Once you are done, you will end up with a Flow like this:

Start Record-triggered flow

Configure Salesforce

Any time we want to work with the Pardot API, we need to “authenticate” with Salesforce in order to get an Access Token. 

First, follow the steps in our earlier blog post Connecting to Pardot API from APEX. By the end, you should have:

  • A brand new Connected App (to avoid issues, don’t re-use previously created Connected Apps unless they were created using the instructions above) 
  • Named Credential for connecting to the API 

Salesforce APEX code

To build this capability, we need to create an @InvocableMethod so that our Salesforce declarative automations can see it and call it to do our bidding.As with any code solution, there are a variety of ways that we can tackle this. The code sample below will work for readers with one Pardot Business Unit. The original code file (and APEX Tests) can be found in our GitHub repository: export-activities-sfdx

public with sharing class PardotExternalActivityPublisher {
    public static final Integer HTTP_REQUESTS_PER_BATCH = 50;
    public static final String ONLY_ONE_BUSINESS_UNIT_ID = '0UvB00000004000AAA';
    public static final String NAMED_CREDENTIAL = 'APEX_Pardot_Credential';

    public class ExternalActivity {
        // @InvocableVariable(label='Business Unit Id')
        // public String businessUnitId;
        @InvocableVariable(label='Extension' required=true)
        public String extension;
        @InvocableVariable(label='Type' required=true)
        public String type;
        @InvocableVariable(label='Value' required=true)
        public String value;
        @InvocableVariable(label='Prospect Email' required=true)
        public String email;
    }

    @InvocableMethod(label='Send Activity to Pardot')
    public static void sendActivityToPardot(List<ExternalActivity> activities) {
        //Very quickly pass this request into the ASYNC Queue, eliminating delays for Users
        System.enqueueJob(new QueueablePardotCall(activities));
    }

    /**
     * Handles Asynchronously firing each Activity to Pardot
     */
    public class QueueablePardotCall implements System.Queueable, Database.AllowsCallouts {
        private List<ExternalActivity> activities;

        public QueueablePardotCall(List<ExternalActivity> activities) {
            this.activities = activities;
        }

        public void execute(System.QueueableContext ctx) {
            //depending on how many Activities we are processing, 
            //we might hit the APEX limit of 100 Web Callouts
            List<ExternalActivity> remainingActivities = new List<ExternalActivity>();
            Integer processedCount = 0;

            for(ExternalActivity activity : activities) {
                if(processedCount < HTTP_REQUESTS_PER_BATCH ) {
                    HttpRequest req = new HttpRequest();
                    req.setHeader('Pardot-Business-Unit-Id', ONLY_ONE_BUSINESS_UNIT_ID);
                    req.setHeader('Content-Type', 'application/json');
                    // req.setHeader('Pardot-Business-Unit-Id', activity.businessUnitId);
                    // activity.businessUnitId=null;

                    req.setEndpoint('callout:'+NAMED_CREDENTIAL+'/v5/external-activities');
                    req.setMethod('POST');
                    String body = System.JSON.serialize(activity, true);
                    System.debug('Submitting: ' + body);
                    req.setBody(body);
                    Http http = new Http();
                    try {
                        http.send(req);
                    }
                    catch(Exception e) {
                        //we fire it off and don't do anything if there's an error
                        //probably not the best approach for Production, though it will
                        //be up to you how to handle it
                        System.debug('There was an error submitting the External activity');
                        System.debug('Message: ' + e.getMessage() + '\n' +
                                        'Cause: ' + e.getCause() + '\n' +
                                        'Stack trace: ' + e.getStackTraceString());
                    }
                    processedCount++;
                }
                else {
                    //we will process this in the next batch of Payloads
                    remainingActivities.add(activity);
                }
            }
            if(!remainingActivities.isEmpty()) {
                System.enqueueJob(new QueueablePardotCall (remainingActivities));
            }
        }
    }
}

To use this code, make sure you replace the Business Unit ID at the top of the code with your Business unit ID (to find this, navigate to Salesforce Setup > Pardot Account Setup).

For readers with multiple Pardot Business Units, remove the constant ONLY_ONE_BUSINESS_UNIT_ID and then uncomment the businessUnit lines throughout. You will need to either specify the Business Unit ID in your Flow, or you could write additional APEX to iterate through your Pardot Business Units by working with the PardotTenant object in Salesforce.

You might also want to specify how you want to handle any exceptions you get from making the Pardot API call. In our example, we simply write exceptions to the debug log.

Our APEX code does assume that the Contact has synced over to Pardot already. If you can’t make this assumption, you may consider calling a Pardot Form Handler to make sure that the prospect is in Pardot already. We have an APEX example for that too (which follows a very similar pattern, so it should be easy to merge them).

Adding an Action to a Flow

Once the APEX has been deployed, you will now be able to use it declaratively.

In our example, we have a Zoom Webinar Member (which is a Junction Object between a Zoom Webinar and a Contact).

To set this up in a Flow:

  1. Navigate to Setup > Flows
  2. Select “New Flow” or edit an existing Flow
  3. Select the + symbol to add a new Element, select “Action”
  4. In the “Search all actions” window, locate “Send Activity to Pardot”
  5. Provide a meaningful Label and Description
  6. Set your input values
    1. Extension: Enter the name of the Marketing App Extension you created in Salesforce
    2. Prospect Email: Source the email from one of the fields/variables in your flow
    3. Type: Enter one of the activities you set up and associated with your Marketing App Extension in Salesforce
    4. Value: Enter (or source from a field/variable) the unique value to identify this Activity, event IDs work great here
  7. Click “Done”
Send activity to pardot

Test

Once all elements of your Flow are ready, testing can begin. Activate your Flow and perform the action you are using to trigger the Flow. After a couple of moments, check the Pardot prospect you are testing with, and you should now see all the information you passed through.

prospect activities

Testing is a little bit tricky, for two reasons:

  1. We are executing this functionality asynchronously, meaning a problem won’t show up in Salesforce like you are used to seeing. Debug logs will be your friend here. But don’t worry, there isn’t too much to sort through.
  2. If the Named Credential or anything else isn’t quite set up right (from step 1), Salesforce and debug logs aren’t very helpful in troubleshooting. You will have to painstakingly go through the instructions again to make sure that nothing was missed / done incorrectly.

Considerations

  • The Export Activity API call only works for known prospects, and it will not work if the email address is not already associated with a prospect in your Pardot Business Unit (this is why we have the form handler in our example).
  • If you have multiple Pardot Business Units, there is no intelligence of “choosing the right one.” You need to target the right one with your APEX solution, which assumes all prospects going through this code are from the same Pardot Business Unit. As we mentioned in the APEX section, you have the flexibility to code whatever you need to handle your business case. 

 For assistance with this or other Pardot External Activities, reach out to Sercante!

The post Implementing Pardot External Activities Natively in Salesforce appeared first on The Spot For Pardot.

How to Implement Pardot External Activities with Zapier

Pardot is delivering a whole new way to leverage your prospect data in the Winter ‘22 release. Similar to webhooks, the new Pardot External Activities feature allows users to receive data from third-party systems and use the data in automations and Engagement Studio Programs. For instance, you could record when a prospect registers for a webinar, completes a survey, or watches a video.

In an earlier blog post, we describe how to set up the External Activity in Salesforce so a third party can begin sending activities to Pardot via API. This post will detail how to actually send the activities with Zapier. Similar approaches can be done with other meta-services. If you want hands-on help, we’d love to work with you.

Pardot External Activities Zapier Solution

Before we get started, it is important to note that Zapier doesn’t actually support this Pardot API request. Zapier only supports four of the many API requests possible, so we will be taking advantage of the Zapier Webhook capability to build our solution.

At a high level, we need to:

  • Configure Salesforce to allow our Zap to make API requests to Salesforce and Pardot
  • Create a new Zap which listens for a third-party event (such as registering for a Webinar)
  • Enhance the Zap to submit prospect information to a Pardot Form Handler
  • Enhance the Zap to get an OAuth token from Salesforce
  • Enhance the Zap to publish the External Activity (which works well as the Form Handler has ensured the Prospect exists already)
  • Test

Now I realize this is a lot, but don’t worry, we’ll walk through it all. Once you are done building this Zap, you’ll end up with something like this:

Configure the Salesforce Connected App

Anytime we want to work with the Pardot API, we first need to “authenticate” with Salesforce to receive an Access Token that can be used with the Pardot API. To do so, create a new Salesforce Connected App for Zapier. We highly recommend creating and testing this new Connected App by following the steps in our earlier blog post, Pardot API and Getting Ready with Salesforce SSO Users.

Once you have created your new Connected App, you should have a new Salesforce and Pardot User for the Zapier connection. Keep the user’s username, password, and security token handy for later.

In our example, we will be creating a Zap for a Zoom Webinar Registration. Due to the way Zoom Webinars are integrated with Zapier, you will need to create a Zap for each webinar, as well as creating automations in Pardot for each webinar. This may vary depending on which App you are using in Zapier.

Create a new Zap in Zapier

  1. Log in to your Zapier Account
  2. Create a new Zap and give it a name
  3. Find the third-party app that will trigger this Zap. For our example, we’ve chosen Zoom.
  4. Select your Trigger event. For our example, we have chosen “New Registrant”.
  5. Choose the Zoom account for your connection. If you haven’t already connected the app, now will be your chance!
  6. Next, (and this might differ based on your app), select the upcoming webinar you wish to integrate.
  7. Click “Test trigger”
    1. This often works best if you have a recent “event.” For Zoom webinars, it helps if you have at least 1 person who has already registered for the webinar via the Zoom registration page. In doing so, you will see sample fields and values, making the process a bit easier. 
  8. Finally, click “Continue” and you should have a nice clean “trigger.” Zapier will prompt you to make your first Action.

Enhance Zap to submit the Pardot Form Handler

Zapier now has a handle on prospects registering for the selected webinar, now we need to send this information to Pardot. 

In this first Action, we are going to send details about the person who registered for the Zoom webinar to a Pardot Form Handler. This allows us to create/update a Pardot prospect with the right field values.

Why are we using a Form Handler instead of API calls? 

  1. This approach greatly simplifies the integration by natively handling new prospect creation.
    1. Reduces sync errors for new prospects who have not interacted with a Pardot form yet
    2. More cost effective and efficient than using the Read API to create new prospects
    3. Ensures duplicates are not accidentally created
  2. The action that the person took will actually show up as Prospect Activity. This is good since they took real action and submitted a form.
  3. You can apply Completion Actions, which are not available in the API.

Make sure you have the Pardot Form Handler created and that you have the field names and the https URL handy.

  1. Continuing from the previous section, create a new Webhook Action by selecting “Webhooks by Zapier.”
    1. This step is important to establish who is registering and to make sure we associate the External Activity with a prospect. 
  1. For the Action Event, choose POST.
  2. Set up the action by filling in the following fields:
    1. URL: The https URL of your Pardot Form Handler
    2. Payload Type: form
    3. Data: Enter the Pardot Form Handler field name, and the values coming from the trigger setup earlier. Add new “rows” for each field you wish to populate in the Pardot Form Handler based on your trigger data available.
  3. Once you have finished setting up the Action, test the action, check that the Pardot Form Handler was called, and verify that the data is where it should be.
  4. Rename the Action to “Send Registration Info to Form Handler” so that it’s clear what this Action is accomplishing. 

Enhance Zap to get OAuth token from Salesforce

Now things start to get a bit tricky. Since we can’t leverage the Pardot app in Zapier, we need to do things manually. This is where we will use the Salesforce and Pardot User we set up with the Connected app in the first section.

  1. Create a new Webhook Action by selecting “Webhooks by Zapier”
  2. For the Action Event, choose POST
  3. Set up the action by filling in the fields:
    1. URL: https://login.salesforce.com/services/oauth2/token
    2. Payload Type: form
    3. Data -> grant_type: password
    4. Data -> client_id: Enter the Consumer Key from your Connected App
    5. Data -> client_secret: Enter the Consumer Secret from your Connected App
    6. Data -> username: Enter the Salesforce Username of the Pardot user we will use for API calls
    7. Data -> password:  Enter your Salesforce user’s password followed by the Security Token
  4. Once you’ve provided all the values above, Test and Review. A successful request should show values like access_token and instance_url for your Salesforce org.
  5. Rename this Action to “Get Salesforce OAuth Token” so that it’s clear what this Action is accomplishing. 

Enhance Zap to publish Pardot External Activity

Finally, we will send the External Activity to Pardot

  1. Create a new Webhook Action by selecting “Webhooks by Zapier”
  2. For the Action Event, choose POST
  3. Set up the action by filling in the fields:
    1. URL: https://pi.pardot.com/api/v5/external-activities
    2. Payload Type: json
    3. Data -> extension: Enter the name of the Marketing App Extension you created in Salesforce
    4. Data -> type: Enter one of the Activities you set up and associated with your Marketing App Extension in Salesforce
    5. Data -> value: Enter a unique value to identify this Activity, event IDs work great here
    6. Data -> email: Enter the email address that was used in step 3 of the “Enhance Zap to submit the Pardot Form Handler” section
    7. Headers -> Authorization: This one is a bit tricky to fill out. First, when you click in the text box, type “Bearer “ (with the space) and then select the Access Token.
    8. Headers -> Pardot-Business-Unit-Id: Enter the ID of the Pardot Business Unit that is associated with the Marketing App Extension. You can find the Pardot Business Unit ID by navigating to Salesforce Setup >Pardot Account Setup. (Detailed instructions here).
  4. Once you’ve provided all the values above, Test and Review. Check the Pardot Prospect for the new Activity record. This activity will appear between the Prospect Activities and Custom Fields section of the prospect page.
  1. Rename this Action to “Send External Activity” so that it’s clear what this Action is accomplishing. 

Test

Now it’s time to test our Zap end-to-end. 

Activate your Zap and perform the action that you are capturing in the Zap’s Trigger (i.e. register for the Zoom webinar). After a couple of moments, check the Pardot prospect that you are testing with. You should now see all the information you passed through the Zap!

Considerations

  • The Export Activity API call only works for known prospects, and it will not work if the email address is not already associated with a prospect in your Pardot Business Unit. This is why we have the form handler in our example.
  • If you have multiple Pardot Business Units, there is no intelligence of “choosing the right one.” You need to target the right one with your Zap, which assumes all prospects going through this trigger are from the same Business Unit. Proceed with caution and test rigorously when attempting more advanced solutions with business units.
  • Salesforce only allows five access tokens to be issued at a time. With high volumes of a triggering event, it is possible that Zaps may fail due to Salesforce Access tokens getting recycled before they can be used in the following actions (this is due to us manually getting an Access Token with the second Action).
  • Any time the user’s password and/or security token changes in Salesforce, each ZAP that uses it will also need to be updated.

These considerations are best addressed by writing your own code, which can properly address the edge cases, etc. For assistance with this or other Pardot External Activities, reach out to Sercante!

The post How to Implement Pardot External Activities with Zapier appeared first on The Spot For Pardot.

By |2021-10-15T18:27:46+00:00October 15th, 2021|Categories: Data Management, Integration, Pardot Business Units, Release Notes, Salesforce|

Pardot External Activity: What it is and how to use it

Pardot is delivering a whole new way to leverage your prospect data in the Salesforce Winter ‘22 release. Similar to webhooks, the new Pardot External Activities feature allows users to receive data from third-party systems and use the data in automations and Engagement Studio Programs. For instance, you could record when a prospect registers for a webinar, completes a survey, or watches a video, and then trigger automations from those actions.

Pardot external activities

There are 3 main steps we will be guiding you through in this post. 

  1. Register the Pardot External Activity types in Salesforce
  2. Integrate third-party systems with Pardot External Activity (we use the API here)
  3. Leverage the new External Activities inside Pardot

To use External Activities, you must have a Plus, Advanced, or Premium Pardot Account and be using the Pardot Lightning App (remember, the Pardot Classic app is being retired).

Register the External Activity types in Salesforce

Similar to how a Salesforce Custom Object needs to be defined before you can start creating records, we need to set up an Extension and the Extension’s Types before we can record External Activity on Prospect records. A Salesforce Administrator or a Marketing Setup Administrator will need to perform these steps. 

  1. Create a Marketing App Extension.
    1. Navigate to Setup > Marketing App Extensions.
    2. Select “New.”
marketing app extensions
  1. Name your new Extension.
  2. Select “Active in Automations.” This is what allows the extension to show up within Pardot.
  3. Select “Save.”
new marketing app extension
  1. Create an associated Activity.
    1. Select the “Related” tab.
    2. Select “New” next to Activity Types.
      • This will be an action your prospects perform, such as registering, attending, or being absent from a webinar.
      • Activity types cannot be shared across extensions, so make sure you create these activities for each extension!
      • Choose activity type names that make sense to your users.
new activity type
  1. Select “Active in Automations.”
  2. Select “Save.”
  3. Assign the extension to your Pardot Business Unit(s). 

You’ll need to perform this step even if you only have one Business Unit. Extensions can be assigned to multiple Business Units. 

  1. Within the Related tab, select “New” next to Business unit Assignments.
  2. Select the first Business Unit.
  3. Select “Save.”
  4. Repeat if you’re using multiple Business Units.
new business unit assignment

Before you build/set up this external activity, check to make sure the solution you are looking to integrate doesn’t have an existing solution built. They may handle this whole side of the process for you, or you may only need to assign the extension to your Pardot Business Unit(s).

Integrate third-party systems with Pardot External Activity

This step is where we’ll connect the third-party system that is collecting the prospect’s activities and extension we built above. This step will use the Pardot API and should be included in any vendor’s solution that supports External Activity. Given this is a brand new feature, odds are External Activity is not yet supported by existing integrations.

If it is not included, you should be able to glue things together yourself. Below are three guides that will help: 

Leveraging the new External Activities inside Pardot

Now that you’ve created an External Activity and have a solution to send the prospect’s activities to Pardot, “Prospect External Activity” will be available within Automations:

rules prospect external activity

And “External Activity” will be an available Trigger in Engagement Studio:

trigger external activity

The value for the External Activity refers to the individual event, webinar, etc. These values will change for each activity and will NOT be pre-populated, so you’ll want to ensure your users know the exact values to look for when using the External Activities in Pardot. You can use the semicolon operator for a list of values.

rule match all

Keep in mind

External Activities do not update the prospect’s last activity time stamp. That means external activities will not trigger a sync between SFDC and Pardot, and they should not be used to indicate the last time the prospect took an action.

rules match all

Finally, Automations will process External Activity data even if the external activity is inactive within Salesforce. So, if you deactivate an extension, you’ll want to review the Automations and Engagement Studio Programs that are using the External Activity. Consider using tags on your Pardot Automations to help you easily find and administer them.

Requirements

  • Plus, Advanced, or Premium editions of Pardot
  • Requires the Pardot Lightning App
  • Work with your Salesforce Admin or Marketing Setup Admin to configure this. 

External Activity helps Pardot customers send information to Pardot from external systems. While many things are possible with the Pardot API, this feature does not send information from Pardot to other systems. If this is a critical capability for your org, you can help impact the Pardot Roadmap by sharing your Product and feature ideas on the  Salesforce Idea Exchange

Want to keep learning about External Activity? Check out these two additional blog posts:

The post Pardot External Activity: What it is and how to use it appeared first on The Spot For Pardot.

By |2021-10-15T17:38:10+00:00October 15th, 2021|Categories: Campaigns, Data Management, Email Marketing, Integration, Pardot Business Units, Salesforce|

Everything Pardot Admins Should Know About Apple Privacy Updates

In September 2021, Apple privacy changes will start having a big impact on Pardot email marketing reporting metrics. Are you ready to pivot your reporting strategy in response to the changes?

Apple announced some big, new privacy changes in June, and that’s what sparked the changes in email marketing reporting metrics. These changes are included with the Apple software update to iOS 15, iPadOS 15, macOS Monterey, and iCloud.com. 

One of these changes, Apple Mail Privacy Protection, is getting lots of attention in the marketing operations community. That’s because of the expected impact to the email open rate metric — a key performance indicator for most marketers. However, there are multiple new changes coming with the iOS update every Pardot professional should be aware of. 

In this article, we’ll cover all three: 

  • Apple Mail Privacy Protection
  • iCloud Private Relay
  • Hide My Email

For each of these changes, we’ll share key features to be aware of plus how to get your org, team, and stakeholders ready. We know how hard these changes can be for your already-swamped team, so we’re here to help you through this. 

Respecting Apple User Privacy 

Before we get started, I want to point something out. These changes are a huge win from the perspective of Apple and their users. By using this new software version, users can decrease the amount of data companies are collecting about their behavior and interests. This gives them more control over what information they share and when. 

Our job as ethical marketing professionals is to do three things:

  1. Respect our users.
  2. Treat their data with integrity.
  3. Adapt to the ever-changing technology and regulatory landscape.

So, we’ll do our best to focus on the positive aspects of the changes by providing solutions to the challenges they present.

Apple Mail Privacy Protection

Marketers using Pardot set automations based on email opens because, typically, opening an email indicates that a prospect is interested in a product or service. But, the new Apple privacy changes will skew email open rates and make it more difficult to know when Apple users actually open an email.

Apple Mail Privacy Protection (MPP) has two key features: 

  1. Open tracking prevention
  2. IP protection

Essentially, Apple iOS 15 opens the email and downloads the content when an email hits a prospect’s inbox. This prevents accurate open tracking because all emails going to Apple devices will appear to be opened in reporting metrics. 

Apple also downloads the content through a series of proxy servers. This feature is obscuring the IP address of the email subscriber. As a result, Pardot can’t report on the user’s device and behavior accurately. 

How to adjust your marketing strategy

The first thing you need to do is answer the question, “What proportion of your database uses an Apple email client?” 

Here’s how to do that:

  • Review some of your recent email sends. 
    1. Go to Pardot Reports > List Emails > Email Clients (in Pardot Lightning)
  • Add up the percentages in the “Popularity” column. This will give you a ballpark estimate of the potential impact.

Is it 10%, 25%, or 50%+ of your audience? The greater the proportion of your audience using an Apple email client, the less reliable your email open rate metrics will be after the iOS 15 update.

Conversely, the non-Apple portion of your audience provides a reliable segment for email open stats and future testing (personalization, A/B, etc.)

Now that you understand the severity with which your data could be impacted, consider the following questions: 

  • Do you have any reports that include email open rate? 
  • Who views these reports? 
  • How can you proactively adjust these reports to decrease the importance of this metric? 
  • How can you communicate with your stakeholders so that they know that the open rate is no longer reliable?

Next, do a thorough review of your Pardot automations. This includes automation rules, engagement studio programs, completion actions, dynamic lists, scoring, etc. Do any of these run based on open rate? If so, develop a plan to leverage an alternative trigger like email click* or form submission.  

*I put a big asterisk next to “email click,” as this metric has been endangered for a while. Email clicks can be caused by spam filters, so be cautious when using email click as a trigger on your automations or as a key metric in your reporting. 

Ultimately, this change is a step in the right direction for marketing teams. There’s never been a better time to shift your focus from vanity metrics like open rate and click through rate to more meaningful campaign performance metrics like conversions and return on investment (ROI).

Apple iCloud Private Relay

The new iCloud Private Relay feature will be baked into iCloud. Launching as a “public beta,” this feature functions similar to a VPN, encrypting all traffic leaving a user’s device when browsing with Safari. Private Relay leverages data encryption and anonymous IP addresses that hide a user’s location and web browsing activity. 

By hiding your specific IP address, Private Relay inhibits websites from building a profile based on your activity across multiple websites and selling your data to advertisers and data brokers. 

This feature is limited to paid iCloud account users who browse with Safari and turn on the Private Relay feature. (All paid iCloud accounts will be automatically upgraded to iCloud+ as part of the update.)

iCloud Private Relay disconnects your IP address from your DNS request (website that you’re visiting), which is great news to those seeking ultimate privacy and not wanting their activity information to be sold to advertisers. Unfortunately, it also disconnects website tracking that Pardot users have in place. With temporary IP addresses assigned, website activity will be difficult to associate to a known prospect. 

This capability does not hide the prospect’s geography. That means you can still track prospect regions, and IP addresses can be identified as proxy servers.

Apple Hide My Email

Hide my email

The last change to know about is Hide My Email. This update allows iCloud subscribers to log into a website using a randomized email address that ties back to their iCloud account. 

If your company allows public users to generate accounts or offers free trials, you could encounter a scenario in which a user takes advantage of Hide My Email to acquire multiple free trials.  

Hide My Email is also another challenging feature for Pardot users. That’s because it is once again disconnecting essential data (a prospect’s real email address) from website activity tracking. 

This functionality will impact open rate statistics. That means you will have to shift to other metrics such as click-through rate. It will also affect marketers who use email open rates for retargeting, and those who use email open rate as a varying factor for dynamic content. So you’ll have to pivot those strategies if you’re currently using email open rates for retargeting or dynamic content variations.

Focus on Reporting Metrics that Matter Most 

It’s normal to fear what we don’t understand. And these new privacy changes may seem scary without knowing why they’re actually good news. 

All of these privacy changes will impact marketing as a whole, making it harder and harder to track email activity and then associate it with activity in other channels. It is also an opportunity for marketers to take a fresh look at current strategies and craft new ways to put prospects in control.

Here are suggestions to address the changes and adjust your marketing strategy:

  • Update your Email Preference Center to offer subscribers greater insight into the topics they already interact with and other topics that are available.
  • Seek ways to connect email clicks with omnichannel metrics that demonstrate customer engagement. This includes:
    1. Offline purchases
    2. Account activity
    3. Website visits
    4. Mobile app activity
    5. SMS engagement
  • Explore using link clicks, external activity such as webinar registrations, and other engagement signals instead of email opens as more accurate interest indicators.
  • Find ways to understand the sentiment of an email message, perhaps with a thumbs up/down action or NPS-type of question within an email.
  • Look for opportunities to link your marketing channels (email, website, social, etc.), and get the cross-connection data flowing.

iCloud Private Relay and Hide My Email — on top of third-party/first-party tracking cookie changes already afoot — necessitate creative thinking to make prospect activity connections that were once seamless.

Prospect Privacy is Paramount

These three Apple privacy changes are going to affect the way you currently work in Pardot. But that’s a good thing. Your prospects have more autonomy when interacting with your company through email and your website. All you have to do is adjust your strategy so you can focus on metrics that matter most rather than vanity ones.

Now that you’re better equipped to prepare for the Apple iOS 15 updates, it’s time to  formulate your game plan and switch up your marketing strategy to evolve with the changes.

You can always reach out to the team at Sercante for support while navigating it all. 

Thank you to Pam Carey and Joy Alphanso for contributing to this post.

The post Everything Pardot Admins Should Know About Apple Privacy Updates appeared first on The Spot For Pardot.

By |2021-09-29T10:02:23+00:00September 29th, 2021|Categories: Data Management, Email Marketing|

How To Automate Salesforce Campaign Naming Conventions

Campaign naming conventions are a must have. They keep your campaigns organized, improve reporting, and provide key information about the campaign at a glance. However, campaign naming conventions can only be helpful if they are used — and used consistently. 

Enforcing naming conventions is tricky because it typically relies on the users to remember the order, abbreviations, variations by type etc. Without good governance, your campaigns will end up having disparities.

Here’s an example of possible disparities: 

Instead of continuing to rely on your users remembering your naming conventions, we can automate this process with APEX.

But First

Before you start automating your campaign names, ensure the data that goes into your naming conventions is on the campaign object. For instance, my naming convention is YYYY_MM_Campaign Type_Description/Name, so I’ll need to make sure the following fields are required:

  1. Start Date 

Year and Month will be pulled from this field

  1. Campaign Type 

Create a picklist field on the campaign object for your different campaign types such as webinar, email, trade show, etc.

  1. Short Name 

Create a text field on the campaign object for the user specified description/name. The user will only enter data into the “Short Name” field, the default field “Campaign Name” will be completed by our APEX trigger.

You’ll need to do a quick calculation to see how long your new Campaign “Short Name” field can be. The default “Campaign Name” field can only be 80 characters, so you’ll need to calculate:

calculating character count for naming convention

X=58

The Campaign “Short Name” field can be up to 58 characters.

To ensure this is clear to your users, add Help Text to both the “Short Name” and “Campaign Name” fields.

new campaign

Automating the Salesforce Campaign Name

Next, we’ve created a little Salesforce DX project that you can take a look at to see an example of how this can be done: https://github.com/sercante-llc/campaign-name-enforcer

The project includes the Custom Field, Trigger code and the APEX Test code as well.

The CampaignNameTrigger is how we can enforce the Name of the Campaign. In this code, we see that we are using the date format “YYYY_MM_” to get us started, which will write out the 4 digit year and 2 digit month. Other formats are available.

trigger CampaignNameTrigger on Campaign (before insert, before update) {
    if(Trigger.isBefore && Trigger.isInsert) {
        //we will set the Name of the Campaign based on other fields,
        //overwriting whatever was placed there before
        for(Campaign campaign : Trigger.new) {
            campaign.Name = 
                Datetime.newInstanceGmt(campaign.StartDate, 
                    Time.newInstance(0,0,0,0)).formatGmt('YYYY_MM_')
                + campaign.Type + '_' + campaign.Short_Name__c;
            if(campaign.Name.length() > 80) //make sure length is good
                //if it isn't, trim it down to size
                campaign.Name = campaign.Name.substring(0, 80); 
        }
    }
    else if(Trigger.isBefore && Trigger.isUpdate) {
        for(Campaign campaign : Trigger.new) {
            Campaign oldCampaign = Trigger.oldMap.get(campaign.Id);
            //first lets see if anyone else tried changing the name
            if(campaign.Name != oldCampaign.Name) {
                //we want to prevent that
                campaign.addError('You can\'t change the Name directly.');
                continue;
            }
            //ok, we are safe to set the correct value now
            campaign.Name = 
            Datetime.newInstanceGmt(campaign.StartDate, 
                Time.newInstance(0,0,0,0)).formatGmt('YYYY_MM_')
            + campaign.Type + '_' + campaign.Short_Name__c;
            if(campaign.Name.length() > 80) //make sure length is good
                //if it isn't, trim it down to size
                campaign.Name = campaign.Name.substring(0, 80); 
        }
    }
}

This trigger will also trim the final campaign name down to 80 characters, if needed. 

Once implemented, the above APEX Trigger will fire whenever a Campaign is created and/or edited. 

final view

This is a subtle reminder that this year’s ParDreamin virtual conference starts on October 27th! Register here.

Want to automate your campaigns even further? Check out how you can auto-generate and enforce campaign member statuses by campaign type.

Thanks to Adam Erstelle for contributing to this post.

The post How To Automate Salesforce Campaign Naming Conventions appeared first on The Spot For Pardot.

By |2021-09-21T15:09:57+00:00September 21st, 2021|Categories: Campaigns, Data Management, Salesforce|

Creating a Pardot Spam Identification Process with Prospect Updater

Spam and junk data is the bane of my Pardot Admin existence. Nothing irks me more than seeing sales was notified of a form fill from [email protected], or that [email protected] was added to an engagement program. However, spam is an inevitable part of any marketing automation platform and there is only so much we can do to prevent it from entering, or remaining within, the system.

Kick Out the Spams

Song references aside, there are a number of things we can do to give junk data the boot from Pardot. I typically recommend creating dynamic lists that look for spam keywords in the most common Pardot Prospect fields (more info here). Then, use these lists to review and delete junk data on a regular basis. This process works great for small and mid-sized Pardot instances. But dynamic lists alone leave something to be desired for Pardot instances that intake thousands of new prospects a day.

When using Pardot native functionalities to identify junk, I found myself wanting to know why a prospect matched my junk lists:

  • Which field on the prospect’s record was raising the spam flag? 
  • Is this legit junk or do my junk lists need to be tweaked? 

Unable to solve this issue with native Pardot functionality alone, I turned to our Prospect Updater tool to see if I could turn this into a spam identification tool. With some tweaking and a lot of input from the Sercante Labs team, I was able to create a process that not only tells me why a prospect matched my spam criteria, but also allows me to easily manage spam clean up through the use of tags and automations rules. 

Prospect Updater to the Rescue

With Prospect Updater, we moved the criteria from our junk catcher dynamic lists over to  Google Sheets and created two new Pardot fields for the updater to use; “Spam Status” and “Spam Rules Matched.” Prospect Updater then compares all prospects in Pardot to the rules in the Google Sheet and updates their “Spam Status” field with one of the following values:

  • Suspected Spam: Prospect Updater has determined this prospect matches one of the spam rules.
  • Confirmed Spam: The Prospect has been reviewed and deemed to be spam
  • Not Spam: The Prospect matches one or more of the spam rules but has been reviewed and is deemed not to be spam. The Prospect will be excluded from future Prospect Updater spam reviews. 
  • Reset: The Prospect’s junk data has been corrected. Prospect Updater will include this Prospect in future spam reviews. 

The “Spam Rule Matched” field is also stamped with which spam criteria the Prospect matched. 

Once the Prospect Updater Spam Identification process was up and running, I created new dynamic lists that collected Prospects marked as “Suspected Spam” and grouped them by the field that was spammy. This allows me to easily review and clean up these prospects on a regular basis. 

Spam Identification Process with Prospect Updater

Automate All the Things

To make the spam review process even easier, I put automation rules in place that would allow me to update prospects by tagging them or changing their “Spam Status” value. That way, I could use whichever update method was easiest at the moment. 

For instance: 

  • If a Prospect is indeed spam
Spam Identification Process with Prospect Updater
  • If a Prospect will always match spam but is not actually spam (i.e. Pamela Smith with email SPam[email protected])
Spam Identification Process with Prospect Updater - not spam
  • If a Prospect has been edited to no longer match spam rules
Spam Identification Process with Prospect Updater  - reset spam

Having the “Spam Status” fields also allows me to create a suppression or “holding” dynamic list where new prospects will not be emailed until their “Spam Status” field is updated.

Spam Identification Process with Prospect Updater - dynamic list rules

This process now runs like a well-oiled machine. It allows us to easily identify and kick out junk data and prevent said data from causing any damage in the short time it exists in Pardot. 

Implementing the Prospect Updater Spam Identification Process

Set up and implementation of Prospect Updater is pretty painless. The first thing we need to do is set up a connected app: 

  • Complete the form on this page to get the package from us
  • Install our Salesforce Package
  • Set up a user and pre-authorize them to use the Connected App

The team will give you all the details and support you need to get this set up properly.

While the cogs are starting to move on that process, you can schedule a meeting with the Sercante Labs team to talk through your spam use case and any other challenges you might have for Prospect Updater. It can do a lot, and your wish is its command. The Sercante Labs team will then go back and do what developers do, and push buttons and stuff. 

Once your Prospect Updater configuration is complete, the only thing left is a final training session to make sure you and your team are equipped to create, modify and maintain your new Super Spam Spotting System plus any other cool things you want to do with it (data clean up and normalization, maybe?). 

Interested? Give the Labs team a shout through the form on the bottom of the Prospect Updater for Pardot page.

Thanks to Mike Fazio & Adam Erstelle for contributing to this solution.

The post Creating a Pardot Spam Identification Process with Prospect Updater appeared first on The Spot For Pardot.

By |2021-08-30T18:41:57+00:00August 30th, 2021|Categories: Data Management, Email Marketing, prospect updater, Sercante Labs|

Pardot Protected Campaign Member Statuses Solution

Get a solution for Protected Campaign Member Statuses in Pardot and step-by-step instructions for installation.

We go through all the effort of setting up beautiful Salesforce Campaigns, naming standards and maybe even a hierarchy. The next challenge in completing your beautiful work of campaign art is getting a hold on your Campaign Member Statuses for each campaign.

When a new Salesforce Campaign is created, many people aren’t just happy with the two default statuses of Sent and Responded. This prompts them to create what they think makes the most sense. Though as time goes on and as reporting starts to be needed, everyone making their own Campaign Member Statuses can be a nightmare that prevents you from getting meaningful and actionable intelligence. It would be really nice to take the guesswork out of status reporting and have a standard set of Campaign Member Statuses everyone uses consistently.

Jenna Molby posted a fantastic solution that enables you to automatically create the right Statuses on Campaign creation.

The automation here is good, though as you increase the number of Types the Flow could become a bit unwieldy.

Another thing that could be a problem comes later when other people might make changes to your carefully crafted structure. What happens if someone edits or even removes these statuses?

Install Protected Campaign Member Statuses

Protected Campaign Member Statuses is a free solution you can install and easily configure to solve this problem. It allows you to:

  1. Define the Campaign Member Statuses that should always be present on given Campaign Types.
  2. Restore the Protected Statuses on Active Campaigns should someone make changes.
  3. Create additional Statuses for specific reasons.
  4. Override by authorized users on a per-Campaign basis.

I don’t want the details, just let me install it

(Don’t worry. Keep reading to learn exactly what’s going on inside.)

We have an Unlocked Package you can install that sets up the application.

Get Started

Once installed, you need to define your Protected Statuses. This is done with Custom Metadata Types.

  1. Login to Salesforce Lightning, and go to Setup.
  2. Navigate to Custom Metadata Types, and click Manage Records for Protected Campaign Status.
    Pardot Protected Campaign Member Statuses
  3. To create your first ones, click New
    Pardot Protected Campaign Member Statuses
  4. Fill in the various fields.
    • Label: Used in the List of Campaign Statuses in the Setup view in step 3 above. Recommended convention:  TYPE-STATUS
    • Name: This is an API name that can be used by developers. Not required by this package. Recommended: let this autofill after you type in the Label.
    • Campaign Type: This is the actual value for the Campaign’s Type field.
    • Protected Status: This is the Status value that will become protected.
    • Is Default: Select this if this Status should be the default (please pick only 1 per Type).
    • Is Responded: Select this if this Status should be marked as Responded.
    • When complete, your screen may look something like this:
      Pardot Protected Campaign Member Statuses
  5. Click Save (or Save & New) and repeat a whole bunch.
  6. Lastly, time to set up a scheduled job to restore deleted protected statuses.
  7. Back in Setup, go to Apex Classes and click Schedule Apex.
    Pardot Protected Campaign Member Statuses
  8. Fill in the few fields.
    • Job Name: give this a nice descriptive name so you remember what it is in 3 months.
    • Apex Class: SL_ProtectedCampaignStatusJob
    • Frequency: set this to what works for you. We recommend running this daily during off-peak hours.
    • Start: today
    • End: some time in the distant future
    • Preferred Start Time: off peak hours
    • When complete, your screen may look something like this:
      Pardot Protected Campaign Member Statuses

You are good to go once you have provided your statuses. Give it a whirl by creating a new Campaign with the Type you have set up. Then take a look at the statuses already created.

Campaigns with Types not already set up will keep the default two statuses that Salesforce creates.

That’s cool. What’s behind the curtain?

To accomplish this, we leverage a few cool tools available to us:

  • Custom Metadata Types: Allows the Protected Statuses to be treated like normal Salesforce metadata and can be deployed around like any other metadata (changesets, insert devops tool here)
  • Campaign Custom Field: Has_Protected_Campaign_Member_Statuses__c is automatically checked by the solution if a Campaign is created and there are Custom Metadata Type records that specify this Campaign’s Type. It is also what allows the rest of the code to keep the statuses intact. You can clear the checkbox for this field to make changes to the statuses if you need to. However, you can’t enable protection afterwards.
  • Change Data Capture: We turn this on for CampaignMemberStatus so we can detect edits to statuses and then fix the records after-the-fact. Sadly we can’t (yet?) put any triggers on CampaignMemberStatus (which would have been ideal).
  • Triggers: yea these have been around for a while and are quite handy. We use them to kick off the automation that we’ve built when a Campaign is created. We also use them to watch for Campaign Member Status edits (through the ChangeEvents from Change Data Capture) so we can set things right afterwardsd.

If you want even more details, check out the Github project where you can see all the inner workings of what is going on.

Further Reading

Here are some resources you can use to learn more about Salesforce Campaigns and how they work in Pardot:

The post Pardot Protected Campaign Member Statuses Solution appeared first on The Spot For Pardot.

By |2021-07-16T18:27:52+00:00July 16th, 2021|Categories: Campaigns, Data Management|

Recipe for success: Pardot B2BMA columns to rows

Change your data columns to rows in Pardot B2B Marketing Analytics/Tableau CRM

Has this ever happened to you? You wish you could change your Pardot B2BMA data from columns to rows.

You have all the Pardot B2B Marketing Analytics data you want in a single column, but you need to create B2BMA reports that show the data as rows.

For Example:

Your data looks like this.

B2BMA Columns to Rows 1

But you want the data to look like this.

B2BMA Columns to Rows 2

So you can make visuals like this!

B2BMA Columns to Rows 2

And you want to do this without using a complicated query on the front end of your dashboard that could limit the ability to filter and sort the data…

There are many ways to accomplish this. But one of the simplest and most manageable methods is through a data recipe using the Append (UNION) and transform filters. This approach allows you to tweak your rules and data without code on the front end so you can keep your dashboard creation options flexible.

Changing Pardot B2BMA Data Columns to Rows

Step 1: Figure out what fields and filters to add.

The first step is to identify the rules.

  • What determines each type?
  • Which fields are needed for the data visual?
  • What filters do you want to include?

In our example, we know the MQL (Marketing Qualified stage) has been reached if the “Date__Qualified” date is greater than 1971-01-01’. Each stage has its own rules.

To create our dataset, we need to determine what fields and filter to add:

  • MQL Status (rules fields) and MQL Date
  • SQL Status (rules fields) and SQL Date
  • SAL Status (rules fields) and SAL Date

Filters: Country, Account name

When creating your dataset, be sure to document what fields are needed. Keep the field list as small as possible (you can always add more fields later if needed). Less is more for performance and useability in this case.

Step 2: Choose the fields you need.

Open your data recipe and select the dataset. Choose only the fields you need. This will keep the dataset manageable. You should pick all the fields needed to create the rules and the fields you will use to filter. Document everything you select as you will be repeating this process for each row type.

LeadsCompleteSercante

Step 3: Attach a transform to the dataset.

In this next step, you’re going to attach a transform to the dataset. Select the ‘custom formula option.’

In our example, anywhere the qualified data is after ‘1971-01-01’ we flag the type as MQL, otherwise we leave it blank.

Attach a transform to the dataset

Step 4: Add your rule and create a new field.

Use the “CASE” function to add your rule and create a new field. This will create a new field (BusinessStage) that will indicate ‘MQL’ where the qualified data is valid. Set the field type as text and Make sure to rename the field

Code Sample:

case 
when Date_QualifiedMQL__c >’1971-01-01′
then ‘MQL’
else ‘’
end

Add your rule

Step 5: Attach another transform.

Attach another transform

Attach another transform to populate the correct date using the custom formula. We are essentially creating a date field that will be the “main” date for our dataset and allow the aggregate on the dashboard.

Code Sample:

case
when Date_QualifiedMQL__c >’1971-01-01′
then Date_QualifiedMQL__c
else Date_QualifiedMQL__c
end

Step 6: Add a filter.

Add a filter to whittle your dataset down to just the “MQL” data.

Filter
B2BMA Columns to Rows 2

Now your dataset looks like this with “SQL” as a FunnelStatus and the SQL Date as the FunnelDate. 

B2BMA Columns to Rows 2

Step 7: Repeat steps 1 through 6.

Repeat steps 1 through 6 to create the next row type. For each, make sure your CASE statement reflects your rules.

Repeat Steps

Step 8: Append the dataflows.

Append the two dataflows together with the Append connector. Each dataset must have identical rows to connect them as one (unioned) dataset.

Append the dataflows

Now your dataset looks like this. Your SALs and MQLs have gone from columns to rows!

B2BMA Columns to Rows 2

For each remaining variable, repeat steps 1-7 with correct transformation rules and add append to the dataset as you go.

B2BMA Columns to Rows 2

Step 9: Create an output object.

Once you have added all your types in filtered “sub” datasets, create an output object.

Once you run the data flow, you will be able to use the FunnelStage and FunnelDate to do summaries without complex code. If the rules change for creating the FunnelGroups, change the Transforms in the recipe or add new ones.

Now you can use your new dataset to create visuals by date and type or create a summary table. 

Further considerations for reformatting Pardot B2BMA data

Here are a few things to keep in mind as you’re getting started.

  • You can use joins to add other datasets to your recipe – note they have to exist for all “streams”
  • Verify all desired variables have been accounted for (in our example after you filter SQL, SAL and MQL are there rows that are not brought in that you might need in your analysis? )
  • You can bring in as many columns as you need for filtering. Since we are turning each “column’ into its own row, each new column can contain the same data it had before, making all filters in the original dataset available.
  • Make sure you do a reality check on the data including:
    • Expected row counts
    • Expected amount totals
    • Missing values
  • Note that when you create rows from columns, you need to decide if you want ALL data converted or just the data that meets the rules you set. If in doubt, create an additional data stream that filters out all records that don’t meet any of the criteria and make sure to review those. What’s not there might be important too!

Further reading:

The post Recipe for success: Pardot B2BMA columns to rows appeared first on The Spot For Pardot.

By |2021-07-09T14:46:43+00:00July 9th, 2021|Categories: b2bma, Data Management, Pardot B2B Marketing Analytics|