Lists, Lead Scoring & Workflows

JTChal
Member

New lead score rule for every salesforce campaign?

SOLVE

I'm just implementing lead scoring for the first time at my company, and we basically want the lead score to be a reflection of the lead's engagement over the past 30 days. Therefore, where possible, I'm trying to make every rule conditional so that it only applies points if the engagement occured in the past 30 days.

 

One area I'm having trouble with is how to give points to contacts based on enrollment in SALESFORCE campaigns when they did not have to submit a form to enroll in that campaign. Primary examples include attending an event or webinar (where they didn't have to fill out a HubSpot form to attend that webinar).

 

For some of these leads, I could use rules based on lead source: "Lead Source = Events AND Lead created date is less than 30 days ago." However, this doesn't work for leads that already existed in the database.

 

How can I create a rule that's not based on lead source or lead created date? Ideally, this rule should be able to capture all events and all webinars, etc., so that I don't have to create a new lead scoring rule for every additional campaign I run.

0 Upvotes
2 Accepted solutions
bradmin
Solution
Key Advisor

New lead score rule for every salesforce campaign?

SOLVE

I cooked something together which might work, but it comes with a few caveats. I attempted to build out Process Builder automation which increments the way you want. Create new Process Builder automation on the CampaignMember object, and choose whether you want this to fire only on create, or on create or update, based on your preferences. 

 

You'll want two branches, one for leads and one for contacts. Here's how the lead branch would look: 

 

Screen Shot 2018-09-18 at 9.28.03 AM.pngIn this example, we want this to fire on campaign members associated with undeleted, unconverted leads, and a campaign member Status of Responded. We can use this to immediately increment the desired property some score, in this example, 10 points:

Screen Shot 2018-09-18 at 9.24.51 AM.png

 

NOTE: Do not use HubSpot Score, use some helper property that you can build into your HubSpot Score scheme. It is not possible to push updates to this property from Salesforce to HubSpot. Apologies for the ambiguity with the example.

 

Then, add a time-delayed step - in this example, 30 days - where you subtract the score from the associated lead field: 

 

Screen Shot 2018-09-18 at 9.27.57 AM.png

 

Repeat the same logic, but on contacts, in a new row. Here's how it looks for the lead-only automation: 

 

Screen Shot 2018-09-18 at 9.28.07 AM.png

 

The issue with this approach is that if your lead is converted within 30 days, this won't fire. If the condition that kicked off the time-delayed action doesn't evaluate to True after 30 days, it won't fire. 

 

It's also important that you'll need to build this helper field on both leads and contacts in Salesforce, and set it up so that the value is mapped to contacts on conversion.

 

 

It may be impractical to get this to fire on leads the way you want. You may have better success building this on contacts only (and in which case, remove the bit about IsConverted, as that choice isn't valid on a contact object).


Brad Mampe, Salesforce Analyst, Fidelity
I'm probably wrong. I may not be right about that.

View solution in original post

bradmin
Solution
Key Advisor

New lead score rule for every salesforce campaign?

SOLVE

Thanks, @SalesforceScott. We purchased Rollup Helper licenses, but from what I hear from the community, DLRS is a great tool once you get past the initial config. DLRS is a preferred solution to the Process Builder schematic I laid out.


Brad Mampe, Salesforce Analyst, Fidelity
I'm probably wrong. I may not be right about that.

View solution in original post

0 Upvotes
11 Replies 11
SalesforceScott
Participant

New lead score rule for every salesforce campaign?

SOLVE

I might be able to assist a bit. 

If I recall correctly, the relationship between Lead or Contact and Campaign is a many-to-many with a Campaign Member object as the junction object. Junction objects are just objects that look up to both objects and create the ability to do a many-to-many relationship.

 

The main issue you're having is getting a rollup between these objects I believe. This tool is an amazing way to do rollups without having a master-detail relationship. No code needed. (And it's free)

 

Once we have rollups, you can add custom fields to the Campaign and Campaign Member objects if you so wish and then roll those up to either the lead or the contact.

 

So one example:

 

1) Create a "campaign value" number field on the campaign and set the default number to whatever you think is appropriate. This allows you to change the weight of a campaign on campaign creation, but they have a default weight. The default can be a formula based on campaign type iirc.
2) Create a "time-weighted campaign value" (You can think of better names) formula field that is roughly. If TODAY < Campaign EndDate + 30, use campaign value, otherwise use 0.
3) Create a formula field on the Campaign Member that looks up to the "Time-Weighted Campaign Value" and reads whatever it puts out.
4) Create a "Campaign Score" number field on the Lead and/or Contact object.
5) Use the rollup utility to sum the "Time-Weighted Campaign Value" from the Campaign Member object.
6) Done!

