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|

Supercharge sales ‘speed to lead’ with clean Pardot data

When speed to lead is important, clean Pardot data is key.

A lot can be said about timing. In life, in business, and especially in the sales & marketing process. 

Catching a prospect on a good day, at the right time and with the right question or topic can fast-track a deal you’ve been chasing for months. 

As marketers, we are in the unique position to ensure we start the lead process off with the best timing. We can do that by focusing on ways to increase what sales calls our ‘speed to lead’ timing.

The following post will teach you how to improve your sales team’s speed to lead time by setting automations to ensure you always have clean Pardot data.

What does ‘speed to lead’ mean in sales & marketing?

Clean Pardot Data Speed to Lead

Speed to lead is defined as the amount of time between someone expressing interest in your company and your sales team’s first response. 

You’ve probably seen it happen (the Salesforce sales team does too good of a job at this): you fill out a form on a website. As soon as the confirmation hits your inbox, your phone rings with a salesperson asking if you have any questions. 

This behavior is known to produce good sales outcomes if it’s done sincerely and with tact (so you don’t become annoying and badger potential clients). 

A lot of ‘speed to lead’ discussion is had with companies that measure first responses in single-digit minutes. But every organization benefits from decreasing the time it takes for a hand-raiser to get to the sales team. 

Get clean data and improve speed to lead time

Now, let’s put our marketing operations hats back on. 

What happens if the data you’re receiving about Pardot Prospects is incomplete or incorrectly formatted? 

You might get “U.S.A.” and then have a sync error because Salesforce has “State and Country Picklists” enabled. 

On the other hand, you might be fighting the battle between needing more complete data for routing versus not deterring prospects from completing a form. 

You can take action from the Pardot side before the data gets into Salesforce. Utilize completion actions, automation rules, and engagement studio programs to clean up known and recurring issues with data. 

Depending on the tool you use, there will be some delay in processing the data. But if sales isn’t clamoring to measure speed to lead in minutes, then you should be okay. 

Those automations all have their pros and cons. However, you should be able to use them to clean up a certain amount of data automatically. 

Considerations for using automations to clean Pardot data

So you’re ready to use Pardot automations to ensure data is coming in clean while improving speed to lead time.

You’ll have to address the growing complexity of trying to add a new automation for each field (and cleaned field value) you want to fix. 

One note when making these data cleaning rules: make sure you think through how you’re using the “Contains” filter because “Country CONTAINS ‘DE’ will match “DE” (Germany) AND “Denmark.”

Send incomplete lead records to Salesforce first

If your data rules are less stringent, then you might be able to get the data into Salesforce before cleaning. 

We like to assign the not-yet-clean leads to a marketing queue. But you have a lot more options for cleaning data than we do in Pardot if you can sync incomplete or incorrect data to Salesforce and hold off on assigning leads to a queue.

AppExchange products, Flow, and custom Apex classes can all work to help you normalize, standardize and enrich the data. Once you have clean data, then you can use a Flow/Apex/AppExchange product to re-route the lead to the right spot.

Clean Pardot data at the source

Another place to look for cleaner data is at the source. Optimize your conversion points to ensure data fits your needs as it enters your org.

For example, make sure your web form state and country fields are picklist/dropdown fields. Then verify that the values match what is in your Salesforce org’s state and country picklists. Bonus points if you can restrict the state to the selected country. 

Also, we’ve found that some lead generation vendors have ‘standardized’ their data to meet their own set of standards. For instance, they may be using employee count ranges instead of the exact value. Since you’re essentially paying them for data, then you should be able to convince them to format their data to YOUR standards. 

It’s also worth a note here on where to look for data problems to begin with. The first place to check (regularly) is your Sync Errors list in Pardot Settings. This will give you a list of every Prospect who was unable to sync to Salesforce and the reason why. 

Occasionally these reasons can be cryptic, so get your Google-fu ready and go find your Salesforce Admin (if that’s not also you). Bucket the list of errors together, and look for commonality and patterns. See if you can then determine the root cause of the errors and if they are one-offs or repeatable issues you need to resolve.

Find data issues in Salesforce Reports

Another place to look for issues is in Salesforce Reports. 

I love seeing a freshly created dashboard because of the data story it tells. It’s usually an eye-opening story about bad or incomplete data. 

Here’s an example of something to look for in these types of reports: 

  • Open a lead report. 
  • Look for leads that have met your stated ‘assign to sales’ threshold.
  • Identify the ones that have met the threshold but are still assigned to the Pardot connector/integration user, or they are still in your marketing queue. 

Why aren’t those leads assigned to sales? They’re growing mold and you’re losing money. 

If it’s one or two, it might be a fluke. It’s still worth it to take a look. If it’s a lot of leads, then it’s time to roll up your sleeves and figure out what’s going wrong — quickly.

Improve speed to lead times with Pardot tools

Clearly we’ve seen these situations happen in many Pardot orgs and have felt this pain (and continue to feel this pain). So, you’re not alone. 

Over the years, our Sercante Labs team has found ways to automate this pain away for ourselves and our customers. It’s turned into a tool that we simply call Prospect Updater for Pardot

Prospect Updater helps us do advanced data cleanup and enrichment inside Pardot. That means data is cleaned BEFORE prospects are assigned and in Pardot. The tool works wonders with clamping down on spam-bot submissions on your forms.

Where have you seen the biggest data issues arise and how have you dealt with them? Ping us on Twitter or add a comment below. And reach out to us to learn more about using Prospect Updater for Pardot in your org.

Here’s to good leads and clean data!

The post Supercharge sales ‘speed to lead’ with clean Pardot data appeared first on The Spot For Pardot.

By |2021-06-10T10:08:40+00:00June 10th, 2021|Categories: Clean Pardot Data, Data Management, Lead Generation, Sales Team|

How to address Pardot issues related to the Salesforce outage

On May 11, 2021, Salesforce and Pardot users experienced a Salesforce outage related to a domain name service (DNS) issue. Salesforce was down for about four hours because of an “emergency break fix” that wasn’t successful.

