Categories

Getting Started

Learn through 101 guides and easy solutions.

External Actions: The Long-Awaited Pardot Feature

External Actions: The Long-Awaited Pardot Feature

min. reading

Alas, Salesforce External Actions for Pardot is finally here.

Until now, our options to have Marketing Cloud Account Engagement (Pardot) trigger a third-party system have been limited to either: pre-existing connectors or syncing to Salesforce and relying on a Salesforce-side integration. 

With the Salesforce Winter ‘23 release, External Actions gives us the capability to integrate into any third-party system and do cool things.

Note: This feature is available to Plus, Advanced, and Premium editions of Pardot.

The Lowdown on External Actions for Pardot

External Action allows Pardot to do things like: 

  • Send an SMS message via Twilio or MogliSMS
  • Create a new Salesforce record (such as Lead, Opportunity, any Object!)
  • Send information to your favorite Star Wars API
  • Register a Prospect in another system
  • and whatever else you dream up! 

While there are some considerations (detailed later in this post), External Actions are a great way to plow through the barriers that have prevented you from automating your entire workflow. 

It’s important to note that there’s a similarly named feature called External Activities.  With Pardot External Activities, you can receive data from third-party systems to use in Pardot. With External Actions, you can send data to third-party systems so they can do cool things.

How does a Pardot External Action work?

Once an External Action is built, it will appear as an Action option in an Engagement Studio Program. Depending on the action, you may need to provide additional information through text inputs. You can use HML Merge Tags here, too!

When the Engagement Studio Program is running and hits your action, Pardot will call into Salesforce (via API behind the scenes), and call the functionality.  It does this in a “fire and forget” manner, so there’s no error handling inside your Engagement Studio Program. It is also not “bulkified,” meaning it will make an API call for EACH Prospect. So, you may need to take the API limits of Salesforce AND your external system into consideration.

For this blog post, we built an External Action that tracks Favorite Color. 

Once you pick “Track Favorite Color” you have the ability to provide a value. In the screenshot below, we are using HML to pull this value from a Prospect’s record, though you can also provide static text if you want to say everyone’s favorite color is Sercante Green.

How can I set up a Pardot External Action?

To set up an External Action, there are 2 key pieces:

  1. You need something in Salesforce that can “do the thing” you want. It can be any of the following:
    • Autolaunched Flow
    • External Service
    • APEX InvocableMethod
  2. Marketing App Extensions have been configured inside Salesforce Setup

No-code options to configure Pardot External Actions

If you are looking to integrate with a third-party system, you might luck out on #1 and be able to leverage something built by that third-party in their Salesforce package. This could be your quickest way to being able to use an External Action.

If this isn’t available for you, first look at seeing if you can make an Autolaunched Flow that can meet your needs. This option is also great for creating Salesforce Records of any object type (keeping in mind you are limited to text input types in Pardot).

When working with another API, and if that API supports the OpenAPI protocol, you can use Salesforce External Services to hook things up. That will give you everything you need.

 The Trailhead Module on External Services is a great way to learn how to get started.

Code option to get started with Pardot External Actions

If the above aren’t an option, it’s time to break out your development skills (or work with someone who has them). We’ve got a sample APEX class here that gives you all the structural ingredients you need to make this work, you just have to fill in what you want it to actually do.

public class MyNewExternalAction {

    // Classes to be used by the Flow Designer
    public class FlowRequest {
        @InvocableVariable(label='Prospect Email')
        public String email;
        @InvocableVariable(label='Favorite Color')
        public String favColor;
        // add any other String or number-based attributes you need
    }

    // If you are calling an External API, this would be a great
    // place to put Classes to represent the response
    public class ApiResponse {

    }
    
    @InvocableMethod(callout=true label='My New External Action')
    public static void performActions(List<FlowRequest> flowRequests) {
        System.debug('Start performActions');
        // at time of writing, Pardot DOES NOT BATCH these, it's always 1
        // per batch
        FlowRequest flowRequest = flowRequests.get(0);
        System.Http http = new System.Http();

        try {
            // This is where you put what you want to do!
            // you can call another API, call other APEX
            // read & write Salesforce Objects.. Whatever you want

        } catch (Exception e) {
            System.debug('There was an issue executing the request');
            System.debug(e.getMessage());
            throw e;
        }
        System.debug('Done performActions');
    }
}

Once you have the functionality ready, you need to tell Pardot about it. This is done by configuring Marketing App Extensions inside Salesforce Setup.

Configuring the Marketing App Extensions

This is the “glue” that ties everything together and makes External Actions usable by Pardot. There are a few easy things to configure to make this “glue” work.

First, we need the Top-Level Marketing App Extension. Be careful with these, as you cannot delete them once created (so don’t go making a bunch of test records!).

  1. In Salesforce Setup, search for Marketing App Extensions
  2. If you don’t have one, create New
    • Provide an Extension Name and an API Name, as well as check “Active in Automations”
    • Click Save

Next, we need to enable this for Business Unit(s).

  1. With the Extension still open, go to the Related tab
  2. Click New beside Business Unit Assignments
  3. Add an assignment for each Business Unit you want this extension to be available for

Now we can create the External Action.

  1. With the Extension still open, go to the Related tab
  2. Click New beside Actions
  3. Provide an Action Name (this will be the name visible when selecting it from Engagement Studio)
  4. Provide an API Name (this does not auto-fill like you may be used to)
  5. (Recommended) Provide a description of what this Action does, since you might not remember in three months
  6. Search for your functionality. Once selected, the Action Schema will auto fill with JSON that you need to review and likely modify
  7. Review & Modify the Action Schema
    • Properties – this contains details about the parameters/values that you want to provide to the Automation.
      • type:  currently can only be “string” and “number”
      • title: the Label of the input when viewing in Engagement Studio
      • value: Allows you to provide a default value. You can use HML merge tags here!
      • Note: Sometimes when working with Flows, you might have properties that are not relevant (like flow interview id). You should remove them from Properties (assuming they aren’t an input variable that your flow requires to function)
    • View Components – this allows you to specify which properties you want to provide inputs for in Engagement Studio. Currently, definition should always be “lightning/control” and “scope” should always point to one of the properties
    • Required – a list of properties that would be required from within Engagement Studio
  8. Action Params auto fills, no changes needed
  9. When you are ready to have this available in Pardot, check the Active in Automations box.

Here’s what it would look like for our sample APEX class above. Note that we’ve chosen to only display the favorite color field in the Engagement Studio, though we are passing the Prospect’s email behind the scenes.

Save the Action and, after a few moments, it will be available for testing!

Can I use an External Action to do things in Pardot?

Imagine being able to take action on another Prospect record from an Engagement Studio Program! While not natively available within the platform, you could build this when combining External Actions with our Free package Flow Actions for Pardot. After setting up the package, you would only need to configure the Marketing App Extension to have any of our Flow Actions available as an External Action.

Create Unified Experiences with Pardot External Activities

External Actions are available with the Winter ‘23 release. These Actions, as well as External Activities, allow Marketers to automate across platforms for a more unified experience. 

How do you plan on using these features to better automate your processes? Tell us in the comments!

Subscribe to The Spot

Hidden
Hidden
Hidden
Hidden
This field is for validation purposes and should be left unchanged.

Upcoming Salesforce Events

Salesforce Training Courses

Categories

Top 5 Recent Posts

  • Adam Erstelle is a Developer with Sercante. He loves learning about and solving really interesting challenges with Pardot and Salesforce often by building some cool tools.

Leave Your Comment

Related Articles

Bot Single Post