Integration Between SalesCloud and SFMC

Context

Marketing Cloud is mainly used for maintaining the customer information for sending email and tracking customer activity. We can send emails directly from Salesforce via Marketing Cloud Connector and this email information is tracked in Salesforce.

Business Process

We create a Bi-Directional data flow between Sales Cloud and SFMC as shown below..

Architecture

Integration Diagram:  

To establish the connection between Salesforce and Marketing Cloud,  you need to create two Users.

1. Salesforce [Symbol] Tracking User    2. Marketing Cloud [Symbol] API User

Salesforce Integration with Marketing Cloud

Solution Details

Integration Steps and Considerations:

Salesforce Instance:

1. First, we should install the Marketing Cloud Package in Salesforce. While installing, select Admin Profile only.

2. Use the following URL for installing this package in Sandbox, https://test.salesforce.com/packaging/installPackage.apexp?p0=04ti0000000Tj9E

3. Use the following URL for installing this package in Production, https://login.salesforce.com/packaging/installPackage.apexp?p0=04ti0000000Tj9E

4. Add fields ‘Marketing Cloud for AppExchange User’ and ‘Marketing Cloud for AppExchange Admin’ in User Page Layout and enable both checkboxes. Also, ensure the profile has the ‘API Enabled’ permission.

5. Add Permission Sets ‘Marketing Cloud Connector’, ‘Marketing Cloud Connector Admin’, and ‘Marketing Cloud System User’.

6. The above two steps are for adding an Admin User level.

7. Create a Custom App named ‘Marketing Cloud’ and add package objects under the App ‘Marketing Cloud, Email Sends, Mobile Sends, and Send Analytics’.

8. Add Marketing Cloud package fields, custom links, and VF page to view and access the data related marketing cloud.

9. Add IP Whitelist ranges in Salesforce by using this link: http://help.marketingcloud.com/en/documentation/exacttarget/resources/exacttarget_ip_addresses_for_inclusion_on_whitelists/whitelisting_ip_ranges_for_salesforce_managed_packages/#ip

10. Enable ‘Email Opt Out’ field visibility in Lead & Contact Object for Admin Profile. Then only, Email Opt Out functionality will update correctly whenever the subscriber clicks the unsubscribe link.

11. Create workflows provided by the Marketing Cloud package. If we use Triggered to Send Functionality,  then there is no need to create workflows.

Marketing Cloud Instance: 

Users must have the following two roles with the API User enabled.

  1. Administrator 2) Marketing Cloud Administrator

Provide the salesforce Admin User credential in Marketing Cloud to connect both systems.

Log into Marketing cloud => Navigate to email studio => Click on Email App=> click Admin tab=> click Salesforce Integration=> click Connect Account.

Then, provide the Salesforce user name, password, lookup to select Org Id and deselect ‘Scope by User’ checkbox (It’s a restricted user permission and displays limited subscriber (records) information)

Image

Contact Marketing Cloud Support to enable and upgrade the Connected App button under the Salesforce Integration for secure data transfer between systems.

Image

User Mapping for integration:

Map Marketing Cloud User (API User) with Salesforce User (Tracking User). The Salesforce User Can Send mail to recipients, view tracking details, and access Marketing Cloud information.

Email =>  click Admin tab =>  click My Users =>  select the API User => click on Edit => click Integrate Link => Salesforce.com field => provide the SFDC User Name => click Save.

Image

Marketing Cloud Connector – Configuration:

Click on ‘Marketing Cloud’ Object tab in Salesforce. => Verifying Remote Site settings. =>  Click on the button ‘Verify Remote Site’.

Image

Then, choose the Automatic Setup -> click on Start Wizard

Marketing Cloud Connector

Then, provide the Marketing Cloud Connector User (should verify the user permission option) credential to configure the connection for tracking information passed from Marketing Cloud to Salesforce.

Marketing Cloud Connector with Salesforce Integration

Once we are connected , again it will ask Marketing Cloud user credentials (this is for the user mapped between systems – refer user mapping steps) [Symbol] Enter the API User credential to connect.Now, configure the necessary settings based on Email Tracking and Email sending.

Marketing Cloud Connector Settings

The connection is successfully set up between Marketing Cloud and Salesforce. Before starting the data, processing and sending emails from the two systems, we should verify the connection and configuration settings. For data syncing process, we need to contact Marketing Cloud support to enable ‘Data Stream’ feature in Marketing Cloud. After completing the connection, both systems are ready to send data in real time.

Import Salesforce Marketing Cloud To Treasure Data.

Create an Install Package in Salesforce Marketing Cloud

To Create Enhanced Functionality Package:

Log on to your Salesforce Marketing Cloud account.

On the Welcome Page, select your name on the top-right corner then select Setup.

On the left side menu of the new screen, select App > Installed Packages.

On the Installed Packages screen, select New

On the New Package Details pop up, enter the Name and Description and select the checkbox Create with enhanced functionality (recommended). Select Save.

