Fixing the State/Country Mismatch Between Salesforce & Pardot

BY MIKE CREUZER

Valentines day is the perfect day to give somebody something special. So I wanted to share a resource with the Pardot community to address a longstanding pain point:

Turning both “Auto-fill Prospect Location Data from IP Address” in Pardot AND using Standard State & Country picklists in Salesforce at the same time.

The Problem

In case you haven’t come across this challenge previously, here’s a quick rundown.

Pardot has a super handy feature that allows you to grab the state and country from the user’s IP address and populate those prospect fields, even if the user doesn’t input it in a form. This can be enabled with a simple checkbox in Account Settings:

Auto Fill

Salesforce has ANOTHER super handy feature that allows you to standardize state and country picklists — so you don’t have to control for multiple user defined values (i.e. IL, Il. I.L., Illinois all referring to the same state.)

The issue? Pardot autofills abbreviated state values, while Salesforce spells them out. So if you’re trying to use both of these features — brace yourself for the sync errors.

The Solution

We put together a little something using the Pardot API to fix this:

https://github.com/sercante-llc/Pardot-Country-State-Corrector

This is some API code that will run every 10 minutes and take the 2 letter US state that Pardot is populating and change that to a value Salesforce will accept. It will also change US to United States.

Being that it runs every 10 minutes, Salesforce synced records with Pardot entered state/country values will appear in the error queue briefly, but when the code run they will be quickly corrected and successfully synced to Salesforce.

You can run this code on your own if you have the technical chops. Or share this post and GitHub link with your preferred vendor, and they should be able to follow the step-by-step instructions and implement it for you fairly quickly and inexpensively.

If you need back up, the Sercante team can assist as well — just shoot me an email at creuzer@sercante.com.

This is designed to be run in a Heroku instance, keeping your Salesforce data within the Salesforce ecosystem (pricing starts at $7 month).

Heroku Pardot Pricing.PNG

A Note on GDPR Compliance

For those of you who are held to GDPR compliance, an added benefit of hosting on a Heroku Enterprise account is that it’s under a Salesforce contract, and thus the Salesforce Data Processing Agreement.

The code doesn’t store any Personally Identifiable Information, and only requests the minimum amount of data needed to do the processing it is tasked with. Even the limited logging it does do uses the Pardot ID and is quickly forgotten by the Heroku system architecture.

So, enjoy your GeoIP data and Salesforce picklists!

Leave a Reply