This article explains how to schedule your rules. Refer to the articles Setup Rules and Setup Rule Action Types before using this article for guidance on scheduling.

Scheduling and Executing Rules

You have the option of scheduling the execution of an individual rule, or setting up a Rule Chain to handle a group of related rules with a shared schedule.  

Schedule

Rules Engine scheduler allows you to run a rules using Basic or Advanced schedules. Select Schedule while creating a rule to navigate to scheduling screen. By default, Basic Schedule Type is selected. 

Basic

  • Frequency: Select  any of the following radio-buttons to run the rules accordingly
  • Daily 
  • Weekly
  • Monthly
  • Yearly
  • Every Weekday (MON-FRI): Select this option to run the rule every weekday.
  • Start Date: Select the start date for the rule runs.
  • End Date: Select the end date for the rule runs (Optional).
  • Preferred Start Time: This is in the time zone in your SFDC user settings.
  • Time Zone: This is set automatically depending on the Timezone selected in the Application settings > Timezone pane. For more information about Timezone Standardization, refer to Timezone Standardization at Gainsight.
  • Send notification email: This will send emails On Success/Failures to additional specified email addresses.
  • Run for historical periods: If start date provided is in the past, checking this option will run the rule from the selected start date to the present date. The number of runs is limited when the rules are run for a historical period. Refer to the following additional note:

Additional Note: Historical Periods

When the start date in this scheduler is set to a date in the past, it will run for the historic period, and load data.
Example: If you have the rule scheduled to run daily, then you can run it for the historical period of last 200 days. In the case of a weekly schedule, it will be for the last 200 weeks max.This basically helps prevent a huge number of rule runs being triggered by mistake, or when you do not realize how much time it is going to take for all the runs to complete. It puts all of the other rules in queue and delays other rule runs.

Advanced

Using Advanced schedule type enables you to run the rules as frequently as every two hours. 

Note: The minimum time period between rule runs is two hours.

  • Timer icon: Click this icon to view the next five rule run schedules for the cron expression provided (as displayed in the image provided).
  • Start Date: Select the start date for the rule runs.
  • End Date: Select the end date for the rule runs (Optional).
  • Time Zone: This is set automatically depending on the Timezone selected in the Application settings > Timezone pane. For more information about Timezone Standardization, refer to Timezone Standardization at Gainsight.
  • Send notification email: Enter the email address(es) in the respective fields to which an email is sent on Success/Failure of the rule runs.

Run Now

Once a Custom Rule is created, you have the option to RUN NOW. To do this, you will:
  1. Navigate to Rules Engine > RULES LIST tab.
  2. Click RUN NOW. The rule date will default to today's date

  1. Select the Test Run check box if you would like to receive an email with a summarized list of results. 

  1. Select the Include Gainsight support check box if you want to send the execution results to Gainsight support. In addition, you can send rule execution details to the email IDs entered in Send a copy of Rule Result email to.
  2. Click RUN.

Execution History

When looking at a list of rules, you will be able to see the history. If a rule was recently updated to run, but you haven not left this screen, you need to click REFRESH HISTORY.

*Status: Identifies the status of the rule.

*Last Rule Updated By: identifies the last person to modify the rule

*Last Rule Updated Date: identifies when the rule was last modified

* Rule updates will be saved only if a user modifies the rule, or if the user uses the NEXT button to navigate through a rule. If a user navigates through a rule via the breadcrumb trail (tabs) along the top of the rule pages, the user’s action will not be registered as a rule update.

To see the full execution log, expand the rule details where you can see the Action, Status, and Comment columns. 

When you click + icon beside View Logs (as shown in the image above), it shows the detailed information about the execution history of the specific rule.

Notes:

  • Each rule is limited to 200,000 records.
  • Rule updates will be saved only if a user modifies the rule, or if the user uses the NEXT button to navigate through a rule. If a user navigates through a rule via the breadcrumb trail (tabs) along the top of the rule pages, the user’s action will not be registered as a rule update.
  • Bionic Rule Preview displays basic details of tasks, including the link to download the final task output as csv.

If the rule results are configured to be stored in Gainsight file repository, Download RULE RESULT is enabled in the expanded view of rule run details. If not, this button is disabled. Click this button to download the rules results. For more information about configuring the storage of rule results, refer to the succeeding section.

Configure storage of Rule Results

Rule results can be stored in the Gainsight file repository or sent as Email attachments in excel sheets to the customers. A toggle to select from these two options is available in the Application settings page. To configure rule result storage:

  1. Navigate to Application settings > Storage. You can view the ‘Exported files gets stored in Gainsight file repository instead of sending it as attachments in Email’ toggle in this pane.

  1. Enable this toggle to store the rule results in the Gainsight repository. This also enables the Download RULE RESULTS button as mentioned in the preceding section. Or Disable this toggle to send an email with an attachment of rule results to the customer through Execution Results Email. The button to download the results is disabled in the Rule Details - Execution History tab.
  2. Click SAVE to save these settings.

Refer to the following table for rule results settings:

Storage toggle Email Attachment Execution history - Download Button
Enabled Disabled Enabled
Disabled Enabled Disabled

 Troubleshooting

If you face difficulty saving your rule's schedule, Ensure that there are no quotation marks in the rule's description field.