After the October 2018 release, Admins cannot create new Custom Rules. Gainsight recommends creating Bionic Rules as they are more powerful than Custom Rules, and they help Admins reduce the number of overall rules that you need to configure and manage.

For assistance with Bionic Rules, check out the following resources:



This tutorial demonstrates a detailed example of using a Calculated Field with Custom Rules. Admins monitor product usage data frequently and take appropriate actions on usage data patterns, such as growth and decline in product usage. This example uses a Calculated Field to determine a decline in usage by referencing a running average, and then creates a Call to Action (CTA) for a CSM to follow-up with a customer.

Currently, you can set up a rule for this tutorial using Custom Rules only but not using Bionic Rules. Calculated Fields functionality is not completely evolved in Bionic Rules and is in development now. When this functionality is fully supported in Bionic Rules, this tutorial will be updated to use Bionic Rules to set up a Rule.

Perform the following key procedures to set up the rule:

  1. Create a rule to inspect usage data, looking for a trigger point of 25% by using a Calculated Field.
  2. The calculated field will determine the running average of Logins over a 1-week period.
  3. Create a CTA with a Playbook for a CSM to contact the customer.

Note: Keep the Usage Data clean and accurate to avoid triggering CTAs against false-positives (or conversely, missing true positives).

Create a Custom Rule

In this section, create a custom rule using a Calculated Field for comparison. Navigate to Administration > Rules Engine and click Create Rule.


Create Rule

Create a New Rule with the following parameters:

  • Rule Type: Custom
  • Rule For: Account
  • Rule Name:  Logins dropped by 25% in the Past Quarter
  • Description: (Optional) Detect accounts for which logins, compared to a weekly running average, have dropped by 25% or more.
  • Click NEXT. Setup Rule page appears.

Create Rule page.png

Setup Rule

In the Setup Rule page:

  1. Configure the rule as shown:
  • Show:  Account::Id, Account::CSM, Account::Account Name, Usage Data::Logins
  • Filters:  Usage Data::Logins / not equal to / Check (NULL)
  • Account Lookup: Account
  • Time Identifier: Date

NOTE:  Checking NULL eliminates some false positives.

  1. Click Add Calculated Field to configure the calculated field.
Add Calculated Field.gif
  1. Configure the Add Calculated Field dialog as shown below:
  • Field Name: Logins over Past 3 Months
  • Type of calculation: Comparison
  • Calculate difference in: Percentage
  • Under A:
    • Select Aggregation (over time)
    • SUM / Logins
    • Past / 1 /  Weeks
  • Under B:

    • Select Aggregation (over time)
    • AVG / Logins
    • Past / 3 / Months
  • Click OK to save and return to the Rule

Add Calculated Field dialog.png

  1. Click Next to proceed to the Setup Action page.

Setup Action

In the Setup Action page:
  1. Configure the Action as shown below:
  • Action Type: Call to Action
  • Create/Close:  Create CTA
  • Name: Logins for ${Account::Account Name} dropped by 25% in the past Quarter  (Type @ to use tokens)
  • Type: Risk
  • Priority: Medium
  • Status: New
  • Reason: Usage Drop
  • Owner Field: Account::CSM
  • Default Owner: <Your Name or Other Default>
  • Due Date: Run Date + X Days
  • Comments: Logins for ${Account::Account Name} dropped by ${Logins over Past 3 Months} (Type @ to use tokens)
  • Criteria: Click +CRITERIA and add:
    • Logins over Past 3 Months / less or equal / value / -25
    • Logins over Past 3 Months / greater than / value / -100


  • This example uses an additional criteria to filter out some false positives (avoiding 100%).  
  • The negative value represents a decrease/decline in percentage (e.g. -25%)
  1. Click Run Now to run the rule now. Run Rule dialog appears.Click Save to run the rule later.

Setup Action page.gif

Run Rule and Review CTAs

Test Run.png

You can perform a test run before executing the rule to determine the outcome of the action. To perform a test run:
  1. Select the Test Run checkbox in the Run Rule dialog.
  2. Provide an email address to receive a copy of the Rule result.
  3. Click Run.

When the Test Run is executed, you will receive an email that shows the number of CTAs will be created that match the criteria.

To execute the Rule now, do not select the Test Run checkbox in the Run Rule dialog and click Run.

To review the CTAs created:

  1. Navigate to the Cockpit page.
  2. Search the CTAs with logins. You can see the CTAs created successfully.
Run and Review CTAs.png
  • You can schedule the rule Daily, Weekly, Monthly, or Yearly. For more information on how to schedule the rules, refer Scheduling and Executing Rules.
  • If you run the same rule again, the rule will update the existing CTAs that match the criteria.
  • You can set up additional actions such as to Close CTAs for the Logins that are no longer below the 25% threshold.