Skip to main content
Gainsight Inc.

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.

Case flowchart.png

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:

  1. Navigate to Administration > Rules Engine.
  2. Click + RULE. The New Rule window is displayed.
  3. Enter the following details.
    1. Enter a name in the Rule Name field.
    2. (Optional) Select a folder for the rule.
    3. (Optional) Enter a description for the rule. 
    4. Click NEXT.

Snag_1478ae61.png

  1. Click DATASET
  2. Enter a Name in the Task Name field.
  3. Select Salesforce as the Data source.
  4. Select Account as the Source Object.

Case Dataset.png

  1. Drag and drop Account Name and MRR fields to the Show section.

Show section.png

  1. Click Save.
  2. Click <-.

Create Transformation Task

To Create Transformation Task:

  1. Click + Task and select Transformation.
  2. Enter a name for the task in the Task Name field.
  3. Select the Source Dataset (here it is Case Dataset).

select source dataset.png

  1. Drag and drop Account Name to the Show section.
  2. Drag and drop Case Expression to the Show section.

Configure case expression.gif

Configure Case Expression

To Configure Case Expression:

  1. Enter Customer Type as the Output Field Label.
  2. Select String as the Output Data Type.
  3. Select
    1. MRR field
    2. >= operator
    3. Value
    4. 4000

This is the criteria for Platinum customers. If the MRR > 4000, customer is considered to be Platinum.

Configure case expression_1.png

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.

Set up case.gif

  1. Click + Case
  2. Select
    1. MRR field
    2. >= operator
    3. Value
    4. 3000
  3. Click + Criteria.
  4. Select
    1. MRR field
    2. < operator
    3. Value
    4. 3999

This criteria is for Gold Customers. The value MRR must be between $3000 and $3999.

Gold customer.gif

  1. Select Custom in the Then field and enter Gold customer.

Gold case.gif

  1. Similarly, create another two cases for Silver and Bronze customers with MRR between $2000-2999 and MRR less than $1999, respectively.

Silver and bronze.png

  1. Select Custom and type Invalid Customer in default field.
  2. Click SAVE.

Default case.gif

When you execute this rule, the following output is generated.

output.png

  • Was this article helpful?