✕
Skip to content
Salesforce Ben
  • Events
  • Career
  • AppAssessor
  • Salesforce News
  • Articles by Role
    • Admins
    • DevOps
    • Developers
    • Marketers
    • Consultants
    • Architects
    • Business Analysts
  • Where to Start
  • Salesforce Certification List
  • How to Get Certified
  • Free Salesforce Practice Exams
    • Admin Practice Exam
    • Platform App Builder Practice Exam
    • Platform Developer 1 Practice Exam
  • How to Get a Job in Salesforce

Find us on:

Salesforce Ben
  • Events
  • Career
  • AppAssessor
  • Salesforce News
  • Articles by Role

      Articles by role:

    • Admins
    • DevOps
    • Developers
    • Marketers
    • Consultants
    • Architects
    • Business Analysts
    • Featured

      The Great Salesforce Job Market Reset

      By Sasha Semjonova

      December 09, 2024
      How to Avoid Bad Salesforce Partners: The Three-Question Test

      By Jon Cline

      January 08, 2025
  • Newsletter
  • user
    • Courses Login
  • Events
  • Career
  • AppAssessor
  • Salesforce News
  • Articles by Role

      Articles by role:

    • Admins
    • DevOps
    • Developers
    • Marketers
    • Consultants
    • Architects
    • Business Analysts
    • Featured

      The Great Salesforce Job Market Reset

      By Sasha Semjonova

      December 09, 2024
      How to Avoid Bad Salesforce Partners: The Three-Question Test

      By Jon Cline

      January 08, 2025

What's trending

Guide to Salesforce NPSP Soft Credits
Narrative Science to Join Salesforce (and Tableau) in New Acquisition
Introducing Trailblazer Stamps – Salesforce Event Attendance Awards
Dynamic Interactions: Deep Dive Tutorial
Learn Anywhere With Trailcast: Salesforce’s Audio Learning Experience

UPCOMING EVENTS

WITness Success

19
Aug

Louisville, KY

Community

Dreamforce 2025

14
Oct

San Francisco, CA

Salesforce Official

Florida Dreamin’ 2025

05
Nov

Clearwater Beach, FL

Community
See more
Share
Marketers / Account Engagement (Pardot)

A/B Test Emails in Pardot Engagement Studio

By Lucy Mazalon

August 20, 2019

A/B Testing compares how two versions of an email perform against each other, which helps you optimise your email campaigns, and ultimately send email content that resonates best with your audience.

A/B testing in Account Engagement (Pardot) Engagement Studio is one of the most appealing features which marketers tap into for measuring email version performance in terms of opens and clicks. However, you already know that A/B Testing in Pardot is only available when sending list emails, which leads me to ask…

Can You A/B Test in Pardot Engagement Studio?

Yes, you can – and I plan to show you a trick to get A/B Testing setup for Engagement Emails too (sent via Engagement Studio). The solution is relatively simple:

  • A number field assigns each Prospect a number from 0-9
  • The Engagement Studio has a rule step that send Prospects down one of two paths according to their reference.
  • Each path has a different version of the email
  • Use the Engagement Studio reporting tooltips to assess performance.

The solution is somewhat similar to round-robin assignment setup for Lead Assignment; instead of distributing leads to different sales reps, we instead will be distributing Prospects to different Engagement Flow paths.

Let’s get started.

Step 1: Create Autonumber Field

The autonumber field type is only available on the Salesforce side, so Salesforce setup is our first point of call.

In Salesforce Setup, find your Leads section in the Object Manager.

 

Create a new field, and select ‘autonumber’ as the type:

For the field name I chose: Lead number, but you may have other ideas.

Then, fill in the rest:

Display Format: {0}

Starting number: 0

Check: Generate Auto Number for existing records

For the description, suggest something like: Unique number for each lead. This helps keep your Salesforce org documented, and could save your field from getting deleted!

You may see this pop-up window – click ok, it’s nothing to worry about!

Repeat these steps for contacts.

What you’ve now created, is a field that will generate a unique number for each lead record.

Step 2: Create Formula Field

Create a new field with type ‘Formula’.

Name your field, I chose: Email Reference here.

Choose output type as ‘number’.

Scroll down and ensure you have 0 decimal places.

Paste the following formula into the formula box:

MOD(VALUE({! Lead_number__c}) ,9)

For the description, I suggest something like: Reference for email testing in Engagement Studio. Again, an important place to fill in information!

Set the field permissions and decide whether you want this field to the page layouts (probably not necessary), and then save.

Repeat the steps above for contacts.

What you’ve now created, is a field that will generate a number from 1 to 9. By pulling a simple report, you can check if the formula has worked for you:

Step 3: Map with Prospect Field

Go into Pardot field configuration settings, and create a new custom field.

You will want to map this to the Salesforce field, and choose Salesforce as the master.

