Skip to main content
Gainsight Inc.

Customer Categorization with Case Expression Formula field

This tutorial explains you how to categorize various customers based on the revenue incurred from each customer.

Consider a situation in which you wish to categorize all your customers into Platinum, Gold, Silver and Bronze, based on the revenue generated by the customers. You can easily accomplish this task with the Case Expression. 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

  1. Navigate to Administration > Operations > Rules Engine.

  2. Click Dataset.

  3. Enter a Name in the Task Name field.

  4. Select Salesforce as the Data source.

  5. 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

  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

  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?