Rules Analyzer enables Gainsight Admins to identify the rules which cause failures or identify the inefficiencies in performance. It also includes recommended actions to improve performance. This helps Gainsight Admins to analyze which Rules are broken and need debugging. This helps in comparing how a rule is performing and analysing how the rules in an Org are performing by consolidating rules, merging rules and reducing actions. Gainsight Admins can also schedule rules for optimum performance. Following are the four possible ways to analyze rules:
Scan examines the rules and describes how the rule can be improved. It helps Gainsight Admins identify where a rule is lacking efficiency.
Perform the following steps to run a scan on your rules:
- Navigate to Administration > Operations > Gainsight Analyzer > SCAN tab.
This displays a Rule 360 screen with a quick view summary of all your rules arranged in tiles at the top of the screen. The summary includes the following:
- Total rules
- Number of Bionic Rules and Custom Rules
- Number of tasks and actions that are scheduled
- Click on the Scan Rule icon to the right to see a complete analysis of the particular rule as shown below.
Clicking on the Scan Rule icon displays the Rule 360 screen which contains a detailed report on the particular rule. At the bottom of the screen, the Rule 360 provides a 30 day trend analysis of how the rule has performed.
Hovering over any date provides a bird’s view of the execution time and waiting time on that date as shown below.
The top of the Rule 360 screen contains a quick view summary of the type of rule (Bionic /Custom) and the tasks and actions associated with the rule. The following image shows a list of possible causes of rule failure or under performance as example.
Clicking on the expand icon for a deep dive on the cause and how it can be corrected.
- Click on each of the listed items to expand it and improve the rule performance. In the example below, clicking on the expand icon for Rule with no filter item, shows how the rule is fetching unnecessary data as it does not have filters. The Admin can then add appropriate filters for better utilization of the rule.
Currently, Scan checks the rules in your Org for the following 19 Scan points. Each of these has a similar message (similar to the example above) which you can expand to know more details.
A rule that is part of a scheduled Rule Chain, will have an active schedule and an end time in the future. If the rule does not have a schedule and the fields displayed include the last run on date, it implies the rule is not successful. The other fields displayed include Rulename, Ruletype, and Number of times the rule ran in last 7 days.
Rule Scheduled Early
Gainsight recommends admins to schedule the rules only after observing run times and execute the rule manually for at least a week. This Message appears when the rule has been created within 7 days and scheduled without any manual execution. The other fields displayed include Rulename, Ruletype, and Created On.
Rule with no Filter (example above)
Gainsight recommends that appropriate filters should be included while configuring a rule ("Apply to GS Customer" is not considered as a filter). If the rule has one or more fetch tasks without a filter, it starts fetching unnecessary data. Appropriate filters need to be added to fetch the necessary data and improve performance. The other fields displayed include Rule Name, Type, Source Type, Source Object, and Read Count.
Rule with no Date Filter
Gainsight recommends admins should include a date filter which helps in filter Rule Date while configuring a rule. If the rule has one or more fetch tasks without a Date filter, it fetches data for all dates. Apply Date filter to reduce the amount of data fetched and increase the performance. The other fields displayed include Rule Name, Task Name, Source Object, and Read Count.
No Action Configured
Every rule fetches data in order to have certain actions performed using the data. This message appears if a rule is fetching data but not performing any meaningful business action. The other fields displayed include Rule Name, Task Name, and Object Name
Rule is taking long time to Execute
This message appears when a rule has taken 5 minutes or more for at least 10% of total execution in the preceding 7 days (These numbers are configurable per tenant basis). The rule scan also provides a list of the 5 most time taking executions. The other fields displayed include Rule Name, Type, Source Type, Start At, End At time, and Execution (Exec) Time.
No Failure Email is Configured
Gainsight recommends admins to configure a failure email for every rule to ensure that they know when a rule has failed. This message appears when a Scheduled Rule is not configured to receive Failure Email. The other fields displayed will include Rule Name, Source Type, Exec Date, Process Status, and Number of failure records.
"Apply to Gainsight customer" Filter is Missing
If the "Apply to GS Customers" filter is not configured, the rule fetches data for all the accounts which are not part of Gainsight Objects. This message appears when this filter is missing from the rule. The other fields displayed will include Rule Name, Type, Source Type, Source Object, and Read Count.
Rule has Duplicate Actions
Sometimes, a user copies an action but forgets to delete the duplicate action. This message appears when a rule contains the exact same action multiple times. The other fields displayed include Set Number, Rule Name, Action Index, Action Name, and Target Object.
Rule has Frequent Partial Failures
This message appears when a rule has partially failed for at least 10% times in the preceding 7 days (The numbers are configurable at tenant level). The other fields displayed include Rule Name, Source Type, Exec Date, Status, and Number of failure records.
Gainsight recommends admins to consolidate rules with the same source object into a single rule with multiple actions. This message appears when multiple rules use the same object. If these rules are combined into a single rule with multiple actions, it results in greater efficiency. The other fields displayed include Rule Name, and Rule Type.
Use Pivot to Optimize
Gainsight recommends admins to reduce the number of actions associated with a rule if possible. This message appears when the actions for a rule can be reduced using the Pivot feature. The other fields displayed include Rule Name, Rule Type and Action Name.
Use “Case expression” to Optimize Rule
Gainsight allows admins to reduce the number of actions associated with a rule by using a Mapping/Junction object. This message appears when it is possible to reduce actions of rule using a “Case expression”. The other fields displayed include Rule Name, Rule Type and Action Name.
Rule Duplicated in Rule Chains
Gainsight recommends admins to have the same rule as part of multiple Rule Chains. This message appears when a single rule is part of multiple Rule Chains. The other fields displayed include Rule Name, and Rule Chain Name.
Sometimes, admins use different identifiers during Upsert/Update actions performed on the same target object which may lead to data corruption. This message appears when the identifiers of a rule differ from those of another rule which is also writing to the same target object. The other fields displayed include Target Object, Rule Name 1, Identifiers 1, Operation 1, Rule Name 2, Identifies 2, and Operation 2.
No Fetch Task Configured in Rule
Every scheduled rule must have one or more fetch tasks defined to avoid parallel executions being blocked. This message appears when no fetch task is present in the scheduled Rule. The other fields displayed include Rule Name, Schedule Cron, Exec Date, and Exec Time.
Rule Writing to Scorecard 1.0
Gainsight Scorecard 1.0 is soon to be deprecated. This message appears when a rule uses Scorecard 1.0 for its associated actions. Gainsight recommends admins to shift the actions to Scorecard 2.0 to continue using Scorecards. The other fields displayed include Rule name, Action, and Target Object.
Load to SFDC
This message appears when a rule takes too long to load to SFDC. The other fields displayed include Rule name, and Target Object.
Rule using Insert Operation
Gainsight recommends admins to use upsert action instead of Insert to avoid duplicates as insert operation will be deprecated soon. The other fields displayed include Rule name, Rule type, and Select field index.
The Comparator feature provides a clear view of the difference between execution of rules on one day vs. another. This helps Gainsight Admins to analyze which Rules are broken and need debugging. Admins can compare how a rule is performing by selecting two dates and comparing the rule run statistics on the selected dates.
Perform the following steps to compare
- Navigate to Gainsight Analyzer > DASHBOARD tab > Comparator tab
- Select the Start Date and End Date
Note: Ensure that Start Date is less than End Date.
- Click GO. The Comparator window displays a table containing all rule statistics. This helps admins to see what has changed and which rules are increasing the overall execution time.
- Click on the Rule Stats icon (as shown below) to know further details about the particular rule.
This window provides granular information about the rule including the success and failure rates.
The Comparator feature also shows when a rule is running perfectly and does not require any changes. Below is an example of a rule that is running without any changes on the two dates which informs us that no debugging action is required for this rule.
This feature helps Gainsight Admins to analyze the active rules in their Org and analyze which rules can be optimized.
- Click Optimize tab to view the list of rules that can be optimized in your Org and the preferred method of optimizing. The window lists has the following options to optimize:
- Click on the relevant drop down to see the rule description.
Consolidate to Single Rule
When multiple rules use the same Object, Gainsight recommends combining these rules into a single rule with multiple actions. Using this feature, admins can convert multiple Custom Rules into a single Bionic Rule.
Use “Case Expression” to Optimize
Gainsight recommends that after reducing the number of rules, admins should reduce the number of actions by using a “Case expression” to optimize. Click on the dropdown beside “Case expression” to optimize to see which actions can be combined using this feature.
Scheduling a rule at the right time is critical to its success. However, arriving at the right sequence of when to run a rule is difficult when an Org is running hundreds of rules. The Schedule feature analyses the rules based on several factors (such as, runtime, prerequisite rules etc) to arrive at the best sequencing possible for the best utilization. This can help the Admin know the right sequence in which the rules should be scheduled for reducing overall execution time.
The column on the left of the screen provides the order in which the rules can be scheduled for optimum performance.