On the Add Component pop up, select API Integration then select Next.

On the Choose Your Integration Type screen, select Server-to-Server and then select Next.

On the Set Server-to-Server Properties screen:

  1. Scroll to the CHANNELS section and select the Read checkbox on Email
  2. Scroll to CONTACT section and select the Read checkbox on Audiences and List and Subscribers
  3. Scroll to DATA section and select the Read and Write checkbox on Data ExtensionsRead for Tracking Events
  4. Scroll to HUB section and select the Read checkbox on the Campaign

On the Installed Packages screen, scroll down to the Components panel, then take note of the Client IdClient Secret and Authentication Base URI. You will use the information to write the data from Treasure Data to Salesforce Marketing Cloud.

Use the TreasureData Console to Create Your Connection

You can use TD Console to create your data connector.

Create a new connection

When you configure a data connection, you provide authentication to access the integration. In Treasure Data, you configure the authentication and then specify the source information.

Go to Integrations Hub > Catalog and search and select Salesforce Marketing Cloud.

Create Enhanced Package Integration

On the New Authentication screen, select Package Type as Enhanced Functionality Package, then enter the Client IdClient Secret, and Authentication Base URI (which you obtained when you created the enhanced package in SFMC). Optionally, you could specify Account identifier or MID to access multiple BUs (more detail in How to get MID) and Scope to limit the token’s scope (more detail in API scopes). Select Continue.

Enter a Name for this integration and select Done.

Create a New Transfer

After creating the connection, you are automatically taken to Sources. Look for the connection you created and select New Transfer.

The following dialog opens. Complete the details and select Next.

Next, you see a Preview of your data similar to the following dialog. To make changes, select Advanced Settings otherwise, select Next.

From here, if you want to change some options such as skipping on errors or rate limits, select Advanced Settings:

Select the database and table where you want to transfer the data:

Specify the schedule of the data transfer using the following dialog and select Start Transfer:

Integrating Between Treasure Data and SFMC is achieved..

Jest Unit Testing with LWC

LWC Introduction

Lightning Web Components is the newest programming model built to aid in developing a new breed of Lightning Components. Unlike Aura, LWC sets out to leverage the feature rich browsers we have come to know within the last few years, all while maintaining the ability to create lightweight, feature packed components and applications.

Testing Lightning Web Components

Testing is very important when it comes to the LWC because the components contain many different files including CSS, JS controllers, client-side JavaScript.

Test a component in isolation

  • Test a component’s public API properties, methods and events
  • Test basic user interaction (clicks)
  • Verify the DOM output of a component
  • Verify that events fire when expected

Essentials of Testing with LWC

Like any other testing endeavour, there are steps that need to be completed before testing a Salesforce LWC. Let’s have a look at some of the important ones:

  • Write one test case for different components and do not integrate multiple test cases into one
  • Understand the length of the test case, which mainly depends on the component
  • Before executing your test, the test case should describe the accomplishments
  • Carefully document the expected results for different actions performed on the LWC
  • If your test case is written to test multiple elements at once, then it is preferable to implement modern-day JavaScript so the code can be optimized.

Jest Introduction

When approaching the testing of your components, it’s important to remember the two types of testing, functional and unit. Salesforce.com briefly mentions in their documentation here that functional (end-to-end) testing is not recommended for Lightning Web Components; however, Jest unit testing is strongly encouraged. Jest is a JavaScript testing framework developed with an emphasis on simplicity. These tests run locally and will not be pushed to Salesforce.com as part of the component bundle. Each test lives in a separate folder inside of the component bundle and contain any number of tests inside test suites.

Setup JEST Framework for Lightning Web Components

Before we install JEST for LWC, we need to install 2 other software’s to support.

  1. Node.js : This page may have two versions of node files. we recommend to use LTS(Long Term Support) version. Download and install it.
  2. Npm : When you install Node.js, npm also installs.

Make sure you have Node and NPM installed by running simple commands to see what version of each is installed.

Node: Open command prompt and run node -v It will show version like this: v12.14.0

NPM: Open command prompt and run npm -v It will show version like this: 6.13.4

If Node and npm are successfully installed, then open your vs code project and follow the below steps to install lwc-jest.

Step:1

Open terminal in vs code by view –> Terminal or shortcut keys for windows (control + ~ )

Step:2

Run npm init command to create package.json file in the project root folder. This command will ask some details you can leave blank and hit enter to finish.

Step:3

Now run following two commands one by one to install node modules.

npm install

npm install @salesforce/sfdx-lwc-jest –save-dev

Step:4

Now open the package.json file created in step no 2 and add below lines in the script block.

    “test:unit”: “sfdx-lwc-jest”,

    “test:unit:coverage”: “sfdx-lwc-jest –coverage”,

    “test:unit:watch”: “sfdx-lwc-jest –watch”,

    “test:unit:debug”: “sfdx-lwc-jest –debug”

Component Directory Structure

