Customer Categorization with Case Expression Formula field
This tutorial explains how to categorize your customers based on the revenue generated by each customer.
For the purposes of this tutorial, we'll assume you wish to categorize your customers into Platinum, Gold, Silver and Bronze, based on the revenue generated by the customers. You can easily accomplish this task using the Rules Engine Case Expression option. You can create four cases in Case Expression. The requirements for a Customer to be categorized as Platinum can be mentioned in the first case, Gold requirements can be specified in the second case, and so on.
Assumptions
- If the MRR of a customer is greater than $4000, customer is considered to be a Platinum customer.
- If the MRR of a customer is between $3000 and $3999, customer is considered to be a Gold customer.
- If the MRR of a customer is between $2000 and $2999, customer is considered to be a Silver customer.
- If the MRR of a customer is less than $2000, customer is considered to be a Bronze customer.
Create Dataset
To Create Dataset:
- Navigate to Administration > Rules Engine.
- Click Create Rule. The New Rule window is displayed.
- Enter the following details.
- Enter a name in the Rule Name field.
- (Optional) Select a folder for the rule.
- (Optional) Enter a description for the rule.
- Click NEXT.
- Click DATASET
- Enter a Name in the Task Name field.
- Select Salesforce as the Data source.
- Select Account as the Source Object.
- Drag-and-drop Account Name and MRR fields to the Show section.
- Click Save.
- Click <-.
Create Transformation Task
To Create Transformation Task:
- Click + Task and select Transformation.
- Enter a name for the task in the Task Name field.
- Select the Source Dataset (here it is Case Dataset).
- Drag-and-drop Account Name to the Show section.
- Drag-and-drop Case Expression to the Show section.
Configure Case Expression
To Configure Case Expression:
- Enter Customer Type as the Output Field Label.
- Select String as the Output Data Type.
- Select
- MRR field
- >= operator
- Value
- 4000
This is the criteria for Platinum customers. If the MRR > 4000, customer is considered to be Platinum.
4. Select Custom in the Then field and enter Platinum Customer.
This is the Case Action which writes the value Platinum customer in output column Customer Type.
- Click + CASE
- Select
- MRR field
- >= operator
- Value
- 3000
- Click + CRITERIA.
- Select
- MRR field
- < operator
- Value
- 3999
This criteria is for Gold Customers. The value MRR must be between $3000 and $3999.
- Select Custom in the Then field and enter Gold customer.
- Similarly, create another two cases for Silver and Bronze customers with MRR between $2000-2999 and MRR less than $1999, respectively.
- Select Custom and type Invalid Customer in default field.
- Click SAVE.
When you execute this rule, the following output is generated.