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.
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.
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.
- 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 the following capabilities:
- Send Email with Marketo Email Service
- Few scenarios of Calculated fields
These capabilities will be supported in Bionic Rules, once the custom rules migration utility is available.
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. See Relationships Overview for more information. 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 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 Creating Rule Chain.
Rules Engine Use Case Tutorials
Gainsight has an extensive library of rules engine use case tutorials and examples. See the Rules Engine area for links to specific 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.
- 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.