Create a folder named __tests__ at the top level of your component’s bundle directory. Save all tests for this component inside the __tests__ directory, or in a subdirectory of the __tests__ directory.

Jest runs JavaScript files in the __tests__ directory. Test files must have names that end in “.js”, and we recommend that tests end in .test.js. You can have a single test file with all of your component tests, or you can have multiple files to organize related tests.

For example, if you had a component, hello, under the foo namespace, the project structure with tests looks like this.

src
│   └── foo
├── modules
│       └── hello
│           ├── __tests__
│           │            └── hello.test.js
│           ├── hello.html
│           └── hello.js
└── main.js
 

 Write a Basic Test

To become an accomplished tester, learn how to use Jest. In particular, learn the syntax of the many matchers provided with Jest. We don’t cover general Jest usage here because the Jest documentation is excellent. We focus on the specifics of using Jest with Lightning web components.

Jest tests for a Lightning web component should test the behaviour of a single component in isolation, with minimal dependencies on external components or services.

Let’s look at hello.test.js, which is the test for the hello component in the lwc-recipes-oss repo.

// hello.test.js
import { createElement } from 'lwc'; 
import Hello from 'c/hello'; 
describe('example-hello', () => {  
 afterEach(() => {
    // The jsdom instance is shared across test cases in a single file so reset the DOM
while (document.body.firstChild) {
document.body.removeChild(document.body.firstChild);
    }
  });
  it('displays greeting', () => {
    // Create element
   const element = createElement('example-hello', {
      is: Hello
    });
    document.body.appendChild(element);
    // Verify displayed greeting
    const div = element.shadowRoot.querySelector('div');
    expect(div.textContent).toBe('Hello, World!');
  });
});

How to run the test?


Open the terminal in vs code and run the JEST test class.
Commands to run the JEST test class.
npm run test:unit hello.test.js  –> To run the specific test class

And you the see the test output!

Mocking wired Apex calls

There are 3 different types of calls that could be made from LWC component JavaScript to Apex:

  • Apex wired method calls
  • Apex imperative calls
  • LDS wired method calls

Each of these calls has a different way of creating adapters for mocking. I was a stupid to not have read the documentation completely and tried hooking the same adapter to all 3 calls till the report came to my rescue. In fact, the Salesforce Developer documentation here doesn’t say much either.

import {
    registerTestWireAdapter,
    registerLdsTestWireAdapter,
    registerApexTestWireAdapter
} from '@salesforce/sfdx-lwc-jest';

Troubleshooting tips

Initialize a component before loading

Once I got started, I was stuck at the starting point itself. I was wondering, how do I initialize the initial state of the component (inject dependencies) before loading it? Even though the answer was right in front of my eyes, I could not figure it out. I just had to set the attributes decorated with @api before loading the component.

// Create element
const element = createElement('c-componentName', {
    is: componentName
});
       
element.apiFieldName1 = value;
element.apiFieldName2 = value;document.body.appendChild(element);

Authorizing an Org Error

Once I had done with writing the JEST test and successfully running all my tests, I had to deploy the project to the Salesforce Org. There I was facing an Authorization error problem .I was not able to connect to my Salesforce Org .

So to over come this Authorization error issue , firstly before installing npm in VsCode , try Authorizing with your Org  and then install npm in VsCOde . I was able to Authorize my Org fallowing this process.

Thanks for checking out this blog post and hopefully for you Jest Unit Testing with LWC was useful.

Converting VisualForce page to Lightning Web Component using pubsub library to communicate across the DOM

Below is the sample visualforce page which displays the list of Account records from a standard object based on the two search fields Name and Industry.

Converting the above visualforce page to Lightning Web Component (LWC), we will create two separate LWC components which are not in the same DOM tree.

We will communicate between these two components using pubsub external library. In a publish-subscribe pattern, one component publishes an event. Other components subscribe to receive and handle the event. Every component that subscribes to the event receives the event. The pubsub module restricts events to a single page.

You can import pubsub module from https://github.com/developerforce/pubsub

Below is the code snippet,

<template>
    <lightning-card title="Search Records" >
        <div class="c-container">
            <lightning-layout horizontal-align="space">
                <lightning-layout-item flexibility="auto" padding="around-small" size="5">
                    <lightning-input type="text" name="accName" label="Account Name" placeholder="type here..." value={accName} onchange={handleAccName}></lightning-input>
                </lightning-layout-item>
                <lightning-layout-item flexibility="auto" padding="around-small" size="5">
                    <template if:true={industryValues.data}>
                        <lightning-combobox
                            name="Industry"
                            label="Industry"
                            value={industryValue}
                            placeholder="Select Industry"
                            options={industryValues.data.values}
                            onchange={handleChange} >
                        </lightning-combobox>
                    </template>
                </lightning-layout-item>
                <lightning-layout-item flexibility="auto" padding="around-small" size="2">
                    <div style="height: 20px;"></div>
                    <lightning-button variant="brand" label="Search Records" title="Search Records" onclick={handleSearchRecs} class="slds-m-left_x-small"></lightning-button>
                </lightning-layout-item>
            </lightning-layout>
        </div>
    </lightning-card>