You will be asked if you want to queue prospects for a full sync – I recommended you do!

Step 4: Add Rule Step in Engagement Studio

In Engagement Studio flows, Rule Steps send Prospects down one path or another according to some criteria you set.

 

Here, we will use the number stored in a custom field on the Prospect, to send them down one pathway or another:

Rule: Prospect Custom Field

Choose your ‘Email Reference’ field.

Say field value is Less than: 5

By saying ‘less than’ 5, this will include values: 0, 1, 2, 3 and 4.

Step 5: Add Email Actions

Add an Action step with one version of your email template for each branch.

 

Step 6: Reporting

Once you start the Engagement Studio program, the ‘report’ tab will become available. On this view, you can use the Engagement Studio reporting tooltips to assess performance, and compare between the two paths.

 

Summary

As the most eagle-eyed of you may have clocked, this solution will never be a perfect split of Prospects coming through. This is because the numbers are generated randomly for your Prospect database as a whole. With the laws of probability, you are likely to get a reasonable spread, but it may be that your segment contains an overwhelming number of one number, and none of another.

That being said, the solution has a lot of potential. By setting your autonumber from 0-9, you have the option to test up to 10 versions of the email! With the Engagement Studio date filter*, you can see A/B testing over time, an additional advantage compared to the snapshot in time that the List Email A/B testing provides.

(*appears once the Engagement Studio has been started)

I hope that this article has been useful to your A/B testing in Account Engagement (Pardot) Engagement Studio efforts. I would love to hear anyone using this solution in inventive ways!

The Future

The IdeaExchange…and luckily, there’s already an idea live for you to upvote this functionality into the future roadmap: Vote here

The Author

Lucy Mazalon

Lucy is the Operations Director at Salesforce Ben. She is a 10x certified Marketing Champion and founder of The DRIP.

More like this:

Marketers

Your Guide to Daylight Saving and Time Zones in Marketing Cloud Engagement

By Alina Makarova

June 25, 2025
Marketers

Salesforce Marketing Cloud Next (vs. MCE, MCAE, MCG, MCA)

By Lucy Mazalon

June 16, 2025
Marketers

8 Takeaways from Salesforce Connections ’25

By Lucy Mazalon

June 16, 2025

Leave a Reply Cancel reply

Comments:

    Antonio Velasco
    January 31, 2020 9:11 pm
    Thanks for the tip, Ben, but this is not scalable for complex drip campaigns. It will take forever to build and maintain them. They just need to build the thing! :)
    Reply
    Ryan Engleman
    July 07, 2022 8:02 pm
    Great article as always, thank you! I have a solution that I believe results in an even 50/50 split, and wanted to share in case it helps anyone else out there struggling to AB test in Pardot: 1) Create autonumber field as directed in the article (Display Format: {0}) 2) Create formula field to return "A" if last digit of auto number ends with 0-4, or “B” if it ends with 5-9: IF(VALUE(RIGHT(AB_Test_Autonumber__c, 1)) < 5, "A", "B") 3) Map formula field to Pardot Now I can use the formula field in my dynamic list criteria, or include a rule in my Engagement Studios that sends prospects down one path if the formula field value is "A", or down another path if it isn't!
    Reply
    Katie
    July 14, 2022 4:23 pm
    This is amazingly helpful - thanks so much you just saved me!
    Reply
    John
    May 18, 2023 7:02 pm
    THANK YOU for this! HUGE thanks to Ben as well. Great help!
    Reply
    Poonam
    April 17, 2024 10:39 am
    Thanks for sharing the solution, Ben. My question is: What if a lead converts to a contact and is in the middle of an ES program—will their number be reassigned? Should we map the same number if a lead converts to a contact so it’s consistent? If we don't map the same number, do you see any impact?
    Reply

Newsletter:

    By signing up you agree to our Terms of Use and Privacy Policy.

    Find us on:

    Salesforce Ben

    Salesforce Ben
    Third Floor Library Building
    Sun Street
    Tewkesbury
    Gloucestershire
    United Kingdom
    GL20 5NX

    • Where to Start
    • Salesforce Certification List
    • How to Get Certified
    • Free Salesforce Practice Exams
      • Admin Practice Exam
      • Platform App Builder Practice Exam
      • Platform Developer 1 Practice Exam
    • How to Get a Job in Salesforce
    • Events
    • Career
    • AppAssessor
    • Salesforce News
    • Articles by Role
    • Admins
    • DevOps
    • Developers
    • Marketers
    • Consultants
    • Architects
    • Business Analysts
    • About Us
    • Contact Us
    • Write For Us
    • Influencer Program
    • Advertise With Us
    • Pledge 1%
    • Privacy Policy
    • Change Cookie Preferences
    • Log in to Courses

    © 2014-2025 SalesforceBen.com