Skip to main content
Gainsight Inc.

Rule Chain

Gainsight NXT

This article supports Gainsight NXT, the next evolution of the Customer Success platform. If you are using Gainsight CS Salesforce Edition, you can find supporting documentation by visiting the home page, and selecting CS > Salesforce Edition.

Not sure what your team is using? Click here.

 

This article explains admins how to simplify the process of scheduling groups of related Bionic rules that must run in a particular sequence. 

Overview

Rule Chains are groups of related rules that are chained together to execute one after another with a shared schedule. In the Rule Chain tab, you can configure chains of rules and view existing rule chains. In Rule Chain, you can also add rules as a sub-chain for every rule.

RC_LV1.png

Limitations:

  • You can add a maximum of 20 rules to a rule chain.
  • A rule can be added to a maximum of five Rule Chains.
  • The schedules of the Rules that are already scheduled to run are deleted when they are added to a Rule Chain.

For more information on the Rule Chain List view, refer to the Rule Chain Listing Page section.

Create Rule Chain

To create a Rule Chain:

  1. Navigate to the Administration > Rules Engine > Rule Chain.

  2. In the Rule Chain list view, click the Create Rule Chain option. The Create New Rule Chain page appears with the following three sections:

Chain Details Section

  1. In the Rule Chain Name field, enter the name for the rule chain to identify the chain uniquely.

  2. (Optional) In the Rule Chain Description field, enter a brief description for the rule chain.

  3. Click Continue

RC_LV9.png

Add Rules Section

  1. In the Add Rules section, add Rules to the chain and sub-chains, and then re-arrange rules to set the order of the run.
    Note: You can drag-and-drop rules in a rule chain to any level.

  2. Click Continue.

Notes: Rules at the same level run independently. However, if a Rule fails, then its sub-chains are not executed. 

Schedule

Rule Chain scheduler allows you to run rules in the following two ways:

Time-Based

The time-based schedule type allows you to schedule a rule chain daily, weekly, or monthly.

To schedule Rule Chains based on date and time:

  1. In the Schedule section of the Create Rule Chain page, select the Time-Based option.

  2. In the Schedule Type option, select one of the following options to set the rule chain frequency:

  • Daily: The following options are available when you select the Daily option:

    • Every Weekday (Mon-Fri): Select this option to run the rule chain only on weekdays.

    • Every day: Select this option to run the rule chain every day (Sun-Sat).

  • Weekly: Select the day of the week on which the rule chain must run once during the week.

  • Monthly: The following options are available when you select the Monthly option:

    • On Day: Select the day of the month on which the rule chain must run once during the month.

    • On the: Select any weekday in a Month on which the rule must run.

  1. In the Start Date field, select the date on which the execution of the rule chain must start.
  2. In the End Date field, select the date on which the execution of the rule chain must end.
  3. In the Select Time field, select the preferred start time in hours and minutes.
  4. In the Select Time Zone field, select the preferred time zone.
  5. Enable the Send notification email on every run toggle option to send the Rule Chain success or failure messages to the logged-in user.
  6. In the Mention Emails for Failure and Mention Emails for Success sections, add the email addresses of users who must be notified when this rule chain succeeds or fails.
    Note: You can add multiple email IDs separated by a comma.
  7. Click Save Rule Chain.

RC_LV11.png

Event-Based

This schedule type executes a rule chain in the following two ways:  

RC_LV12.png

Events Framework

You can run a rule chain using an event from the Events Framework. Using the Event Schedule type, you can run the rule chain using the CURL command. CURL command is a handy way to trigger a rule outside of Gainsight. The events-based triggering of a rule chain helps you eliminate the need to schedule a rule. In a broader sense, event-based triggering of a rule chain enables you to integrate rules with non-Gainsight services if you have developer support. 

To schedule Rule Chains based on events:

  1. In the Schedule section of the Create Rule Chain page, select the Event-Based option.
  2. Select the Events Framework option. 
  3. In the Select a Topic and Select an Event fields, select the appropriate topics and events.
  4. Enable the Send notification email on every run toggle option to send the Rule Chain success or failure messages to the logged-in user.
  5. In the Mention Emails for Failure and Mention Emails for Success sections, add the email addresses of users who must be notified when this rule chain succeeds or fails.
    Note: You can add multiple email IDs separated by a comma.
  6. Click Save Rule Chain.

S3 File Ingestion

This schedule type is applicable only if your rule has an S3 dataset. You can use this schedule type to trigger a rule chain automatically that is configured using an S3 dataset. When you upload a new CSV file that matches with the configuration as the S3 dataset, the S3 dataset rule is triggered automatically.