</template>

In the above html code, we created an input field for Account Name and a dropdown select for industry picklist. A Button to display the records.

searchRecords.js

import { LightningElement, wire } from 'lwc';
import { getPicklistValues } from 'lightning/uiObjectInfoApi';
import INDUSTRY_FIELD from '@salesforce/schema/Account.Industry';
import { CurrentPageReference } from 'lightning/navigation';
import { fireEvent } from 'c/pubsub';

export default class SearchRecords extends LightningElement {
    accName = "";
    industryValue = "";
    @wire(CurrentPageReference) pageRef;
    @wire(getPicklistValues, { recordTypeId: '012000000000000AAA', fieldApiName: INDUSTRY_FIELD })
    industryValues;

    handleAccName(event) {
        this.accName = event.target.value;
    }

    handleChange(event) {
            this.industryValue = event.target.value;
    }

    handleSearchRecs(event) {
        let eventData = { "accName": this.accName, "industryValue": this.industryValue };
        fireEvent(this.pageRef, 'searchKey', eventData);
    }
}

The advantage of LWC over visualforce page is it is not required to make frequent apex calls. Like in our case we are getting Industry Picklist values directly importing from ‘lightning/uiObjectInfoApi’ instead of calling through apex. For importing picklist values, recordtypeId and field name to be passed as parameters. If there are no recordtypes created then you can specify 012000000000000AAA  for default recordtype within salesforce.

Clicking on ‘Search Records’ button will trigger ‘handleSearchRecs’ function which eventually fire event using pubsub library. For Importing this library, we need to create pubsub.js and js-meta.xml using the link provided above. The ‘fireEvent’  function in pubsub library will accept three parameters, page reference, keyword to identify the event, and data that needs to be passed.

Create searchResults.html

<template>
    <template if:true={accountRecords.data}>
        <lightning-card  title="Accounts">
            <lightning-layout horizontal-align="space">
                <lightning-layout-item flexibility="auto" padding="around-small">
                    <lightning-datatable
                        key-field="id"
                        data={accountRecords.data}
                        show-row-number-column
                        hide-checkbox-column
                        columns={column}>
                    </lightning-datatable>
                </lightning-layout-item>
            </lightning-layout>
        </lightning-card>
    </template>

    <template if:false={accountRecords.data}>
        <h1 style="text-align: center">No records to display</h1>
    </template>
    
</template>

The above html will display the records using the lightning data table when triggered by the pubsub event.

searchResults.js

import { LightningElement, track, wire } from 'lwc';
import { registerListener, unregisterAllListeners } from 'c/pubsub';
import searchRecords from '@salesforce/apex/vfToLwcController.searchRecords';
import { CurrentPageReference } from 'lightning/navigation';

const columns = [
    { label: 'Account Name', fieldName: 'Name', type: 'text' },
    { label: 'Industry', fieldName: 'Industry', type: 'text' },
    { label: 'Phone', fieldName: 'Phone', type: 'phone' },
    { label: 'Website', fieldName: 'Website', type: 'url' },
    { label: 'Annual Revenue', fieldName: 'AnnualRevenue', type: 'currency' }
]

export default class SearchResults extends LightningElement {
    @track column = columns;
    @track error;
    accountName;
    industryVal;
    @wire(CurrentPageReference) pageRef;
    @wire(searchRecords, { accountName: '$accountName', industryVal: '$industryVal' }) accountRecords;
    
    connectedCallback() {
        registerListener('searchKey', this.handleSearchKeyChange, this);
    }
    disconnectedCallback() {
        unregisterAllListeners(this)
    }

    handleSearchKeyChange(searchKey) {
        this.accountName = searchKey.accName;
        this.industryVal = searchKey.industryValue;
    }
}

To get triggered by the event fired from other component, we need to import ‘registerListner’ from pubsub library module. The first parameter will be the keyword which identifies the event.

When this is triggered, in the above code snippet it will set the values to variables. We are calling an apex class to fetch data from the salesforce by passing the values from events as parameters.

We are calling an apex method using @wire decorative by passing the ‘searchRecords’ method which is imported from apex class using ‘@salesforce/apex/vfToLwcController.searchRecords’ where ‘vfToLwcController’ is class name and ‘searchRecords’ is method.

vfToLwcController.cls

public with sharing class vfToLwcController {
    @AuraEnabled(cacheable=true)
    public static List<Account> searchRecords(String accountName, String industryVal){
        List<Account> lstAccount = new List<Account>();
        String query = 'SELECT ID, Name, Industry, Phone, AnnualRevenue, PositiveOrNegative__c, Website FROM Account Where ';
        if(String.isNotBlank(accountName)){
            query = query + ' Name LIKE \'%' + accountName + '%\' ';
        }
        if(String.isNotBlank(industryVal)){
            query = query + ' OR Industry LIKE \'%' + industryVal + '%\' ';
        }

        query = query + 'LIMIT 10';
        lstAccount = Database.query(query);
        System.debug('lstAccount: '+lstAccount);
        return lstAccount;
    }
}