Note: You can make your formula in #2 more complex based on your campaign types and needs. That was just an example. I went with TODAY < End Date + 30 because I imagine that you might want to include them if they've registered before as well. If not, you could do it from the Campaign Member creation date since that should be created when they are added to the campaign. Just tweak your formula in #3 step instead.

It's a little hacky, but not too bad and it's pretty flexible, low interaction needed after implementation with no code. (Technically the rollup utility creates code for you, but you don't have to do it so I don't count it.) Hope that helps!

bradmin
Solution
Key Advisor

New lead score rule for every salesforce campaign?

SOLVE

Thanks, @SalesforceScott. We purchased Rollup Helper licenses, but from what I hear from the community, DLRS is a great tool once you get past the initial config. DLRS is a preferred solution to the Process Builder schematic I laid out.


Brad Mampe, Salesforce Analyst, Fidelity
I'm probably wrong. I may not be right about that.
0 Upvotes
JerryReid
Contributor

New lead score rule for every salesforce campaign?

SOLVE

Just wanted to point out that Rollup Helper can also be used to aggregate campaign response scores up to the contact/lead object in Salesforce. You can do this for one Salesforce campaign, a category of Salesforce campaigns, or all Salesforce campaigns. The filter criteria is pretty rad. You can then just work with the rolled up score at the contact/lead level within another formula field, or directly map the rolled-up data into HubSpot.

 

As was mentioned,  as an alternative to the process builder example provided, ou can rollup campaign member data. You can use Rollup Helper to roll-up the score calculated in a formula field. For example, you could use a formula field as a source on the campaign member object that evaluate to be 0 or 10 depending on if 30 days had passed if a campaign member had responded. You would then just rollup this value from the given campaign or all campaigns.

 

Note: If you do use a formula field as a source in Rollup Helper that evaluates if 30 days had passed, you will want to also schedule the rollup in Rollup Helper so that it will re-run to detect when the formula changes to 0 after 30 days so that the rolled up value then recalcualtes whatever scoring you are doing at the lead or contact level.

 

If anyone is interested in a more detailed example, I can have an example written up for the community.

 

Disclaimer: I do work for the company that developed Rollup Helper.

SalesforceScott
Participant

New lead score rule for every salesforce campaign?

SOLVE

Happy to give back @bradmin! It is a great tool, but I can see the initial config being a little confusing. The github has links to install from app exchange though, and if I recall correctly, some documentation on setting up a rollup so it's not as bad as it has been in the past. 

0 Upvotes
bradmin
Key Advisor

New lead score rule for every salesforce campaign?

SOLVE
This may be something you can tackle from the Salesforce side. The scoring you're asking about might be possible in HubSpot, but it could also be tackled by pushing campaign member data to the lead or contact.

That data can be mapped to HubSpot, and your automation can be based off that. Since the trigger is happening in Salesforce, you'll have more control manipulating the data there, then sending the desired value to HubSpot.

Do you have any resources that would allow you to build master-detail relationships between the campaign member and lead/contact in Salesforce?

Brad Mampe, Salesforce Analyst, Fidelity
I'm probably wrong. I may not be right about that.
0 Upvotes
JTChal
Member

New lead score rule for every salesforce campaign?

SOLVE

@bradmin, What would that master-detail relationship look like? If I don't want to have to create a new field for every campaign, I need a way to know whether the lead/contact was enrolled in a campaign where type = event or type = webinar within the past 30 days, where status = attended or registered. I'm not sure what the best way to do that is.

0 Upvotes
bradmin
Key Advisor

New lead score rule for every salesforce campaign?

SOLVE

A master-detail relationship is a 1-to-many kind of relationship field. It allows you to do things like make certain kinds of count/max/min kinds of calculations across records where multiple associations exist.

 

The issue is that Salesforce will only let you build these kinds of fields in limited circumstances with standard objects. What we want is some kind of master-detail between campaign members, and the lead or contact they're associated with. Salesforce would let you build one of these between campaign members and campaigns, but not to the lead or contact. To accomplish this, you'd either have to use a third-party package that can emulate these kinds of fields, or write Apex to do the calculation for you.

 

Without that, there's not a great way to be able to solve for this - one-to-many relationships are a tricky thing for most tools. You would be able to push data from the campaign member to the lead or contact it's associated with using Process Builder, but 

