Slack Markdown, @Mentions, and other Tricks for the New MCAE (Pardot) Slack Connector

Pardot Slack

Now that the Pardot (Marketing Cloud Account Engagement / MCAE ) Slack connector is out of beta, more people are probably willing to give it a go. Especially in combination with the new Conditional Completion actions, this opens up a whole new realm of interesting possibilities. Let’s explore one important one: existing customers/existing Salesforce records.

We all know that existing customers have a tendency to just fill out forms instead of calling or emailing their respective contacts, so in these circumstances it’s important to make sure that people know that an existing customer has filled out an important form.

This is where we can use conditional completion actions– to identify prospects that are already assigned, as one example, or prospects with a specific account field such as one that defines them as some tier or customer (by definition if they have an account, they are assigned, and a contact). The point being we can identify with a conditional action certain types of prospects we want to send a certain type of Slack notification.

The Slack notification is available on anything that includes a completion action, and the conditionality allows us to customize under what conditions it should appear. Setting up a notification looks like this:

The great thing about Slack notifications is that we get the use of merge fields in the message– something we’ve been asking for in Salesforce tasks for…well, forever– so using those merge fields we can create all kinds of magic in our Slack channel. Let’s first look at what the basic channel notification looks like:

1. The name of the Pardot prospect (which is clickable, and takes you to the Pardot Lightning record page)

2. The name of the Pardot object that triggered the notification (so take care what you call them!)

3. The area where you can put in your message and your merge tags. The example indicates that Finance was generated dynamically by a merge tag.

4. Four pieces of additional prospect data (if they exist)

So, obviously you could just use merge tags to add other pieces of data from your standard or custom prospect or account that might be relevant to the notification. As you can see from the example we can also drop in some emojis as well. This is done by using Slack markdown formatting in your message. I’m not going to cover how to get 🙂 emoji into your message, you can read the linked article and figure that one out.

Let’s think beyond clapping hands and smiley faces, toward how do we make these notifications truly useful? For that we will need a combination of Slack markdown formatting and some Salesforce magic in our message content.

Link to the Salesforce Record in the Slack Notification

As we noted, the link automatically presented in the notification goes to the Pardot record page. But what if we want to link to the lead or contact record in addition?

Since Slack will automatically create a link when we insert something that looks like a link, we need to create a method to dynamically build a link to the lead or contact record.

Now, we already have a merge field in Pardot called {{Recipient.ID}} and we can use it in our Slack notification in combination with the root of our salesforce domain:
https://mydomain.my.saleforce.com/lightning/{{Recipient.ID}}

Your Salesforce domain’s format might be different, them main thing is use your custom root plus /lightning/ in constructing your link and it will redirect to the proper record page.


This will render in Slack as a clickable link to the Salesforce record, not the Pardot one. This is especially useful when your Slack audience are sales people.

@Notify Specific People in a Slack Completion Action

You may have guessed by now that you can use markdown to notify the whole channel of a new message, by using <!here> to notify active members of the channel, or <!channel> to notify all members, active or not, but what if you wanted to get really specific, and notify the owner of an existing record that an action has taken place?

This takes a bit of doing, but it does work.

The first thing to understand it we can’t use the person’s name or email to mention them. We must use their slack ID, which can be found by going to the user’s profile, pressing the button with three dots, and you’ll get a menu where you can copy the member ID, which will be something like this: U07KAJL9JA3

So now we have to get that Member ID associated to your Pardot prospects, so we know the owner’s Slack ID for that record, which means we have to get that ID synced to the Pardot prospect via a Salesforce Lead and Contact record, and we have to do this via the record owner.

The first thing we need to do is create a custom field on the Salesforce USER object to store the Slack ID associated with each user (owner). We’ll then use this on Leads and Contacts to construct a formula field referencing the Owner’s Slack ID value that we can sync with Pardot.

Assuming this Custom user field is called Slack_ID__c, then our formula field on leads and contacts would be:

Owner:User.Slack_ID__c

Then, we can create a prospect field in Pardot to sync this value to in order to use it as a merge field. Incidentally, we can use this same method on Accounts with a custom Pardot/MCAE field on the account object in order to notify the Account owner! Notifying the account owner is something that you can’t generally do with Pardot, so this could be quite useful. You’ll want to get all your Slack ID’s on your users and then do a force sync of the entire database to get these values populated onto the respective Pardot records.

A quick note on formula fields and Pardot. Formula fields are a special class of fields in Salesforce where the value only exists when the record is requested. So a calculation of the field only happens when the record is accessed. Because of this characteristic, Pardot does not sync formula fields, or changes to them, unless some other field on the record is synched, and the formula result stored in Pardot remains static until the next sync occurs. For something like this where the formula result is essentially static, it doesn’t matter quite as much. But it’s worth knowing and understanding this behavior. A workaround for this behavior would be to use a Salesforce flow to populate a static field with this value, around or at the time of record creation, and any time the ownership changes, since this value is fixed.

So now that we have access to the Slack ID of the record owner on our Pardot prospect record, we can now create a notification with our merge tag and the Slack markdown that will render as an @mention in our generated notification.

<@{{Recipient.Owner_Slack_ID__c}}>

Incidentally, this use case is exactly the sort of thing that I was telling Pardot product management when they asked me about what I envisioned for extending the reach of HML to other objects. If we could access a custom user field, this entire workaround with the formula fields becomes unnecessary, we could just access the Slack ID custom field directly.

You can also of course use the format <@SlackID> with a fixed ID value for certain types of notifications that need to be directed only to a specific person, such as for event registrations that need to be directed solely to the event organizer.


Conclusion:
The new Slack connector opens up all kinds of interesting use cases for another notification method, especially for organizations that are evolving to a post-email operating model. These methods help improve notifications so that they are directed at relevant individuals, and not just another notification among a sea of others.

 


 

This Pardot article written by:  Bill Fetter

Unfettered Marketing

A collection of random thoughts on how people, places and things in our fascinating world connect to sales and marketing, and what we can learn from it.

Original Pardot Article: https://www.unfetteredmarketing.com/post/slack-markdown-mentions-and-other-tricks-for-the-new-mcae-pardot-slack-connector

Find more great Pardot articles at https://www.unfetteredmarketing.com/blog

Pardot Experts Blog

We have categorized all the different Pardot articles by topics.

Pardot Topic Categories

More Pardot Articles

See all posts

 


 

This Pardot article written by:  Bill Fetter

Unfettered Marketing

A collection of random thoughts on how people, places and things in our fascinating world connect to sales and marketing, and what we can learn from it.

Original Pardot Article: https://www.unfetteredmarketing.com/post/slack-markdown-mentions-and-other-tricks-for-the-new-mcae-pardot-slack-connector

Find more great Pardot articles at https://www.unfetteredmarketing.com/blog