The Salesforce outage affected Pardot. However, Pardot remained up and running even if marketers couldn’t log in to their specific instances.

As always, you can check https://status.salesforce.com/ to find information about ongoing issues that could potentially affect your Salesforce org.

Around 5 p.m. Eastern Standard Time, marketers noticed they couldn’t log into the CRM or Pardot. Salesforce was actively restoring services at 8:30 p.m. EST, and the team restored many services that were impacted by that time.

Resolved-Multiple Salesforce Applications Disrupted

Were Pardot end users affected by the Salesforce outage?

Pardot end users likely did not experience the effects of the outage.

It is currently looking like the outage may have caused a few delayed emails and delayed sales people callbacks. However, we’re expecting these small delays to be all end users will experience during this outage event. 

How did the Salesforce outage affect Pardot?

Salesforce co-founder and chief technology officer Parker Harris commented on the outage via Tweet. He said the base issue causing the Salesforce outage was related to the domain name system (DNS). 

The DNS issue affected Pardot by restricting access to the CRM, which caused the Pardot-Salesforce connector to become unavailable. 

In addition, Pardot sends emails using Marketing Cloud send services (at least as far as DNS naming organizes them). So, Pardot was most likely unable to send emails during the outage.

Pardot authentication happens on Saleforce.com services, so Pardot users were not able to to log in during the outage. This login unavailability impacted both marketers trying to log in as well as API authentications. 

Next steps for Pardot users now that service is restored

The core of Pardot was unaffected. But we do have some things to check around the edges of Pardot where it interacts with other Salesforce services. 

Here’s how you can stay ahead of potential issues that may have been caused by the Salesforce outage:

Check new leads or prospects

Spot-check any leads that came in on form fills during the connectivity outage. Make sure new leads made their way into the CRM correctly. 

Look at your busiest forms and form handlers that have completion actions to sync to Salesforce. Make sure all prospects have the Salesforce cloud icons you expect. If they do not appear to be syncing, open the prospect record and click “Sync with CRM.”

Verify Pardot successfully delivered emails during Salesforce outage

The Salesforce outage may have delayed email delivery. It appears as though Pardot couldn’t communicate with outbound email servers. Look at reporting for any email campaigns or you scheduled for delivery on May 11, 2021. Also, check any autoresponders that may be connected to form fills to ensure everything was delivered as expected. 

Verifying Pardot sent your emails can give you assurance that the outage didn’t affect your campaigns. But remember, email is a fault-tolerant service, and any sending issues will fix itself automatically. Or, the Pardot team will push the buttons to make this right for us.

Monitor API integrations

Third-party integrations likely lost the ability to sync with Pardot during the outage event. However, the ways in which the outage affected APIs depends on how the integration was built to deal with these situations. 

Here are three ways your APIs may respond to outages.

The API:

  • Will automatically retry to connect, and the data should have made its way into Pardot with no issues. 
  • May have retried and stopped after too many unsuccessful attempts, so we don’t have the data in Pardot. 
  • May not retry to connect, so we don’t have the data in Pardot. 

You will need to check your Pardot tool integrations and figure out how to sync any missing data. You can likely sync missing data by manually pushing ‘retry’ in each tool. Or, you can use the normal export process to import data into Pardot just like we do when we don’t have the tools integrated. 

What is DNS?

DNS or Domain Name System is effectively the computers ‘phone book’. This is the system that translates ‘TheSpotForPardot.com’ to the IP address (kinda like a phone number) that computers use to talk to each other. So with a DNS issue, the computer’s phone books to each other don’t work right. They can’t correctly talk to each other. 

Pardot and the Pardot services didn’t have any DNS issues during this time, but rather the Saleforce platform infrastructure had DNS issues. So, the world could interact with Pardot services just fine — it continued to collect forms, deliver whitepapers, etc. 

Pardot just couldn’t talk to Salesforce services, which includes authentication for logging in.

If you’re seeing connector issues, check out this resource to troubleshoot for common Pardot-Salesforce connector issues.

Get help from Pardot consultants

If all else fails and you’re completely lost in Salesforce outage freakout mode, then we’d love to talk to you. 

The Sercante Pardot consultant team knows a thing or two about Salesforce outages and how they affect Pardot orgs. Contact us to chat.

The post How to address Pardot issues related to the Salesforce outage appeared first on The Spot For Pardot.

How to address Pardot issues related to the Salesforce outage

On May 11, 2021, Salesforce and Pardot users experienced a Salesforce outage related to a domain name service (DNS) issue. Salesforce was down for about four hours because of an “emergency break fix” that wasn’t successful.

The Salesforce outage affected Pardot. However, Pardot remained up and running even if marketers couldn’t log in to their specific instances.

As always, you can check https://status.salesforce.com/ to find information about ongoing issues that could potentially affect your Salesforce org.

Around 5 p.m. Eastern Standard Time, marketers noticed they couldn’t log into the CRM or Pardot. Salesforce was actively restoring services at 8:30 p.m. EST, and the team restored many services that were impacted by that time.

Resolved-Multiple Salesforce Applications Disrupted

Were Pardot end users affected by the Salesforce outage?

Pardot end users likely did not experience the effects of the outage.

It is currently looking like the outage may have caused a few delayed emails and delayed sales people callbacks. However, we’re expecting these small delays to be all end users will experience during this outage event. 

How did the Salesforce outage affect Pardot?

Salesforce co-founder and chief technology officer Parker Harris commented on the outage via Tweet. He said the base issue causing the Salesforce outage was related to the domain name system (DNS). 

The DNS issue affected Pardot by restricting access to the CRM, which caused the Pardot-Salesforce connector to become unavailable. 

In addition, Pardot sends emails using Marketing Cloud send services (at least as far as DNS naming organizes them). So, Pardot was most likely unable to send emails during the outage.

Pardot authentication happens on Saleforce.com services, so Pardot users were not able to to log in during the outage. This login unavailability impacted both marketers trying to log in as well as API authentications. 

Next steps for Pardot users now that service is restored

The core of Pardot was unaffected. But we do have some things to check around the edges of Pardot where it interacts with other Salesforce services. 