Create a Lightning app page and drag and drop the components (above two components) you pushed into the salesforce. (Make sure you have set up domain name).

Add subscribers to a Journey from a CloudPage using Fire Entry Event

The API Event in Journey Builder connects the journey canvas to an API used to admit contacts into a journey. When the API fires an event, the contacts entering the journey are stored in a Marketing Cloud data extension you choose. You can set a filter using Marketing Cloud data attributes to ensure that only intended customers enter the journey. 

Step 1: 

Create a package in installed packages i.e Setup->Apps->Installed packages->New 

Create a package add a component i.e API integration-> server-to-Server 

Step 2: 

In Journey Builder create a journey using a API Event  as an entry sources Where in you will have to select the data extension where in you want to store API event data. 

Note the Event Definition key.. 

Step 3: 

Create a Cloud Page 

Code Snippet: 

%%[ 

SET @Submit = RequestParameter(“Submit”) 

IF @Submit != “Success” THEN 

]%% 

 <h2>Email:</h2> 

<form action=”%%=RequestParameter(‘PAGEURL’)=%%” method=”GET”> 

<label for=”email”>Email address:</label> 

<input type=”email” id=”email” name=”email” required=”yes”> 

<button type=”submit” name=”Submit” id=”Submit” value=”Success”>Submit</button> 

</form>  

// This a html form for submitting a email// 

%%[ 

ENDIF 

]%% 

%%[ 

SET @email = RequestParameter(“email”) 

IF @email != “” THEN 

]%% 

//fire entry event script placeholder// 

//SSJS//  

<script language=”javascript” runat=”server”> 

Platform.Load(“Core”, “1.1.1”); 

