IMPORTANTAfter 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 article explains Rules Engine.
Overview
The Rules Engine is the control room for business automation. It allows you to build business rules that help trigger CTAs (Calls to Action), update scorecards, send emails, and much more.
The benefits of using the Rules Engine include:
- Robustness - perform complex operations with multiple sources and various types of transformations
- Usability - leverage auxiliary tools in the rules ecosystem that can help you build formulas, calculate trends, and debug rules
- Integration - build rules that enhance your experience with other features in Gainsight, such as Cockpit, Scorecards, and CoPilot
The Rules Engine is where Admins can build business rules to trigger CTAs, update scorecard measures, send emails and pull data from any object into a Gainsight object. Rules analyze data from native (SFDC or Gainsight) sources or from the Matrix Data Platform. The Rules Engine only functions with source objects that are related, either through Master-Detail or Lookup, to the Salesforce Account object. Rules can only reference one object at a time, plus the Account and/or CustomerInfo object.
Prerequisite Knowledge
Before you begin building rules in Gainsight, it's helpful to know the following, or to work with your Salesforce Admin to understand:
- Where is your usage data stored and how is it integrated? (Native/SFDC, Matrix/MDA, or Dataspaces)
- What is the usage data loading frequency, granularity and data week?
- Weekly or monthly: Determines whether to sum/avg or max/min, etc.
- Granularity: User level, instance (product) level, or account level
- Data week: Sun - Sat, or Mon - Sun
Additionally, you must be familiar with Salesforce and Gainsight objects, to some extent:
- Salesforce objects: Most SFDC objects only contain the present state of data
- CustomerInfo object: The equivalent of the Account object; it only contains the present state of data. Purpose of CustomerInfo object in Gainsight is to assemble various customer data in one object. During implementation, we make a mirror record if your account records on the CustomerInfo object.
- Usage data object: Gainsight's usage data object contains historical data on the usage and engagement measures you choose to track, as well as weekly or monthly snapshots of your current usage data
- MDA/Matrix Data: In order to access the Data Management console, and be able to view and load data, a user must have access to the Visual Force Page JBCXM.COM.
Gainsight Objects to Field Map:
- Navigate to Setup > Installed packages > click JBARA CSM > View Components. You will see a list of all Apex Classes, VF Pages, Objects and Fields that are part of our Managed Package.
Rule Types
The following types of rules are available in Rules Engine:
- BIONIC: Enables you to perform multiple fetches and transformations in a single rule, such as fetch data from multiple sources, merge, aggregate, and then load to an object. For more information about Bionic Rules, refer to Getting Started with Bionic Rules article.
- CUSTOM: Enables you to perform a single step function like fetch data and create CTA.
Note: Custom Rules will be removed in the near future. Gainsight recommends that you use Bionic Rules to leverage more of the Rules Engine capabilities. Gainsight is also developing a utility to assist with migrating Custom Rules to Bionic Rules. However, Custom Rules can still be used for with a few scenarios of Calculated fields.
Rules for Accounts vs. Relationships
Most of the time, Admins will configure rules for Accounts. However, if you are using Relationships in Gainsight, you can also create rules at the Relationship level. For more information, refer to the Relationships Overview article.
For more information about Bionic Rules support at Account and Relationships levels, refer to the Getting Started with Bionic Rules article.
Rule Building Process
The process for building a rule involves selecting a source object and all the fields on that object that you want to see or work with in the rule (20 max); optionally setting up filters to look for a subset of customers, and/or selecting criteria for doing different actions for Accounts or Contacts; configuring actions like triggering a CTA or loading data (50 actions max per rule); testing the rule, and scheduling it.
The following articles walk you through the basic steps to create a Custom Rule:
The following article walks you through the basic steps to create a Bionic Rule:
Rule Templates
You can import Custom Rule templates from Gainsight Vault into your own org. For information about how to import Rules from Vault, refer to the Import Email Templates article.
Rule Chain
Rule Chains are groups of related rules that have been chained together to execute one after another with a shared schedule. In the Rule Chain View, you can configure chains of rules, as well as view existing rule chains. For more information, refer to the Rule Chain article.
Rules Engine Use Case Tutorials
Gainsight has an extensive library of rules engine use case tutorials and examples. For more information, refer to the Rules Engine guides.
Export List of Rules
The Config Snapshot feature enables Admins to export a list of all of the rules in their org.
Some Admins like to keep a separate document to track all of their rules and associated actions, revisions, etc. This template was modeled after a document several of our customers are using.
Limitations
- The rules engine can insert, upsert, and update, but does not support the delete function, and should not be used to try and delete data in SFDC or Gainsight. As a workaround, Admins can delete data from SFDC by exporting the data out, deleting it with jitterbit, dataloader, or a similar tool. Alternately, a script could be run via workbench or the developer console.
- The Rule Results Excel sheet will contain only 100K records. We will make appropriate enhancements in upcoming releases so that the Excel sheet contains all of the fetched records.