Here’s how you can stay ahead of potential issues that may have been caused by the Salesforce outage:

Check new leads or prospects

Spot-check any leads that came in on form fills during the connectivity outage. Make sure new leads made their way into the CRM correctly. 

Look at your busiest forms and form handlers that have completion actions to sync to Salesforce. Make sure all prospects have the Salesforce cloud icons you expect. If they do not appear to be syncing, open the prospect record and click “Sync with CRM.”

Verify Pardot successfully delivered emails during Salesforce outage

The Salesforce outage may have delayed email delivery. It appears as though Pardot couldn’t communicate with outbound email servers. Look at reporting for any email campaigns or you scheduled for delivery on May 11, 2021. Also, check any autoresponders that may be connected to form fills to ensure everything was delivered as expected. 

Verifying Pardot sent your emails can give you assurance that the outage didn’t affect your campaigns. But remember, email is a fault-tolerant service, and any sending issues will fix itself automatically. Or, the Pardot team will push the buttons to make this right for us.

Monitor API integrations

Third-party integrations likely lost the ability to sync with Pardot during the outage event. However, the ways in which the outage affected APIs depends on how the integration was built to deal with these situations. 

Here are three ways your APIs may respond to outages.

The API:

  • Will automatically retry to connect, and the data should have made its way into Pardot with no issues. 
  • May have retried and stopped after too many unsuccessful attempts, so we don’t have the data in Pardot. 
  • May not retry to connect, so we don’t have the data in Pardot. 

You will need to check your Pardot tool integrations and figure out how to sync any missing data. You can likely sync missing data by manually pushing ‘retry’ in each tool. Or, you can use the normal export process to import data into Pardot just like we do when we don’t have the tools integrated. 

What is DNS?

DNS or Domain Name System is effectively the computers ‘phone book’. This is the system that translates ‘TheSpotForPardot.com’ to the IP address (kinda like a phone number) that computers use to talk to each other. So with a DNS issue, the computer’s phone books to each other don’t work right. They can’t correctly talk to each other. 

Pardot and the Pardot services didn’t have any DNS issues during this time, but rather the Saleforce platform infrastructure had DNS issues. So, the world could interact with Pardot services just fine — it continued to collect forms, deliver whitepapers, etc. 

Pardot just couldn’t talk to Salesforce services, which includes authentication for logging in.

If you’re seeing connector issues, check out this resource to troubleshoot for common Pardot-Salesforce connector issues.

Get help from Pardot consultants

If all else fails and you’re completely lost in Salesforce outage freakout mode, then we’d love to talk to you. 

The Sercante Pardot consultant team knows a thing or two about Salesforce outages and how they affect Pardot orgs. Contact us to chat.

The post How to address Pardot issues related to the Salesforce outage appeared first on The Spot For Pardot.

Pardot Marketing Data Sharing

Wait, what is Marketing Data Sharing?!? If you are not familiar with Marketing Data Sharing, it essentially allows you to restrict which leads, contacts, opportunities, and/or custom objects are eligible to sync from Salesforce to Pardot. Let’s break this down and discuss its requirements, use cases, and setup. 

What is Marketing Data Sharing?

Marketing Data Sharing (MDS) allows you to restrict which leads, contacts, opportunities, and/or custom objects are eligible to sync from Salesforce to Pardot. This is especially useful if only a subset of your leads and contacts are marketable. If you are using multiple Pardot Business Units, MDS enables you to specify which leads, contacts, etc. sync to which Business Units. 

Requirements for MDS

MDS is available in the Pardot Lightning app for Advanced and Premium Pardot editions. Your Pardot instance also needs to be using the V2 Connector. The V2 Connector is the default for any Pardot accounts purchased after February 2019, but if you purchased before then you can learn how to upgrade your connector here

How does Marketing Data Sharing work?

MDS relies on one rule per object and objects that match the rule’s criteria sync to Pardot. For example, say your Leads and Contacts have a checkbox field called “Marketable”. If “Marketable” is checked (true) the Lead or Contact is eligible to sync to Pardot. If the “Marketable” field is unchecked (false) the Lead or Contact is ineligible to sync to Pardot. If an existing Pardot Prospect’s “Marketable” field changes from checked to unchecked, they will be archived. 

Considerations and Gotchas

Most of Marketing Data Sharing considerations are pretty straightforward:

  • Both Lead and Contacts must have MDS criteria. You cannot use MDS to only control which Leads sync but not Contacts, or vice versa.
  • If you have multiple business units, you will need to set up MDS for both Lead and Contacts in every business unit.
  • If a Lead or Contact no longer matches the MDS criteria, the corresponding Prospect record will be sent to the Pardot recycle bin.

But then the documentation gets a little murky with these two:

  • “If you update a prospect record in Pardot but not the corresponding record in Salesforce, you can unintentionally archive prospects.” 
  • “Imported prospects that don’t match Marketing Data Sharing rules are automatically archived.”

Essentially what this means is that you should not add the field that is used in your MDS criteria to Pardot because if you do, you can accidentally archive the prospect before it even has a chance to get to Salesforce. Keeping the MDS field out of Pardot means that Pardot-only prospects can never unmatch the MDS rules. 

Finally, two big gotchas I learned from recently setting up MDS

  • Make sure the connector user or B2BMA Integration user (depending on your Connector) has view and edit permissions to the field controlling MDS.
  • Add the MDS field to your page layouts as a read-only field so it is easy to see which leads/contacts/etc. are syncing to Pardot.

How To Setup Pardot Marketing Data Sharing

It’s best to set up MDS with a dedicated Salesforce field that is solely used to control syncing to Pardot. You don’t want to try and repurpose a field that other users may change and not realize there are downstream effects. This field should have pre-determined values (i.e. not a text field) and should only exist in Salesforce. 

When you are ready to turn on MDS rules, open Pardot in the Lightning App (you cannot set this up in classic)

  1. Navigate to the Pardot Settings tab and select Connectors
  2. Select the action wheel next to your Salesforce Connector and select Edit Setting
  1. Select the Marketing Data Sharing tab and use the down arrow to edit the Criteria for your first object
  1. Select “Use explicit criteria” and set your rule
  1. Repeat for the other object(s)

