Rules are a feature that helps you increase or decrease the scores of leads within the same segment, based on criteria.
The segment of a lead is only determined by the decision trees and the overrides. Rules can't change the segment of a lead.
Let's take the example of 1 node: in a Decision Tree-based Customer Fit model, leads falling in the same nodes of the tree would have the same segment (very good, good, medium, low).
Let's say there is a node in the Tree regrouping all the 1,000+ B2B Software companies which fall into the Very good segment. How can you score companies from the US better than from France or UK but penalize the ones from Australia?
You could either split this node further with "country is United States" but you risk overfitting your model by creating nodes too small and you would need to create as many splits as countries.
Or you can add bonus points to companies located in US and in France, and malus points for the ones located in Australia.
This can be done on the "Rules" page when the Advanced mode is activated. Learn how to do this in this article.
Pre-requisite
- You have Admin or Architect roles
- You are in a Customer Fit model and have activated the Advanced mode.
In the option "Apply custom configuration (in SQL)" you can use the following format for example.
CASE
WHEN (LOWER(company__country) = LOWER('United States') ) THEN 50
WHEN (LOWER(company__country) = LOWER('France') ) THEN 30
WHEN (LOWER(company__country) = LOWER('Australia') ) THEN -10
ELSE 0
END
Only the relative difference between US, France, Australia matters, not the absolute number. In this example, this means that if 3 companies are all the same but they are each located in these different countries, the US company will be higher scored than the French, than the Australian.
Another handy example: distinguishing people within the same company. Let's say your decision is only based on firmographic data (industry, size, country...) and you cannot create a deeper tree without risking overfitting it. This means that all people from the same company will be scored based on this company trait.
Example: Mary is Director of Product while Sarah is Product Manager both at Slack.
Based on the decision tree, both Mary and Sarah fall into the node containing the B2B Software 1,000+ and based on the threshold would therefore be scored very good and 90.
To score higher Mary over Sarah, you could apply a rule providing bonus points to Mary's higher seniority.
CASE
WHEN (LOWER(pers_seniority) IN LOWER('executive', 'director') ) THEN 20
ELSE 0
END
The expected SQL sentence starts with CASE and ends with END. Use the operator "+" to use multiple rules for points to accumulate.
CASE
WHEN (LOWER(company__country) = LOWER('United States') ) THEN 50
WHEN (LOWER(company__country) = LOWER('France') ) THEN 30
WHEN (LOWER(company__country) = LOWER('Australia') ) THEN -10
ELSE 0
END +
CASE
WHEN (LOWER(pers_seniority) IN LOWER('executive', 'director') ) THEN 20
ELSE 0
END
Based on the experience of building models for a lot of our customer we created a default configuration that you can also activate and that is defined as follow.
CASE
WHEN company__metrics__employees >= 1000 THEN 45 + 1.0 * company__metrics__employees / 500
WHEN company__metrics__employees >= 200 THEN 40 + 1.0 * company__metrics__employees / 50
WHEN company__metrics__employees >= 100 THEN 37 + 1.0 * company__metrics__employees / 25
WHEN company__metrics__employees >= 50 THEN 30 + 1.0 * company__metrics__employees / 5
WHEN company__metrics__employees >= 25 THEN 10 + 1.0 * company__metrics__employees / 3
WHEN company__metrics__employees >= 10 THEN 5 + 1.0 * company__metrics__employees / 2
ELSE -COALESCE(LENGTH(COALESCE(email, domain)), 200)
END +
CASE
WHEN domain like '%.edu' THEN -200
WHEN domain like '%.edu.%' THEN -200
ELSE 0
END +
CASE
WHEN LOWER(company__category__industry) LIKE '%software%' THEN 10
WHEN LOWER(company__category__industry) LIKE '%media%' THEN 5
WHEN LOWER(company__category__industry) LIKE '%services%' THEN 10
WHEN LOWER(company__category__industry) LIKE '%health care%' THEN 10
WHEN LOWER(company__category__industry) LIKE '%real estate%' THEN -5
WHEN company__category__industry IS NOT NULL THEN 1
ELSE 0
END +
CASE
WHEN LOWER(company__geo__country) LIKE '%united states%' THEN 7
WHEN LOWER(company__geo__country) LIKE '%canada%' THEN 5
WHEN LOWER(company__geo__country) LIKE '%australia%' THEN 5
WHEN LOWER(company__geo__country) LIKE '%new zealand%' THEN 5
WHEN LOWER(company__geo__country) LIKE '%france%' THEN 3
WHEN LOWER(company__geo__country) LIKE '%germany%' THEN 3
WHEN LOWER(company__geo__country) LIKE '%united kingdom%' THEN 4
WHEN LOWER(company__geo__country) LIKE '%russia%' THEN -20
WHEN LOWER(company__geo__country) LIKE '%china%' THEN -20
WHEN LOWER(company__geo__country) LIKE '%india%' THEN -50
WHEN LOWER(company__geo__country) IS NOT NULL THEN 1
ELSE 0
END +
CASE
WHEN LOWER(company__tags) LIKE '%saas%' THEN 2
WHEN COALESCE(REPLACE(REPLACE(REPLACE(company__tags, '"', ''), '[', ''), ']', ''), '') <> '' THEN 0
ELSE 0
END +
CASE
WHEN email like '%@aol%' THEN -50
WHEN email like '%@sbcglobal.net%' THEN -20
WHEN email like '%@yahoo%' THEN -5
WHEN company__is_personal = 1 AND email not like '%@gmail%' THEN -10
ELSE 0
END
The scale of points you choose defines the impact the rules will have on the scoring distribution within a segment:
- Scale of 0-100 points: medium impact on the score distribution, your leads will be slightly re-ordered within the segment
- Scale of 100-1000 points: high impact on the score distribution, leads touched by the rules will be sent to the score limits of the segment
- This is because 1 point = 0,05% conversion rate. If a lead is falling into a node converting at 30% and touched by a rule giving +100 points -> The raw score of this lead goes from 30 to 30+100*0,05=35