How Pardot HML Enables Us to Use Conditional Logic in Emails | MarCloud Consulting

Tom Ryan shows how Pardot HML lets you add if/else logic to emails so they show a personalized greeting when you have a first name, or a generic one when you don't. Avoids blank merge fields and keeps your email from looking broken.
Chapters
Just a short demo video to show how HTML enables us to use conditional logic statements in our emails to personalise the content. So, as HTML is already turned on in this account, we'll navigate from the dashboard here to marketing to emails and access our email templates. So, because we've turned on HTML, we now have this column upgraded and certain email templates have a green tick. This means that the tags used in the emails to personalise the content have been upgraded to HTML. So for this example, we'll use this email template draft here and we'll go to edit email template. And we'll edit this section here. So as we know, customers are much more likely to engage with us when our messaging is personalized and HTML allows us to use information from the prospect record to personalise our content, just by inserting using the merge field picker. However, if a prospect record does not have a value for a field, then nothing will be displayed. So to avoid empty fields, we can either define a default value or we can create a conditional logic statement. So for this example, let's say we want our recipients to receive their first name in the greeting, and the greeting is we've got good news for you. We then want comma, their first name before the end of the greeting. However, if we don't know their first name, it could just look exactly like this in the email template in the email for them with a space between the comma. So to prevent this, we can use a conditional logic statement. So we would use this one here. First of all, we're telling Pardot what we want them to do. So this is the part of the if after the hashtag here. So this is all about if recipient first name. We want we've got good news for you, comma and their first name. The else part of the conditional logic statement is telling Pardot what to do if there isn't a default, there isn't a value there. So we want them to say we've got good news for you and then end the greeting. When you create a conditional logic statement, it's important to remember to do the curly brackets forward slash if to close the statement. So to show you what this looks like, we'll go and preview as a prospect. So using the drop down here, we'll firstly view as test. As we know we haven't got a recipient first name for them, so here we can see they received this version. We've got good news for you. Say we want to view as Tom and we know we've got his first name in our records, he will instead receive We've got good news for you comma space his first name Tom when you create a conditional logic statement, it's important to remember that it makes a one to one replacement for an empty field value. However, if we've already specified a default value for a field and then set up conditional logic statements, the default value will populate instead. Always remember to test both versions, as the conditional logic statement produces two versions of our email one which is personalized as this is and then one which is just formatted correctly. As we saw earlier.
More from Tom

Pardot vs HubSpot - Salesforce-HubSpot History, platform comparison and migration framework









