Want to know which one of your marketing campaigns is causing the lead to reach your MQL threshold? You can stamp this information on the lead by creating two new fields and creating two processes using Salesforce Process Builder. Once the information is available on the lead record, you can pull reports to show which campaigns have triggered the most leads to become an MQL.
Create two fields
First, create two fields on the lead object. One field will be a lookup that will be populated with the ID of the last campaign, and the second will be a text field that will be populated with the campaign name at MQL.
Last Campaign Touch (Lookup field)
MQL Campaign (Text field)
Create the two processes within Process Builder
To stamp the lead record with the last campaign at MQL, we will create two processes within Process Builder:
- Last Responded Campaign: This will be triggered when a Campaign Member is created or edited. It will look to see if the Lead has responded (HasResponded = TRUE) to the campaign and update the lookup field (Last Campaign Touch) with the Campaign ID.
- Last Campaign at MQL: This will be triggered when a Lead is created or edited. It will look to see if the Lead is an MQL and update the text field (MQL Campaign) with the Campaign Name.
Last Responded Campaign Process Builder
Last Campaign at MQL Process Builder
Testing
To test your processes, create a new test lead and add the lead to a campaign. Set the campaign member status for the lead as responded and then refresh your lead to see if the Last Campaign Touch field is populated with the correct campaign ID.
Next, update your test lead to become an MQL and see if the MQL Campaign field populates with the campaign name.
Add your test lead to another campaign and see the campaign member status as responded and check to see if the Last Campaign Touch is updated and MQL Campaign is NOT updated.
Reporting
Once the information is available on the lead, you can pull a lead report and group by the MQL Campaign field to show how many MQLs can be attributed to each one of your campaigns.
Questions?
Send me a tweet @jennamolby, leave a comment below, or book a Peer Chat.












12 Comments
Hi Jenna, great content. It saves me! One problem, our MQL date is DATE/Time value type. So TODAY() formula doesn’t work. Could you advise how we can resolve this problem? Many thanks.
Hi Monica, For datetime use NOW() instead of TODAY().
Hi Tyron, we want to stamp MQL source detail from Marketo as well but have no idea yet. Are you able to share how to create MQL smart campaign to capture what activities lead to MQL? Thanks in advance.
Hi Jenna, I like the PB flow idea and started implementing myself. I did get to the second PB flow build and came to checking the MQL Date and found that we were never instructed to create that Custom Field (unless that may have been part of a separate blog post)? I can create that Custom Field obviously, no issue there, but wasn’t sure if it should be a Date Field that gets updated when some other action is occurring that I haven’t created. Other than that, very straight-forward and I like the idea. Let me know if I’m missing something with that Field. Thanks!
Hi Mike, Sorry for the confusion. You are correct, there were no instructions to create the MQL field. This was a prerequisite for the post.
We do something similar at Telnyx where we populate an “MQL Source” and “MQL Source Detail” field from our Marketo MQL smart campaigns to see what activities are causing our leads to MQL. The solution proposed in this article is a nice alternative. Thanks Jenna
Hi Tyron, Awesome! Thanks for sharing 🙂
Hi Jenna,
Thanks for this, a lot of people I work with are looking for functionality like this. Question for you, do you know of a way to create the same result but on the opportunity? What I’d be looking for is the last campaign the lead was a member of before the opportunity became closed-won.
Hi Nicole, You’re welcome! I haven’t tried that myself, but I think it could work. It would be a bit more complicated since there can be many contacts attached to the account/opp and many campaigns.