Note: If you are using the EQUALS option in the File Path field of your S3 dataset, you must ensure that the old and new file names must be the same. However, if you are using the STARTSWITH option in the File Path field of your S3 dataset, the rule in the rule chain is triggered for any CSV file uploaded that matches the string's start.

To schedule a rule chain based on an Event for S3 File option:

  1. In the Schedule section of the Create Rule Chain page, select the Event-Based option.
  2. Select the S3 File Ingestion option. 
  3. In the Select a Rule field, select the rule that contains S3 data information.
  4. In the Select an S3 Task field, select the S3 task for the selected rule.
  5. Enable the Send notification email on every run toggle option to send the Rule Chain success or failure messages to the logged-in user.
  6. In the Mention Emails for Failure and Mention Emails for Success sections, add the email addresses of users who must be notified when this rule chain succeeds or fails.
    Note: You can add multiple email IDs separated by a comma.
  7. Click Save Rule Chain.

Rule Chain Listing Page

You can view the Rule Chain listing page by navigating to the Administration > Rules Engine > Rule Chain tab. The listing page displays all the rule chains created by the admin.

Rule Chains are displayed on the listing page with the following columns:

  • Rule Chain Name: The name of the Rule Chain. Click on the name to navigate to the Rule Chain editing page.
  • Status: A toggle switch that indicates whether the rule chain is active. 

  • Number of Rules: The total number of rules that are added to the rule chain.

  • Last Run Status: The previous execution status of the rule indicating success, failure, or partial success. Clicking on this status navigates you to the Execution History tab of the rule.

  • Last Run: The date and time at which the rule chain was last triggered.

  • Next Run: The date and time at which the rule chain is scheduled for its next run.

  • Last Modified by: The name of a person who modified the rule chain most recently.

  • Created On: The date and time on which the rule chain was created.

  • Last Modified Date: The date and time on which the rule chain was last modified.

  • Created By: The name of the person who created the rule chain.

Click the '+' icon to add/remove any of the above columns to your view. You can also sort and rearrange columns as required.

Quick Filter

In the Rule Chain Listing view, you can filter the rule chains using the Rule Chain dropdown list into the following categories:

  • All Rule Chains
  • Active Rule Chains
  • Inactive Rule Chains

RC_LV4.png

Pagination

If you have multiple rule chains, use the pagination tool at the bottom right corner to navigate through different pages and view multiple reports, in a set of 20, 40, or 60 on a single page, based on your preference.

RC_LV3.png

Additional Options

Click the three-vertical dots icon of a Rule Chain to view the following additional options:

RC_LV5.png

Run Now

After a Rule Chain is created, you can use the Run Now option to configure the rule to run.

To schedule the rule chain:

  1. Click the three-vertical dots icon for a rule chain and click Run Now. The Rule Count Check dialog appears.
  2. In the Run this Rule Chain For field, select Once.
  3. Select the date when to run the rule chain in the Select Rule Chain Date field.
  4. Select the Test Run check box if you like to test-run a rule chain and receive an email with a summarized results list.
  5. In the Send Rule results to these email field, enter additional email addresses of users who must receive a copy of the Rule Chain result email.
    Note: The email ID of the logged-in user is auto-populated in the field.
  6. Click Run Now.

Edit Chain

This option allows you to edit the rules in the rule chain. Click Edit to navigate to the Chain Details section of the rule chain creation page.

Execution Logs

This option allows you to view logs of the rule chain along with the event and action data. The execution logs of a selected rule chain appear with the following sections:

RC_LV7.png

  1. Execution Logs: This list is arranged in descending order with the latest execution details appearing at the top. Click on the Date and Time stamp to view Log details of that execution of the selected Rule Chain.

  2. Execution Log Details: This log contains the following details of execution:

    • The date and time stamp indicating when the rule chain last completed the execution.
    • The total number of rules executed from the rule chain and the number of rules completed and failed.

    • Execution history of each triggered rule in the rule chain. You can click on each rule to view the complete logs of that rule in the Execution History tab of the rule details. For more information on the execution history details, refer to the Schedule and Execute Rules article.
  1. Refresh: Click this option to update the execution status of the rule chain.
  2. View Logs: Click this option to view the logs of the rule chain. 

Delete Chain

This option allows you to delete the rule chain permanently.

Known Issues

  • The date format that is currently accepted is YYYY-MM-DD.
  • There is a possibility that rule results emails may not trigger in the precise order that the rule chain executes.