try { 

    //authenticate to get access token 

    var authEndpoint = “https://###############################”;  //provide API endpoint 

      var payload = { 

        client_id: “################”,    //pass Client ID 

        client_secret: “##################”,    //pass Client Secret 

        grant_type: “client_credentials”  

    }; 

    var url = authEndpoint + ‘/v2/token’ 

    var contentType = ‘application/json’ 

    var accessTokenRequest = HTTP.Post(url, contentType, Stringify(payload)); 

    if (accessTokenRequest.StatusCode == 200) { 

        var tokenResponse = Platform.Function.ParseJSON(accessTokenRequest.Response[0]); 

        var accessToken = tokenResponse.access_token 

        var rest_instance_url = tokenResponse.rest_instance_url 

    }; 

   var email = Request.GetQueryStringParameter(“email”); 

       //make api call to inject contact to a journey   

    if (email != null && accessToken != null) { 

        var email = Request.GetQueryStringParameter(“email”); 

             var headerNames = [“Authorization”]; 

        var headerValues = [“Bearer ” + accessToken]; 

        var jsonBody = { 

            “ContactKey”: email, 

            “EventDefinitionKey”: “APIEvent-#########################”,    //provide journey EVENT DEFINITION KEY 

            “Data”: { 

                “email”: email 

            } 

        }; 

        var requestUrl = rest_instance_url + “/interaction/v1/events”; 

        var fireEntryEvent = HTTP.Post(requestUrl, contentType, Stringify(jsonBody), headerNames, headerValues); 

      if (fireEntryEvent.StatusCode == 201) { 

        Write(“Success”); 

      } 

    }; 

} catch (error) { 

    Write(“Error”); 

</script> 

%%[ 

ENDIF 

]%% 

After Saving the cloud pages Publish it (wait for 5 min after making any changes before publishing) 

Then click the url 

After Entering the email in cloud pages it fires to journey builder..Where the data gets stored in data extension.. 

Einstein Email Recommendation

Introduction

In Marketing Cloud recently they have made a few exciting changes to the interface. First, an Einstein notification badge was introduced to the header as a part of the January release. Where in you have two recommendations i.e. Email and Web Recommendations. Einstein’s powerful insights and recommendations now live in one place giving easy access to every Marketing Cloud user.

Einstein Email Recommendations and Web Recommendations have been part of the Salesforce Marketing Cloud product family for a while. They now have a new home in the Einstein product menu. Both are effective ways to personalize content for your audience if you have access to a developer to assist with setting up the Collect Tracking Code for Email Recommendations, and the API call for Web Recommendations.

Email Recommendation

STEP 1

We will start with the catalog, as it lies at the heart of Personalization Builder. A catalog can be based on products or content or banner. It holds all your products or content data with as many details as possible. Decide if you want to use product or content (or both) and set up your catalog with field attributes, activity tracking (e.g. category view, shopping cart, purchases).

After uploading a catalog (.csv format) Map the fields and you can add additional fields also..

STEP 2

Create a product display , In this section, you will determine what information is displayed in your recommendation (the identifiers) and how you would like those recommendations to look in your email. To manipulate the order of the identifiers, cut and paste the generated code in the order you want the pieces of information to appear. Click “preview” to see how your recommendation will be displayed. Click save and publish.

STEP 3

Create a logic where in you can choose a display which you had created in step 2.

You can configure the scenarios and choose a layout.

STEP 4

Add the tracking code to your visual force page or lightning component.

Here we are using visualforce page , where in we have placed a tracking code(i.e search). Whatever we searched in visualforce page it is tracked by einstein where in we can use it in email studio directly.

STEP 5

In email studio i.e in template we can drag and drop einstein from the advanced content . Then select the email recommendation logic which you want.

 Based on the search of a particular user in visualforce page gets tracked  by email address and then the email recommendations gets generated ..

Six Common Use Cases for Pardot Automation Rules

Pardot automation rules help you automate marketing and sales actions based on rules and criteria that you specify. Automate processes like marketing segmentation, lead assignment, sales notifications, marketing communication and more. If you’re ready to take Pardot automation rules to the next level, we’ve created a list of common rules you can create today.

  • Deploy Lead Scoring and Lead Nurture

In Pardot, a lead score measures how interested a prospect is in you. You can create automation rules to track and score prospect activity, resulting in a better idea of prospect interest. Set scoring criteria based on what the activity says about a prospect’s sales readiness. For example, opening an email might be worth 5 points, while visiting the pricing page on your website is worth 15.

Based on a prospect’s score, automation rules can take action, like adding them to a nurture program in Engagement Studio, or notifying a salesperson.

A good lead nurture strategy is to assign high scoring prospects to a nurture program that supports the sales team in quickly converting prospects. Low scoring prospects can be added to a separate nurture program designed to keep you top of mind, re-engage, or support sales messaging. You can do all of this through Pardot automation rules!

  • Leverage Downloadable Content

When someone downloads a piece of gated content, you can use Pardot automation rules to send them additional relevant content and continue to engage them. You can also use Pardot automation rules to segment your audience based on content interest. Create an automation rule to add the prospect to a specific list based on the content they downloaded. With this segmentation, you’ll know more about your prospects’ interests, guiding more relevant marketing communication and giving the sales team talking points.

  • Set Intentional Lead Assignments

With Pardot automation rules, you can be intentional about who receives certain leads. First, determine how to segment your leads. Then, create automation rules to ensure they get assigned to the right salesperson. Being more intentional with lead assignment means a higher chance of prospect conversion. Many of our clients assign leads based on:

  • Territory
  • Product or services of interest
  • Lead score
  • Lead grade
  • Send Anniversary or Birthday Greetings

According to Experian data, compared to promotional emails, birthday emails have 481% higher conversion rates, 342% higher revenue per message, and 179% higher unique click rates. If you have a field for the prospect’s birthday in Pardot, automation rules can be set up to send birthday messages. Including a call to action or a coupon is a great way to engage with your prospects.You can set up anniversary messages by creating automation rules based on a prospect’s created date or when their opportunity status becomes opportunity won (assuming that’s when they became a client/customer).Always use first name tags in these type of emails to add a touch of personalization.

  • Personalize Auto responder Emails

When someone fills out a form, use Pardot automation rules to send the prospect a personalized auto responder email. Some common ways we have seen personalized auto responder emails used include:

  • Information related to the specific product, service, or content of interest
  • Emails from their specific sales rep or lead owner
  • Messages referencing more content relevant to them
  • Sort Prospects with Tags

Pardot tags help with sorting, organizing, reporting, searching. You can tag assets as well as prospects with one or multiple keywords. A great way to use tags is with automation rules to associate prospects with different tactics. For example, to measure the effectiveness of a specific e-book, rather than create a Pardot campaign for every e-book that you launch (resulting in messy, endless campaigns), keep your campaigns lean and use tags instead. Use Pardot automation rules to tag prospects based on the name of the e-book they downloaded. This helps you better understand the effectiveness of campaigns at large, as well as the granularity of KPIs at a content-based level.

Launch Pardot Automation Rules

Before you launch any Pardot automation rules, we recommend you use the “preview” feature first. Previewing automation rules is a great way to quickly test your logic. It will show you how many prospects match the rule before you make it live. 

After you create the Pardot automation rule, click on it, then click on “Preview matches.”

If the preview looks correct, you can unpause the rule and make it live.

For best practice, Pardot recommends you review your automation rules at least 30 days after you set them. Then, review them every 90 days after that. This ensures they are properly running and are correctly matching prospects. Keep in mind there is a limit of automation rules in Pardot depending on the edition you have (Growth: 50, Plus: 100, Advanced: 150).  Through Pardot automation rules, you can more easily keep track of your prospects and take action on those who are most interested in your company.

Pardot Solving 4 Pain Points

ASK #1: “I WANT TO SEE WHAT MY PROSPECTS ARE DOING IN REAL TIME.”

Your go-to marketing automation feature: Real-time prospect activity alerts

And why would you want this kind of real-time insight, you ask? It’s not to be creepy — it’s so that you can provide more personalized and relevant sales communications at exactly the right moment. With immediate alerts that tell you when prospects are active on your site, visiting your pricing page, filling out a form, and more, you can not only see when your prospects might be available for a quick call, but you also have a list of their topics of interest.

Research shows that 35-50% of sales go to the vendor that responds first. (InsideSales.com)

ASK #2: “I WANT TO BE ABLE TO IDENTIFY MY BEST LEADS.”

Your go-to marketing automation feature: Lead scoring and grading

A common pain point for companies is the lead pass process. How do you create an objective process to qualify leads that satisfies both marketing and sales? The answer is through lead scoring and grading, which provide benchmarks that indicate whether a lead is interested in your company and a good fit for your product or service. This ensures that leads are of sufficient quality before they get passed on to sales. Even better — these scores and grades are viewable in your CRM, so you always know who your hottest prospects are.

Only 25% of leads are legitimate and should advance to sales. (Gleanster Research)

ASK #3: “I WANT TO TARGET MY SALES PITCH TO MEET EACH PROSPECT’S NEEDS.”

Your go-to marketing automation feature: Prospect activity tracking

It’s not enough to know your prospect’s industry and job title. You need to know their pain points and motivations to really cater your conversations in a way that will keep them engaged and interested. Marketing automation allows you to go beyond basic demographic information, giving you insight into detailed behavioral data (the pages your prospects are visiting, the types of content they’re downloading, and more). View this data in the lead or contact record in your CRM to see a log of all of your touchpoints with your prospects — and gain unparalleled insight into your prospects’ motivations, interests, and pain points.

74% of marketers say targeted personalization increases customer engagement. (eConsultancy)

Personalized emails generate up to 6 times higher revenue per email than do non-personalized emails. (Experian Marketing Services)

ASK #4: “I’D LIKE TO BUILD TRUSTING RELATIONSHIPS WITH MY PROSPECTS.”

Your go-to marketing automation feature: Lead nurturing

Marketing automation facilitates the relationship-building process by automatically delivering targeted, personalized messages to prospects over time. The best part about lead nurturing? While the messages appear to be from the assigned sales rep, they are set up behind the scenes by marketing. This leaves you free to focus on sales-ready prospects without neglecting the other leads in your pipeline.

Nurtured leads produce, on average, a 20% increase in sales opportunities versus non-nurtured leads. (DemandGen Report)

Myths About Marketing Automation and Small Businesses — Busted

MYTH 1: MARKETING AUTOMATION IS TOO COSTLY FOR SMALL BUSINESSES

Top-performing small businesses overwhelmingly validate that marketing automation is worth the budget, time, and effort. 79% say they will continue to use it, and companies that use marketing automation for over 2 years report the technology is ‘critical to future success.

Yes, marketing automation is a significant investment, but, as the majority of top-performing small businesses affirmed, the returns more than justify the costs.

There’s a reason that 68% of top-performing small businesses are using marketing automation (Gleanster) — these companies understand that efficient and scalable lead management is crucial to business success. It’s important to stop looking at marketing automation as a significant cost that may be worthwhile after a certain amount of growth, and start looking at it as an investment that will make this growth possible.

MYTH 2: IMPLEMENTING MARKETING AUTOMATION WILL REQUIRE AN INCREASE IN HEADCOUNT.

90% of top-performing small businesses that use marketing automation report they did not increase headcount after investing in marketing automation.

Well, that stat pretty much says it all. Marketing automation should relieve marketing workload, not create more work.

Yes, initial set-up will require an investment of time to ensure that everything is customized to a business’ particular needs. However, once implemented, the platform can automate some of the more tedious aspects of marketing, freeing up marketing to focus on overall strategy.

The bottom line is, marketing automation isn’t about adding (or subtracting) head count, it’s about shifting marketing priorities and workload towards building a more efficient and effective sales cycle.

MYTH 3: SALES WON’T BENEFIT FROM THE PLATFORM.

95% of Top Performing organizations report sales reps use sales alert capabilities in marketing automation. These same firms also report increases in satisfaction with CRM because reps can view customer engagement history for context about engagement with the account or contact.

Sales is 7x more likely to use CRM on a daily basis when marketing automation historical data is in contact or account records in CRM. Marketing automation instantly makes CRM more valuable to sales reps who get lead alerts, prioritized lists for follow-up, and context about how leads engaged with the brand — all within their CRM system.

This is one of our favorite misconceptions to address, and Gleanster’s report is chock-full of evidence to the contrary.

In fact, Gleanster found that sales reps not only benefit from marketing automation features like real-time sales alerts and lead nurturing, they also see more value from their investment in CRM as a result of having a marketing automation platform in place. Reporting features have also proven helpful on a larger scale, with 94% of small businesses that use marketing automation reporting that marketing and sales executives rely on periodic reports from their platform (Gleanster).

MYTH 4: MARKETING AUTOMATION WILL REQUIRE A LARGE TIME INVESTMENT IN ORDER TO SEE RESULTS.

Small business with 1-2 early-stage nurturing campaigns configured in marketing automation estimate the volume of quarterly qualified leads increased an average of 120% because of marketing automation outreach.

With minimal effort small businesses can salvage future pipeline and drive more revenue from qualified and engaged leads by automating customer nurturing campaigns in marketing automation.

For best results, your marketing automation strategy should be revisited regularly, adjusted, and optimized. But, as Gleanster confirmed, even having some very basic functionality in place can yield significant results.

What does this mean for small businesses? Even if you don’t have time initially to take advantage of all of the capabilities of marketing automation, just building one or two early-stage lead nurturing  campaigns can increase your quarterly volume of qualified leads by 120%— a very small time investment for game-changing results.

MYTH 5: MARKETING AUTOMATION CAN ONLY HELP UP UNTIL THE DEAL CLOSES.

Marketing automation helps organizations use customer data to inform behavioral triggers that automate ongoing cross-selling and upselling campaigns to existing customers, helping to maximize customer lifetime value more efficiently.

Survey respondents using marketing automation reported that 50% of their revenue came from existing customers, versus 30% amongst respondents not using marketing automation.

The features of marketing automation can allow businesses to tap into a crucial source of revenue that is too-often overlooked: current customers. This stable source of revenue is especially important for growing businesses; marketing automation can help ensure you’re securing life-long customers and brand evangelists as you grow your customer base, and regularly identifying opportunities to upsell and cross-sell.

Pardot Overview

Pardot Tools:

Engagement Studio: is Pardot’s lead nurturing engine, with this, marketers can build intelligent, automated programs that engage prospects at every step of the customer journey.

Salesforce Engage: Effortlessly build tailored campaigns with marketing-curated content, deliver a phenomenal buyer experience and close deals faster.

Marketing & Content Tools: It is a marketing content creation guide, with best practices and templates.

Lead Nurturing: is the process of sending a series of automated emails that will trigger based on a person’s behaviors or a preset time interval. This means you can provide the right information, to the right prospects, at the right time, and all without lifting a finger.

Salesforce Alignment: Create seamless alignment with the Sales team.

Analytics & Reporting: Maximize marketing and sales efforts with advanced marketing analytics. Explore your data, get insights into your marketing performance, and quickly take data-driven actions. Combine marketing and sales data in one place, know your marketing campaign ROI and impact on sales revenue and easily share insights with your team from anywhere.

Prospects & CRM Records: Prospect Accounts give you the ability to group prospects that work for the same company under the same umbrella, allowing you to roll-up and keep all the information about that company (e.g. shipping/billing information, company size, revenue, etc) all in one place. This reduces duplication and conflicting information.

Administration: The Admin module in Pardot lets you configure account settings, manage users, create and edit fields, and add connectors.

Connectors & API: Connectors allow Pardot accounts to sync with third party applications such as a CRM system or Google AdWords. Data can be passed back and forth between the two applications allowing a user to manage many formerly disparate marketing channels from within Pardot interface.

Quip: Make things happen with less email and fewer meetings. Fuel a culture of action across your company with documents, slides, and spreadsheets that stay up-to-date and keep the conversation in focus.

Field Service Lightning: works with Service Cloud, adding functionality for dispatching, monitoring, and reporting field service representative’s activity. Streamline operations across the entire service chain on one platform to deliver a connected customer experience with Field Service Lightning.

Trailhead: You can learn and describe how marketing automation and Pardot can help your business,  Define basic marketing automation terminology and describe how Pardot differs from other Salesforce marketing tools.

Things you can do with Pardot:

1. Lead scoring: When used in tandem with lead grading, can ensure that only the most qualified leads get passed from marketing to sales. A lead score, displayed as a numerical value, indicates how interested leads are in your product or service.

2. Lead Management: Streamlined lead management by increasing engagement and sell faster by reaching the right customers at the right time.

3. Nurturing campaigns: also called as drip nurturing programs, are key to building relationships during a long, complex sales cycle. These campaigns give marketers the ability to virtually hand-hold leads from the time they begin to show interest on through the purchasing decision.

4. Landing pages: is a specific web page that a visitor typically reaches after clicking a link or advertisement. These pages generally display content that is specific to the advertisement, search keyword, or link clicked. While a clean, easy to navigate website is important, simply driving visitors directly to your home page can be an ineffective method of converting visitors.

5. Forms: Before adding a field to a form, a corresponding prospect field must be created. There are two types of fields, Default and Custom fields. A handful of Default Fields appear in all Pardot accounts and they can be added to any Pardot form.

6. Branding: Brand messaging refers to the underlying value proposition conveyed and language used in your content. It’s what makes buyers relate to your brand by inspiring them, persuading them, motivating them, and ultimately making them want to buy your product. Here are a few examples of brand messaging you may recognize, in the form of slogans