Conclusion 

Marketing Data Sharing is a valuable tool, especially if only a subset of your leads and contacts are marketable and if you are using multiple Pardot Business Units. Are you currently utilizing Marketing Data sharing rules? We’d love to hear your experience and share any insights in the comments. 

The post Pardot Marketing Data Sharing appeared first on The Spot For Pardot.

By |2021-03-19T14:44:17+00:00March 19th, 2021|Categories: Data Management|

Pardot Marketing Data Sharing

Wait, what is Marketing Data Sharing?!? If you are not familiar with Marketing Data Sharing, it essentially allows you to restrict which leads, contacts, opportunities, and/or custom objects are eligible to sync from Salesforce to Pardot. Let’s break this down and discuss its requirements, use cases, and setup. 

What is Marketing Data Sharing?

Marketing Data Sharing (MDS) allows you to restrict which leads, contacts, opportunities, and/or custom objects are eligible to sync from Salesforce to Pardot. This is especially useful if only a subset of your leads and contacts are marketable. If you are using multiple Pardot Business Units, MDS enables you to specify which leads, contacts, etc. sync to which Business Units. 

Requirements for MDS

MDS is available in the Pardot Lightning app for Advanced and Premium Pardot editions. Your Pardot instance also needs to be using the V2 Connector. The V2 Connector is the default for any Pardot accounts purchased after February 2019, but if you purchased before then you can learn how to upgrade your connector here

How does Marketing Data Sharing work?

MDS relies on one rule per object and objects that match the rule’s criteria sync to Pardot. For example, say your Leads and Contacts have a checkbox field called “Marketable”. If “Marketable” is checked (true) the Lead or Contact is eligible to sync to Pardot. If the “Marketable” field is unchecked (false) the Lead or Contact is ineligible to sync to Pardot. If an existing Pardot Prospect’s “Marketable” field changes from checked to unchecked, they will be archived. 

Considerations and Gotchas

Most of Marketing Data Sharing considerations are pretty straightforward:

  • Both Lead and Contacts must have MDS criteria. You cannot use MDS to only control which Leads sync but not Contacts, or vice versa.
  • If you have multiple business units, you will need to set up MDS for both Lead and Contacts in every business unit.
  • If a Lead or Contact no longer matches the MDS criteria, the corresponding Prospect record will be sent to the Pardot recycle bin.

But then the documentation gets a little murky with these two:

  • “If you update a prospect record in Pardot but not the corresponding record in Salesforce, you can unintentionally archive prospects.” 
  • “Imported prospects that don’t match Marketing Data Sharing rules are automatically archived.”

Essentially what this means is that you should not add the field that is used in your MDS criteria to Pardot because if you do, you can accidentally archive the prospect before it even has a chance to get to Salesforce. Keeping the MDS field out of Pardot means that Pardot-only prospects can never unmatch the MDS rules. 

Finally, two big gotchas I learned from recently setting up MDS

  • Make sure the connector user or B2BMA Integration user (depending on your Connector) has view and edit permissions to the field controlling MDS.
  • Add the MDS field to your page layouts as a read-only field so it is easy to see which leads/contacts/etc. are syncing to Pardot.

How To Setup Pardot Marketing Data Sharing

It’s best to set up MDS with a dedicated Salesforce field that is solely used to control syncing to Pardot. You don’t want to try and repurpose a field that other users may change and not realize there are downstream effects. This field should have pre-determined values (i.e. not a text field) and should only exist in Salesforce. 

When you are ready to turn on MDS rules, open Pardot in the Lightning App (you cannot set this up in classic)

  1. Navigate to the Pardot Settings tab and select Connectors
  2. Select the action wheel next to your Salesforce Connector and select Edit Settings
  1. Select the Marketing Data Sharing tab and use the down arrow to edit the Criteria for your first object
  1. Select “Use explicit criteria” and set your rule
  1. Repeat for the other object(s)

Conclusion 

Marketing Data Sharing is a valuable tool, especially if only a subset of your leads and contacts are marketable and if you are using multiple Pardot Business Units. Are you currently utilizing Marketing Data sharing rules? We’d love to hear your experience and share any insights in the comments. 

The post Pardot Marketing Data Sharing appeared first on The Spot For Pardot.

By |2021-03-19T14:44:17+00:00March 19th, 2021|Categories: Data Management|

Single Pardot Form, Multiple Completion Actions

Have you ever wished you could have multiple conditional form completion actions in a single Pardot form?

If you answered “OF FREAKIN’ COURSE I HAVE”, you’re in luck because I am going to teach you how in just 5 easy steps.

As you know it is super easy to add a single completion action to a Pardot form. But what would you do if you wanted to add multiple completion actions to a form and tie those actions to specific form elements. 

I know, it’s a head scratcher right (and you’ve probably heard: “Nope, can’t do it”)? Never fear I’ll guide you through the dragon’s den.

When we combine the magic of Pardot together with the superpowers of JavaScript anything is possible.

But, before we take our first step down the path to knowledge, let’s set the scene. Imagine that we are promoting multiple webinar events with a single registration form.

In this scenario, we want to have one landing page that has a list of upcoming webinars. Visitors can choose one or more of those webinars to attend and only need to fill out one Pardot form. Then, we need that registration information to register the visitor (now a Prospect) in the appropriate GoToWebinar sessions.

So where do we start?

Step 1: Configure the form and form handlers.

Our first step is to identify the field(s) we will use on the form and to which form elements we will apply the conditional completion actions. 

We need to note the API field name (field ID) for the field(s) we’ve selected. These can be found with one of the following navigations depending upon your chosen experience:

  • In Pardot (classic), navigate to Admin | Configure Fields | Prospect Fields.
  • In the Pardot Lightning app, click the Pardot Settings tab, then click Object and Field Configuration | Prospect Fields.

For our scenario we’ll create 4 custom fields for 4 upcoming webinars so our future prospects can register for any or all of our webinar options.

