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.
You can now fetch up to 200K records when triggering a rule.
- 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.
- AutomatedAlertRules__c and ActionTemplates__c objects will no longer be used for storing rule definitions. All rule definitions will be migrated to MDA. If you are using these objects in any form, such as reporting, please get in touch with Gainsight Customer Support.
Note: This change will not have any impact on existing rules. You will be impacted only if you have a report configured, or a workflow configured using these objects.
- Currency, Percentage, Email, Picklist, SFDCID, and GSID data types are supported by the Rules Engine. For more information about Rules Engine supports new data types in MDA, refer to the Rules Engine section in the Release Notes Version 5.5 February 2017..
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: will determine 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 equivalient 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.
Following are the type of rules available in Rules Engine:
CUSTOM: Use this rule to perform a single step process like fetch data and create CTA.
BIONIC: Use this rule type to perform multiple fetches and transformations in a single rule like fetch data from multiple sources, merge, aggregate, and then load to an object. For more information about Bionic Rules, refer to the Getting Started with bionic Rules article.
ENGAGEMENT: This rule type will soon be deprecated. Gainsight recommends using Custom rules or Bionic Rules to leverage more of the Rules Engine capabilities.
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:
With the May 2016 release of Gainsight, 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 Gainsight Vault article. For a list of the custom fields that were utilized in some of the rules, refer to the Vault Rules Custom Fields spreadsheet.
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
In Nov. 2016, Gainsight introduced the Config Snapshot feature, which 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.