MC Account Engagement

Set up an External Action

Think of this as the "bridge" between Pardot and our Package. Through App Extensions a new External Action is created, exposing the capability directly in Pardot.

This likely only needs to be done once in your org.

  • From Salesforce Setup, navigate to Marketing App Extensions using either Quick Find or Account Engagement > Marketing App Extensions.
  • Find an existing Extension, or create a New one. Beware: Extension records cannot be deleted, so be purposeful.
    1. Extension Name: Often best to use your Company Name, eg: ACME Extensions
    2. API NameAllow to auto fill
    3. Active in Automations: checked
    4. Description: A collection of Extensions for Pardot.
  • Next, add the Extension to the Pardot Business Unit(s) by creating records in the Business Unit Assignments related list.

For the External Action, there are a couple of approaches you can take.

  1. Create generic Actions, allowing the Pardot Admin to easily reuse them at their discretion. It will require them to properly use HML merge fields for dynamic messages. This option reduces the administrative overhead in Salesforce.
  2. Create Use Case specific Actions, making the action itself very clear on what kind of notification is being sent. Simplifies the use of each Action by the Pardot Admin at the cost of having to maintain multiple Actions in Salesforce.
  3. Create Teams Channel based Actions, reducing the need for a Pardot Admin to have to lookup the Salesforce Record Id of the Teams Channel.

As we are a fan of reduced administrative burden and trusting of our friendly Pardot admins, our example aims for the more generic approach. You may want to create 2 actions here, one for a Simple Message and another for the Structured Message.

  • Create the External Action by creating a new Action Type from its related list.
    1. Action Name: Send Simple Notification
    2. API Name: Allow to auto fill
    3. Description: Allows a Pardot Completion Action or Engagement Studio Program to send a notification into Microsoft Teams.
    4. Invocable Action: choose 1 of the 3 Teams Actions provided by our package. Selecting one will automatically populate the Schema and Parameters fields next.
  • Expand the Text Box for Invocable Action Schema
  • (Optional) You can provide default values within the "properties" section of the JSON object.
    • Provide the Channel Id by placing it as a value on line 6. You can grab this value from the Teams Channel Id field on the Teams Channel Salesforce record (noting this is different from the video)
      • Example - "value": "19:*******@thread.tacv2"
    • Provide a default message by placing the message string as a value on line 11.
      • Example - "value": "{{Recipient.FirstName}} has done something great!
  • (Optional) You can hide certain inputs from the Pardot screen by removing them from the view components section of the JSON document. This is ideal if you have provided a default value AND you don't want it to be changed.
  • Check the box for Active in Automations and Save the External Action.

Grant Permissions

With the capability exposed in Pardot, we need to make sure that the Pardot Connector is permitted to call the APEX classes.

This only needs to be done once in your org.

Permissions Needed: Customize Application.  Salesforce Docs

  • From Salesforce Setup, navigate to Users using either Quick Find or Users > Users.
  • Locate your Pardot Connector User, quite possibly the B2BMA Integration user.
  • Add the Teams Notification Sender Permission Set to the user.

Create the Notification

You are now able to use the Action within your Completion Actions or Engagement Studio Programs.

Completion Action

Pardot Role Needed: Admin or Marketing.  Salesforce Docs

  • Start from a Form or Form Handler that you want to send a notification when completed.
  • Edit the Form (Handler), go to Completion Actions
  • Click the Add Action button
  • Select Execute External Action
  • Search for the Action that you previously created, and select it.
  • Fill in the values, optionally using Merge Fields where appropriate.
    • If Channel Id is visible, in another browser tab find the Teams Channel record in Salesforce and grab the Teams Channel Id (starts with "19:" and ends with "thread.tacv2").
    • Video Example for Message below
  • Confirm & Save
  • Test!
**[{{Recipient.FirstName}} {{Recipient.LastName}}](%%ORG_URL%%/{{Recipient.ID}})** really wants to talk to us. Currently assigned to *{{Recipient.Owner.FirstName}} {{Recipient.Owner.LastName}}*.

Engagement Studio Program

Pardot Role Needed: Admin or Marketing.  Salesforce Docs

  • Start from an Engagement Studio Program.
  • Where you want to send the notification, add a new Action Element.
  • Search for the Action that you previously created, and select it.
  •  Fill in the values, optionally using Merge Fields where appropriate.
    • You will need to know what the HML Merge Field syntax and options are, there's currently no button to help you select it.
    • If Channel Id is visible, in another browser tab find the Teams Channel record in Salesforce and grab its Id from the URL.
  • Save the Action, then Save the Engagement Studio Program.
  • Test!