Our list of the unique Field IDs:

  1. Webinar_topic_1
  2. Webinar_topic_2
  3. Webinar_topic_3
  4. Webinar_topic_4

Keep these IDs somewhere you can access them easily. They’ll be needed in our final step.

Step 2: Create a Pardot form (or edit an existing one)

Make sure to select the fields that you wish to use for your completion actions and make sure they are checkbox fields, text fields, or radio buttons. If they are Checkbox fields, they must have EXACTLY ONE selection option. When selecting your inputs make sure to uncheck the required option. 

For our scenario, I’ve created 4 custom checkbox fields and added each to the form. Each has exactly one value, and was step up like this:

First select the Prospect Field “Webinar Topic 1”, select type of Checkbox and Data Form of “Text”. 

Now click on the Values tab. Enter the Value that you want to display on the form (in this case, our Value is Webinar Event 1). Keep a record of this value handy. We’ll need it in step 5 when we start customizing our JavaScript.

Note that for each form field value on which you want to apply a unique completion action, you will need to create a unique form handler. In our example we’ll be using 4 completion actions and therefore 4 form handlers.

These are our Field ID and Value pairs so far:

  1. FieldID: Webinar_topic_1
    Form Value: Webinar Event 1
  2. FieldID: Webinar_topic_2
    Form Value: Webinar Event 2
  3. FieldID: Webinar_topic_3
    Form Value:  Webinar Event 3
  4. FieldID: Webinar_topic_4
    Form Value: Webinar Event 4

I know the naming is not 100% awesome. I want to keep it generic though so Fields can be reused as needed. If we gave each one very specific names our solution would be too brittle (meaning easy to break, hard to scale). 

Step 3: Create a Pardot form handler for each field value you’d like to apply completion actions.

Start by only adding the email field to the form handler. Then, add the corresponding completion action for each value. Save. Take note of the form handler endpoint URL (ideally the HTTPS version) as you’ll need this in step 5 and match it to the related Values from the form.

As we continue with our multiple webinar example, I’ve repeated the step 4 times and created a form handler to use for each of the 4 custom fields created in step 2.

Here is a list of the 4 form handlers and their endpoint URLs and how they map to the field values set up above:

  1. FieldID: Webinar_topic_1
    Form Value: Webinar Event 1
    Form Handler URL: https://sercante.com/l/876401/2020-11-30/gny9d5
  2. FieldID: Webinar_topic_2
    Form Value: Webinar Event 2
    Form Handler URL: https://sercante.com/l/876401/2020-11-30/gny9df
  3. FieldID: Webinar_topic_3
    Form Value:  Webinar Event 3
    Form Handler URL: https://sercante.com/l/876401/2020-11-30/gny9dk
  4. FieldID: Webinar_topic_4
    Form Value: Webinar Event 4

Form Handler URL: https://sercante.com/l/876401/2020-11-30/gny9dh 

Step 4: Copy this script and paste into your Pardot form’s Thank You Code:

Copy the code below and paste directly into the Thank You “Code” in Pardot’s “Completion Actions” tab. 

<script>
var fieldsConfig = [
{//this block of lines is for option 1
    ‘fieldValue’:’%%your_field_id_1{js}%%’,
    ‘checkboxVal’:’VALUE_1′,
    ‘endpointUrl’:’FORM_HANDLER_1_URL’
},
{//this block of lines is for option 2
    ‘fieldValue’:’%%your_field_id_2{js}%%’,
    ‘checkboxVal’:’VALUE_2′,
    ‘endpointUrl’:’FORM_HANDLER_2_URL’
}
//add more blocks if you need them
];
// DO NOT CHANGE BELOW THIS LINE
var email = encodeURIComponent(‘%%email{js}%%’);
var thankYouContainer = document.querySelector(‘.form-thank-you’);

fieldsConfig.forEach(function (field) {
  if (field.checkboxVal === field.fieldID) {
    var iframe = document.createElement(‘iframe’);
    iframe.setAttribute(‘height’, ‘1px’);
    iframe.setAttribute(‘width’, ‘1px’);
    iframe.setAttribute(‘src’, `${field.endpointUrl}?email=${email}`);
    thankYouContainer.append(iframe);
  }
});
</script>

After pasting the code into the thank you code input area make sure the “Always display form after submission” checkbox is checked — otherwise this method will not work and the script will run in a loop! Which will cause a total computer meltdown and all pictures of cats on the internet to disappear. Ok that last bit is a small exaggeration but seriously don’t forget the checkbox. You’ve been warned.

Step 5: Time to modify some JavaScript

The code we pasted into our thank you content in step 4 is a bit of boilerplate to get us started. It will need to be updated for each unique use. I know it’s a bit daunting but we’ll take it slow and be very mindful of the characters we adjust.

For our webinar scenario I’ve duplicated the first code block two additional times for a total of 4 blocks of field/value/url. This is a necessary step because we have 4 form handlers and custom fields to match up. If we were only working with 2 we would not need to duplicate this code block. 

Notice how each code block is contained in a set of curly braces and separated by a comma. There is no trailing comma on the last block:

{//this block of lines is for option 1
    fieldValue:’%%your_field_id_1{js}%%’,
    checkboxVal:’VALUE_1′,
    endpointUrl:’FORM_HANDLER_1_URL’
},
{//this block of lines is for option 2
    fieldValue:’%%your_field_id_2{js}%%’,
    checkboxVal:’VALUE_2′,
    endpointUrl:’FORM_HANDLER_2_URL’
},{//this block of lines is for option 3
    fieldValue:’%%your_field_id_3{js}%%’,
    checkboxVal:’VALUE_3′,
    endpointUrl:’FORM_HANDLER_3_URL’
},{//this block of lines is for option 4
    fieldValue:’%%your_field_id_4{js}%%’,
    checkboxVal:’VALUE_4′,
    endpointUrl:’FORM_HANDLER_4_URL’
}