that would work well if you wanted to constantly add to the value. That won't be able to account for the use case of subtracting scores after 30 days. That's where you'd need to have some sort of resource emulate a master-detail relationship.

 

The HubSpot Support response sounds right. Since we can't stuff the one-to-many conditions into a field on leads or contacts, it's probably not possible to accomplish this on the HubSpot side. If you were doing Salesforce campaign enrollment from HubSpot workflows, you could always have the workflow add points, then after a 30-day delay, remove those points. But that won't account for Salesforce-side campaign enrollment.


Brad Mampe, Salesforce Analyst, Fidelity
I'm probably wrong. I may not be right about that.
0 Upvotes
bradmin
Solution
Key Advisor

New lead score rule for every salesforce campaign?

SOLVE

I cooked something together which might work, but it comes with a few caveats. I attempted to build out Process Builder automation which increments the way you want. Create new Process Builder automation on the CampaignMember object, and choose whether you want this to fire only on create, or on create or update, based on your preferences. 

 

You'll want two branches, one for leads and one for contacts. Here's how the lead branch would look: 

 

Screen Shot 2018-09-18 at 9.28.03 AM.pngIn this example, we want this to fire on campaign members associated with undeleted, unconverted leads, and a campaign member Status of Responded. We can use this to immediately increment the desired property some score, in this example, 10 points:

Screen Shot 2018-09-18 at 9.24.51 AM.png

 

NOTE: Do not use HubSpot Score, use some helper property that you can build into your HubSpot Score scheme. It is not possible to push updates to this property from Salesforce to HubSpot. Apologies for the ambiguity with the example.

 

Then, add a time-delayed step - in this example, 30 days - where you subtract the score from the associated lead field: 

 

Screen Shot 2018-09-18 at 9.27.57 AM.png

 

Repeat the same logic, but on contacts, in a new row. Here's how it looks for the lead-only automation: 

 

Screen Shot 2018-09-18 at 9.28.07 AM.png

 

The issue with this approach is that if your lead is converted within 30 days, this won't fire. If the condition that kicked off the time-delayed action doesn't evaluate to True after 30 days, it won't fire. 

 

It's also important that you'll need to build this helper field on both leads and contacts in Salesforce, and set it up so that the value is mapped to contacts on conversion.

 

 

It may be impractical to get this to fire on leads the way you want. You may have better success building this on contacts only (and in which case, remove the bit about IsConverted, as that choice isn't valid on a contact object).


Brad Mampe, Salesforce Analyst, Fidelity
I'm probably wrong. I may not be right about that.
bradmin
Key Advisor

New lead score rule for every salesforce campaign?

SOLVE

This is really, really janky and requires a thorough, careful review of all use cases to work, but if you absolutely have to score records this way, it could work in some capacity. I think there will be issues if the lead gets converted, and I'm not sure this specific tool can carry out all the conditions to cover that use case. 

 

[Edit: To robustly handle the lead conversion use case, you'd probably have to create Flow automation in Salesforce that works in conjunction with Process Builder. The time-delayed action of 30 days would pass a variable to Flow, which you'd use to find the associated lead or contact ID, then decrement the score accordingly. This starts to get into nontrivial setup, so this requires careful planning, but if successful, would fluidly handle the conversion case.]

 

[N.B.: One-to-many use cases can be a pain, especially given the Salesforce limitations of not being able to build them among most standard objects.]


Brad Mampe, Salesforce Analyst, Fidelity
I'm probably wrong. I may not be right about that.
0 Upvotes
JTChal
Member

New lead score rule for every salesforce campaign?

SOLVE

I asked HubSpot support for their ideas, and they told me:

 

"Regarding your question on scoring based on Salesforce campaigns, there is not a whole lot of flexibility here. You will not be able to create a "one size fits all" rule to score a set number of points for each engagement with a different Salesforce campaign. Similarly, you will not be able to award these points exclusively based on when the Salesforce campaign was associated (this might be possible via some custom API integration). The closest you can get is to rely on the value of the "Salesforce Campaign IDs" property in your lead scoring rules."

0 Upvotes
jennysowyrda
Community Manager
Community Manager

New lead score rule for every salesforce campaign?

SOLVE

Hi @JTChal,

 

While I am not a Salesforce expert, I found this discussion between @SalesforceScott and @bradmin and it touches upon at least getting Salesforce campaign information into HubSpot; could that be a good starting point for your end goal?

 

@bradmin please feel free to correct me/provide any additional tips and tricks to @JTChal that you think could help.

 

Jenny

0 Upvotes