Creating a report to see Campaigns and the Leads or Contacts that are members of Campaigns is pretty straightforward. To see Campaigns without Leads requires that you leverage a cross filter. However, what if you’re looking to focus on Leads who are/aren’t members of any Campaigns? That’s a reversal in the view you’re starting with – instead of focusing on the Campaign, you want to pinpoint Leads, then assess their Campaign History. You may take a few of the standard report types for a test drive, however, depending on what you’d like to see, you may need to create a custom report type.
We know we’ve just thrown Salesforce jargon at you, but don’t worry – this guide will explain this concept step by step. First, let’s start with a use case, then we’ll cover three example reports which will help you to determine how you can pull the right report to show you what you’re looking for.
Leads + Campaign Report Use Case
You’d like to create a report to track Leads in Campaigns. You know that some Lead records aren’t being maximized, and are prime for marketing campaigns – so, you’d like to see which Lead records have no Campaign history.
The issue you will face is that using the filter Campaign Name equals blank (” “), your report won’t show anything useful. To meet this, you will need to use option three in this guide – however, the first two examples are useful to know, to show you the difference in the primary object you need.
Salesforce Reporting Definitions
- Campaign members: When a Lead, Contact, or Person Account is added to a Salesforce Campaign, a new record is generated to represent that they are part of that Campaign. The Lead/Contact/Person Account can be part of multiple Campaigns with this special Campaign member link.
- Cross-filters: Allow you to create a report that identifies records with or without a related record.
- Custom report types: Enable you to create reports that go beyond the standard Salesforce report types. You can think of a Salesforce report type as a template/framework that tells Salesforce which objects and relationships to consider, and therefore which fields to make available in the report builder – like a magnifying glass on your whole Salesforce data model.
1. Campaigns With Leads
This standard report type pulls the Campaigns that have related Leads (as Campaign members). To see Campaigns without related Leads, you will need to use a cross filter.
- In the report builder, on the Filters sub-tab, click the down arrow. Select Add Cross Filter.
- The cross filter options appear in a new Cross Filter section under the report filters you’ve set. Click into it, and you will be able to change with to without, and select Leads from the dropdown list.
If you would like to filter down Leads in the report further, you can add additional filters to the cross filter. For example, in the image below, you can see a filter added that will show only Leads with a certain status.
2. Campaigns With Campaign Members
This example is the same as the above, except that by using a “Campaign Member” report, you can switch between seeing Leads, Contact, or Leads and Contacts combined (therefore, giving you more flexibility from one report).
- In the report builder, on the Filters sub-tab, add a filter for Member Type equals Lead. (Note: You need to type in Lead, not Leads – or you won’t receive any results. Same applies with Contact not Contacts.)
- Click the down arrow. Select Add Cross Filter.
- The cross filter options appear in a new cross filter section under the report filters you’ve set. Click into it, and you will be able to change with to without, and select Leads from the dropdown list.
3. Leads With Campaigns
The first two examples are useful to know, however, they won’t solve the use case we posed at the start of this guide. The reason why I started with the first two is to show you the difference in the primary object you need, as well as what can be achieved with the readily available standard report types. The diagram below explains this:
Essentially, the primary object is the starting dataset you work with. It’s the first imaginary magnifying glass that you place on your Salesforce database. It may seem like a subtle difference, however, it determines the filtering that’s possible.
Leads with Campaigns isn’t a standard report type. I created a custom report type in order to get this view of the data. I will include the steps for this report type below, however, if you’re looking for more information on custom report types, check out the full tutorial linked below.
1. From Salesforce Setup, search for report type, then select Report Types.
2. Click New Custom Report Type.
3. Select the primary object, in this case Leads.
4. Give the report type a name that is in line with Salesforce’s standard report types naming convention. Here, I’ve used ‘Leads with Campaigns’. The description is mandatory.
5. Select deployed so that you can use the custom report type straight away.
6. On the next page, depending on the primary object (i.e. Leads), the wizard will show you its child objects (i.e. any records related to Leads). Select Campaign History.
7. You will notice that we can specify whether the object selected has to have related records to show up in the report. For our use case, select “A” records may or may not have “B” records – in other words, Leads may or may not have Campaign History.
8. Edit the report layout (which fields are included in the Report Builder, and where they are positioned). You can also set which fields should appear as report columns each time a user creates a new report.
9. Bonus! You can also add related fields via lookup if required. For example, in the image below, we can show fields related to the converted Account (i.e. should Leads be converted and you wish to report on the Account information to track the outcomes of Leads).
When you head back to the report builder, you will see the new report type appear in the list of report types to select from. There’s a useful sidebar which details the objects included in the report, and the relationship between them:
Select the report type, and add the without Campaign History cross-filter as described in examples 1 and 2. Now you will be able to identify which Leads haven’t been members of any Campaign.
Bonus: Relative Filters
In the Spring ’23 release, you can use relative filters for reports to automatically filter according to who is viewing the report at a given time. This is possible by switching to Use relative value (hyperlinked above the filter box) – and to switch back, the hyperlink will display as Use custom value. In the image below, you will see $USER filter in action:
Summary
This guide has explained the difference in report types, which is beneficial for you to determine which report type you need in order to produce the view of data you’re looking for. The three example reports have made the importance of starting with the correct primary object clear.
Now, you’ll feel more empowered when pulling Lead and Campaign reports, with custom report types and cross filters in your ‘back pocket’.