First thing we need to update is your_field_id_1. Let’s replace that with the Pardot field ID that you want to perform completion actions on. A couple of things to note: 

  1. the name must be wrapped in %%, and
  2. a {js} modifier must be added at the end of the name. 
  3. For example, if your field id is custom_field_1, it should look like %%custom_field_1{js}%% not %%custom_field_1%% or %custom_field_1{js}%

Now that we know what to watch out for let’s start making edits. First we’ll replace the “your_field_id” placeholders with the values of prospect field IDs (step 1):

  1.  %%your_field_id_1{js}%% = %%Webinar_topic_1{js}%%
  2.  %%your_field_id_2{js}%% = %%Webinar_topic_2{js}%%
  3. %%your_field_id_3{js}%% = %%Webinar_topic_3{js}%%
  4.  %%your_field_id_4{js}%% = %%Webinar_topic_4{js}%%

Next, we replace the placeholder values for “VALUE”. Using our example, the values are what we used in the Pardot form checkbox value tab – Please note that if there are special characters like ampersands (&) in the form values, they MUST be replaced with HTML entity code like: &amp; (that’s the & symbol followed by the letters amp and ended with a semicolon. Probably best to avoid special characters in the Values if at all possible):

  1. VAULE_1 = Webinar Event 1
  2. VAULE_2 = Webinar Event 2
  3. VALUE_3 = Webinar Event 3
  4. VALUE_4 = Webinar Event 4

Finally, each value that we’re searching for in our form will trigger a unique form handler. So, each code block will need to be updated with the correct endpoint URL. Make sure to match the correct endpoint URL with the correct form field.

Here the endpoints created in step 3 are used in place of the FORM_HANDLER_1_URL variables. 

  1. FORM_HANDLER_1_URL = https://sercante.com/l/876401/2020-11-30/gny9d5
  2. FORM_HANDLER_2_URL = https://sercante.com/l/876401/2020-11-30/gny9df
  3. FORM_HANDLER_3_URL = https://sercante.com/l/876401/2020-11-30/gny9dk
  4. FORM_HANDLER_4_URL = https://sercante.com/l/876401/2020-11-30/gny9dh

The final block of code from our example looks like this:

<script>
var fieldsConfig = [
{//this block of lines is for option 1
    fieldValue:’%%Webinar_topic_1{js}%%’,
    checkboxVal:’Webinar Event 1′,
    endpointUrl:’https://sercante.com/l/876401/2020-11-30/gny9d5&#8242;
},
{//this block of lines is for option 2
    fieldValue:’%%Webinar_topic_2{js}%%’,
    checkboxVal:’Webinar Event 2′,
    endpointUrl:’https://sercante.com/l/876401/2020-11-30/gny9df&#8217;
},
{//this block of lines is for option 3
    fieldValue:’%%Webinar_topic_3{js}%%’,
    checkboxVal:’Webinar Event 3′,
    endpointUrl:’https://sercante.com/l/876401/2020-11-30/gny9dk&#8217;
},
{//this block of lines is for option 4
    fieldValue:’%%Webinar_topic_4{js}%%’,
    checkboxVal:’Webinar Event 4′,
    endpointUrl:’https://sercante.com/l/876401/2020-11-30/gny9dh&#8217;
}
];
// DO NOT CHANGE BELOW THIS LINE
var email = encodeURIComponent(‘%%email{js}%%’);
var thankYouContainer = document.querySelector(‘.form-thank-you’);

fieldsConfig.forEach(function (field) {
  if (field.checkboxVal === field.fieldID) {
    var iframe = document.createElement(‘iframe’);
    iframe.setAttribute(‘height’, ‘1px’);
    iframe.setAttribute(‘width’, ‘1px’);
    iframe.setAttribute(‘src’, `${field.endpointUrl}?email=${email}`);
    thankYouContainer.append(iframe);
  }
});
</script>

Step 6: Just kidding there is no step six

While it’s technically true for the purpose of this blog post, there is no step 6, butif there was it would look something like this:

Test, Test, Test.
Make sure to thoroughly test your landing page, form and JavaScript to ensure everything is working as expected.

And there you have it. Our future prospects will be able to select multiple webinar events with our form checkboxes. Then our unique form actions will run based on the prospect action of selecting one or more of the form elements.

Let’s take a moment to recap what we’ve learned today:

  • We created a custom solution that allows multiple completion actions to fire based on a value recorded by Pardot form in 5 easy steps. 
  • In our imaginary situation we want a user to be able to register for multiple webinar events in one simple form. 
  • We started by creating Prospect Fields and connected form inputs to them. 
  • After linking all the values and Prospect fields we created Pardot form handlers for each form element we want to interact with. 
  • Next we copied a bit of boilerplate JavaScript into the forms Thank you content section and updated the code replacing the generic values with our real content. 
  • Finally we made sure to test all the things and confirm everything is working correctly.

Huge congratulations for making it all the way through the Dragon den of awesome Pardot solutioning with us. Give yourself a big pat on the back and make sure everyone at your company knows how awesome you are with your newly gained wizardry. Come back to visit any time. 

If you have any questions or would like help solving other interesting ideas in Pardot don’t hesitate to reach out to the amazing team of talent individuals and dragons that make up Sercante.

The post Single Pardot Form, Multiple Completion Actions appeared first on The Spot For Pardot.

By |2021-01-25T14:06:00+00:00January 25th, 2021|Categories: Data Management, Email Marketing, Event Management|

Single Pardot Form, Multiple Completion Actions

Have you ever wished you could have multiple conditional form completion actions in a single Pardot form?

If you answered “OF FREAKIN’ COURSE I HAVE”, you’re in luck because I am going to teach you how in just 5 easy steps.

As you know it is super easy to add a single completion action to a Pardot form. But what would you do if you wanted to add multiple completion actions to a form and tie those actions to specific form elements. 

I know, it’s a head scratcher right (and you’ve probably heard: “Nope, can’t do it”)? Never fear I’ll guide you through the dragon’s den.

When we combine the magic of Pardot together with the superpowers of JavaScript anything is possible.

But, before we take our first step down the path to knowledge, let’s set the scene. Imagine that we are promoting multiple webinar events with a single registration form.

