The campaign member object in Salesforce represents the association between a campaign and a lead or a contact. While some standard lead and contact fields are available for the campaign member object, if you want to view or pull a report for custom fields, you will need to create a new field. This post will show you how to create a formula field on the campaign member object that will pull in the custom field value for a lead or a contact.

Create a formula field

Create a formula field on the campaign member object that will check if the campaign member is a Lead or a Contact and populate the field with the custom field value.

Navigate to the campaign member object within the object manager and create a new formula field.

If your lead and contact fields are picklists, use this syntax for the formula.

IF(ISBLANK(ContactId), TEXT(Lead.Status), TEXT(Contact.Status__c))

If your lead and contact fields are not picklists, use this syntax for the formula.

IF(ISBLANK(ContactId), Lead.Status, Contact.Status__c)

Add the field to campaign member related list

You can add the new custom field to the campaign member related list by navigating to the campaign object in the campaign manager and selecting your page layout. Scroll to the campaign member related list and click on the wrench icon to select your fields.

Now the custom field displays in the related list for campaign members.

Use the fields within reports

The custom field is also available within the campaigns with campaign members report.

Questions?

Send me a tweet @jennamolby, leave a comment below, or book a Peer Chat.

Author

I'm a Freelance Marketing Operations Consultant With 15 years of experience in Marketing Operations, I’ve worked with a wide range of tools including Salesforce, Marketing Cloud Account Engagement (Pardot), Marketo, and many other sales and marketing platforms. I help teams optimize their tech stacks, improve processes, and get accurate, actionable reporting. Whether it’s setting up your Marketing Automation Platform, building Salesforce reports, managing lead lifecycles, tracking attribution, or integrating your tech stack, I ensure everything is aligned to drive real results.

8 Comments

  1. Hi! Thanks for the post!

    Here’s the formula I used: IF(ISBLANK(ContactId), TEXT(lead.Segment__c), TEXT(contact.Segment__c))

    but getting the error below:

    Error: Incorrect parameter type for function ‘TEXT()’. Expected Number, Date, DateTime, Picklist, received Text
    Description

    Just to note: the fields “Segment__c” are picklist fields.

    Let me know if you have any idea on what I can try!

    • Jenna Molby

      Hi Harmony, Removing the TEXT() wrappers should do the trick.

  2. Hi Jenna – great article.

    Will the new campaign member field appear on all campaign layouts, or is it possible to specify which campaign layout you’d like the campaign member field to appear?

    Thank

    • Jenna Molby

      Hi Jack, When you create the field you can choose which page layout to add the fields to.

  3. Hi Jenna,

    Thank you for the great article. I did created a custom field to display lead/contact information which was really helpful. I do have a question – is it possible to filter the custom field in the list view campaign members? It did not show in the filter when I click the “funnel icon”. Could it be because it is a formula field? It would be great if it display in the filter selection.

    • Jenna Molby

      Hi Yvonne, You’re welcome! I did some research and I don’t think it’s possible to add it as a filter to the campaign members view.

  4. Hello Jenna,

    Thanks so much for this awesome article – I just have a quick question. The Contact Status field you are referring to in your formula is a custom field. Does that mean there is an assumption that that field was created earlier and the Lead Status was mapped into that?

    Many thanks,
    Claudia

    • Jenna Molby

      Hi Claudia, You’re welcome! The lead and the contact fields do not need to be mapped in order for this to work.

Write A Comment