Add Account Fields on SFDC Campaign Member Reports
Campaign Member reports are great in Salesforce because they show both leads and contacts together. Traditionally, it can be difficult to track what accounts these Campaign Members tie back to, especially for leads.
What we're working towards
Our goal is to be able to have "Account" columns on our Campaign Member Report for both Leads and Contacts.
This enables possible fields such as:
- Matched Account Name
- Matched Account Tier
- Matched Account Owner
- Any custom fields on the Account object
Setting things up
We're going to be adding custom fields to the Campaign Member object that will point to the lead or contact's matched account.
Step 1: Get to Campaign Member's Custom Fields screen
Step 2: Create a new custom field
This field will be a Formula field.
Step 3: Give it a field name and select the type of value to be returned
Step 4: Let's get our Formula figured out!
Essentially, if it's a Lead, we want to pull the Matched Account Name field from that relationship, and if it's a Contact, we just need to point to the Account Name field.
There's a handy formula operator Salesforce called BLANKVALUE.
You pass it two arguments, if the first one is null, then it will use the second.
We'll pass it both the Lead and Contact version of our value, and it will automatically select the correct one for us.
The Formula will look like this:
As part of Engagio's Lead to Account Matching, all leads have a relationship back to the account that can be leveraged to access account fields.
Your two values will always start with the following, but any field name can be appended after that.
Pro Tip 👌
While normally not necessary, I like using Salesforce's &quot;Insert Field" dialog to make sure I have all the relationships and field names correct since they can become rather nested.<br/>Step 5: Finish creating the field, save it, and add it to your reports, that's it!