In this scenario, we want to have one landing page that has a list of upcoming webinars. Visitors can choose one or more of those webinars to attend and only need to fill out one Pardot form. Then, we need that registration information to register the visitor (now a Prospect) in the appropriate GoToWebinar sessions.

So where do we start?

Step 1: Configure the form and form handlers.

Our first step is to identify the field(s) we will use on the form and to which form elements we will apply the conditional completion actions. 

We need to note the API field name (field ID) for the field(s) we’ve selected. These can be found with one of the following navigations depending upon your chosen experience:

  • In Pardot (classic), navigate to Admin | Configure Fields | Prospect Fields.
  • In the Pardot Lightning app, click the Pardot Settings tab, then click Object and Field Configuration | Prospect Fields.

For our scenario we’ll create 4 custom fields for 4 upcoming webinars so our future prospects can register for any or all of our webinar options.

Our list of the unique Field IDs:

  1. Webinar_topic_1
  2. Webinar_topic_2
  3. Webinar_topic_3
  4. Webinar_topic_4

Keep these IDs somewhere you can access them easily. They’ll be needed in our final step.

Step 2: Create a Pardot form (or edit an existing one)

Make sure to select the fields that you wish to use for your completion actions and make sure they are checkbox fields, text fields, or radio buttons. If they are Checkbox fields, they must have EXACTLY ONE selection option. When selecting your inputs make sure to uncheck the required option. 

For our scenario, I’ve created 4 custom checkbox fields and added each to the form. Each has exactly one value, and was step up like this:

First select the Prospect Field “Webinar Topic 1”, select type of Checkbox and Data Form of “Text”. 

Now click on the Values tab. Enter the Value that you want to display on the form (in this case, our Value is Webinar Event 1). Keep a record of this value handy. We’ll need it in step 5 when we start customizing our JavaScript.

Note that for each form field value on which you want to apply a unique completion action, you will need to create a unique form handler. In our example we’ll be using 4 completion actions and therefore 4 form handlers.

These are our Field ID and Value pairs so far:

  1. FieldID: Webinar_topic_1
    Form Value: Webinar Event 1
  2. FieldID: Webinar_topic_2
    Form Value: Webinar Event 2
  3. FieldID: Webinar_topic_3
    Form Value:  Webinar Event 3
  4. FieldID: Webinar_topic_4
    Form Value: Webinar Event 4

I know the naming is not 100% awesome. I want to keep it generic though so Fields can be reused as needed. If we gave each one very specific names our solution would be too brittle (meaning easy to break, hard to scale). 

Step 3: Create a Pardot form handler for each field value you’d like to apply completion actions.

Start by only adding the email field to the form handler. Then, add the corresponding completion action for each value. Save. Take note of the form handler endpoint URL (ideally the HTTPS version) as you’ll need this in step 5 and match it to the related Values from the form.

As we continue with our multiple webinar example, I’ve repeated the step 4 times and created a form handler to use for each of the 4 custom fields created in step 2.

Here is a list of the 4 form handlers and their endpoint URLs and how they map to the field values set up above:

  1. FieldID: Webinar_topic_1
    Form Value: Webinar Event 1
    Form Handler URL: https://sercante.com/l/876401/2020-11-30/gny9d5
  2. FieldID: Webinar_topic_2
    Form Value: Webinar Event 2
    Form Handler URL: https://sercante.com/l/876401/2020-11-30/gny9df
  3. FieldID: Webinar_topic_3
    Form Value:  Webinar Event 3
    Form Handler URL: https://sercante.com/l/876401/2020-11-30/gny9dk
  4. FieldID: Webinar_topic_4
    Form Value: Webinar Event 4

Form Handler URL: https://sercante.com/l/876401/2020-11-30/gny9dh 

Step 4: Copy this script and paste into your Pardot form’s Thank You Code:

Copy the code below and paste directly into the Thank You “Code” in Pardot’s “Completion Actions” tab. 

<script>
var fieldsConfig = [
{//this block of lines is for option 1
    ‘fieldValue’:’%%your_field_id_1{js}%%’,
    ‘checkboxVal’:’VALUE_1′,
    ‘endpointUrl’:’FORM_HANDLER_1_URL’
},
{//this block of lines is for option 2
    ‘fieldValue’:’%%your_field_id_2{js}%%’,
    ‘checkboxVal’:’VALUE_2′,
    ‘endpointUrl’:’FORM_HANDLER_2_URL’
}
//add more blocks if you need them
];
// DO NOT CHANGE BELOW THIS LINE
var email = encodeURIComponent(‘%%email{js}%%’);
var thankYouContainer = document.querySelector(‘.form-thank-you’);

fieldsConfig.forEach(function (field) {
  if (field.checkboxVal === field.fieldID) {
    var iframe = document.createElement(‘iframe’);
    iframe.setAttribute(‘height’, ‘1px’);
    iframe.setAttribute(‘width’, ‘1px’);
    iframe.setAttribute(‘src’, `${field.endpointUrl}?email=${email}`);
    thankYouContainer.append(iframe);
  }
});
</script>

After pasting the code into the thank you code input area make sure the “Always display form after submission” checkbox is checked — otherwise this method will not work and the script will run in a loop! Which will cause a total computer meltdown and all pictures of cats on the internet to disappear. Ok that last bit is a small exaggeration but seriously don’t forget the checkbox. You’ve been warned.

Step 5: Time to modify some JavaScript

The code we pasted into our thank you content in step 4 is a bit of boilerplate to get us started. It will need to be updated for each unique use. I know it’s a bit daunting but we’ll take it slow and be very mindful of the characters we adjust.

For our webinar scenario I’ve duplicated the first code block two additional times for a total of 4 blocks of field/value/url. This is a necessary step because we have 4 form handlers and custom fields to match up. If we were only working with 2 we would not need to duplicate this code block. 

Notice how each code block is contained in a set of curly braces and separated by a comma. There is no trailing comma on the last block:

{//this block of lines is for option 1
    fieldValue:’%%your_field_id_1{js}%%’,
    checkboxVal:’VALUE_1′,
    endpointUrl:’FORM_HANDLER_1_URL’
},
{//this block of lines is for option 2
    fieldValue:’%%your_field_id_2{js}%%’,
    checkboxVal:’VALUE_2′,
    endpointUrl:’FORM_HANDLER_2_URL’
},{//this block of lines is for option 3
    fieldValue:’%%your_field_id_3{js}%%’,
    checkboxVal:’VALUE_3′,
    endpointUrl:’FORM_HANDLER_3_URL’
},{//this block of lines is for option 4
    fieldValue:’%%your_field_id_4{js}%%’,
    checkboxVal:’VALUE_4′,
    endpointUrl:’FORM_HANDLER_4_URL’
}

First thing we need to update is your_field_id_1. Let’s replace that with the Pardot field ID that you want to perform completion actions on. A couple of things to note: 

  1. the name must be wrapped in %%, and
  2. a {js} modifier must be added at the end of the name. 
  3. For example, if your field id is custom_field_1, it should look like %%custom_field_1{js}%% not %%custom_field_1%% or %custom_field_1{js}%

Now that we know what to watch out for let’s start making edits. First we’ll replace the “your_field_id” placeholders with the values of prospect field IDs (step 1):

  1.  %%your_field_id_1{js}%% = %%Webinar_topic_1{js}%%
  2.  %%your_field_id_2{js}%% = %%Webinar_topic_2{js}%%
  3. %%your_field_id_3{js}%% = %%Webinar_topic_3{js}%%
  4.  %%your_field_id_4{js}%% = %%Webinar_topic_4{js}%%

Next, we replace the placeholder values for “VALUE”. Using our example, the values are what we used in the Pardot form checkbox value tab – Please note that if there are special characters like ampersands (&) in the form values, they MUST be replaced with HTML entity code like: &amp; (that’s the & symbol followed by the letters amp and ended with a semicolon. Probably best to avoid special characters in the Values if at all possible):

  1. VAULE_1 = Webinar Event 1
  2. VAULE_2 = Webinar Event 2
  3. VALUE_3 = Webinar Event 3
  4. VALUE_4 = Webinar Event 4

Finally, each value that we’re searching for in our form will trigger a unique form handler. So, each code block will need to be updated with the correct endpoint URL. Make sure to match the correct endpoint URL with the correct form field.

Here the endpoints created in step 3 are used in place of the FORM_HANDLER_1_URL variables. 

  1. FORM_HANDLER_1_URL = https://sercante.com/l/876401/2020-11-30/gny9d5
  2. FORM_HANDLER_2_URL = https://sercante.com/l/876401/2020-11-30/gny9df
  3. FORM_HANDLER_3_URL = https://sercante.com/l/876401/2020-11-30/gny9dk
  4. FORM_HANDLER_4_URL = https://sercante.com/l/876401/2020-11-30/gny9dh

The final block of code from our example looks like this:

<script>
var fieldsConfig = [
{//this block of lines is for option 1
    fieldValue:’%%Webinar_topic_1{js}%%’,
    checkboxVal:’Webinar Event 1′,
    endpointUrl:’https://sercante.com/l/876401/2020-11-30/gny9d5&#8242;
},
{//this block of lines is for option 2
    fieldValue:’%%Webinar_topic_2{js}%%’,
    checkboxVal:’Webinar Event 2′,
    endpointUrl:’https://sercante.com/l/876401/2020-11-30/gny9df&#8217;
},
{//this block of lines is for option 3
    fieldValue:’%%Webinar_topic_3{js}%%’,
    checkboxVal:’Webinar Event 3′,
    endpointUrl:’https://sercante.com/l/876401/2020-11-30/gny9dk&#8217;
},
{//this block of lines is for option 4
    fieldValue:’%%Webinar_topic_4{js}%%’,
    checkboxVal:’Webinar Event 4′,
    endpointUrl:’https://sercante.com/l/876401/2020-11-30/gny9dh&#8217;
}
];
// DO NOT CHANGE BELOW THIS LINE
var email = encodeURIComponent(‘%%email{js}%%’);
var thankYouContainer = document.querySelector(‘.form-thank-you’);

fieldsConfig.forEach(function (field) {
  if (field.checkboxVal === field.fieldID) {
    var iframe = document.createElement(‘iframe’);
    iframe.setAttribute(‘height’, ‘1px’);
    iframe.setAttribute(‘width’, ‘1px’);
    iframe.setAttribute(‘src’, `${field.endpointUrl}?email=${email}`);
    thankYouContainer.append(iframe);
  }
});
</script>

Step 6: Just kidding there is no step six

While it’s technically true for the purpose of this blog post, there is no step 6, butif there was it would look something like this:

Test, Test, Test.
Make sure to thoroughly test your landing page, form and JavaScript to ensure everything is working as expected.

And there you have it. Our future prospects will be able to select multiple webinar events with our form checkboxes. Then our unique form actions will run based on the prospect action of selecting one or more of the form elements.

Let’s take a moment to recap what we’ve learned today:

  • We created a custom solution that allows multiple completion actions to fire based on a value recorded by Pardot form in 5 easy steps. 
  • In our imaginary situation we want a user to be able to register for multiple webinar events in one simple form. 
  • We started by creating Prospect Fields and connected form inputs to them. 
  • After linking all the values and Prospect fields we created Pardot form handlers for each form element we want to interact with. 
  • Next we copied a bit of boilerplate JavaScript into the forms Thank you content section and updated the code replacing the generic values with our real content. 
  • Finally we made sure to test all the things and confirm everything is working correctly.

Huge congratulations for making it all the way through the Dragon den of awesome Pardot solutioning with us. Give yourself a big pat on the back and make sure everyone at your company knows how awesome you are with your newly gained wizardry. Come back to visit any time. 

If you have any questions or would like help solving other interesting ideas in Pardot don’t hesitate to reach out to the amazing team of talent individuals and dragons that make up Sercante.

The post Single Pardot Form, Multiple Completion Actions appeared first on The Spot For Pardot.

By |2021-01-25T14:06:00+00:00January 25th, 2021|Categories: Data Management, Email Marketing, Event Management|