Skip to main content
Gainsight Inc.

Rule Chain(Horizon Experience)

Overview

Rule Chains are groups of related rules 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.

Rules Engine interface displaying a list of rule chains with options for viewing, creating, and migrating rules.jpg

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 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

Rules Engine interface displaying the Create New Rule Chain page with steps for Chain Details, Add Rules, and Schedule.jpeg

 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.
    Notes:

  2.  You can drag-and-drop rules in a rule chain to any level.

  3. Click Continue.

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

Rules Engine interface on the 'Add Rules' step of creating a new rule chain.jpeg

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.

Note: Currently, we do not support scheduling a rule chain to run in repeat mode (for example, 2, 3, 4, etc.). Instead, we allow a rule chain to run once a day.

  1. In the Select Time Zone field, select the preferred time zone.

  2. Enable the Send notification email on every run toggle option to send the Rule Chain success or failure messages to the logged-in user.

  3. 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.

  4. Click Save Rule Chain.

Rules Engine interface on the 'Schedule' step of creating a new rule chain. Options for Time-Based or Event-Based scheduling are available.jpg 

Event-Based

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

The Event-Based scheduling option is selected with choices for Event Source including Events Framework and S3 File Ingestion.jpg 

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.

Rules Engine interface on the Schedule step of creating a new rule chain with the Event-Based scheduling option selected. Event sources include Events Framework and S3 File Ingestion.jpeg

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.

Rules Engine interface on the Schedule step of creating a new rule chain with the Event-Based scheduling option selected. .jpeg

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.

Rules Engine interface displaying the Rule Chain tab with a list of rule chains. The list includes rule chain names, statuses, number of rules, last run status, last run, next run, and last modified by details.jpeg

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

Rules Engine interface displaying the Rule Chain tab with a dropdown menu for filtering rule chains, including options for All Rule Chains, Active Rule Chains, and Inactive Rule Chains.jpg

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.

The bottom right, includes options for pagination and display settings. It shows a dropdown menu labeled Show 40 Rule Chains per page, which allows users to select the number of rule chains they want to display on a single page.jpg

Additional Options

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

Rules Engine interface displaying an expanded menu for a rule chain with options to Run Now, Edit Chain, view Execution Logs, and Delete Chain. A button to create a new rule chain is located at the top right.jpg

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.

Rules Engine interface showing a pop-up for running the 'Community Chain' rule chain. Options include running once, enabling a test run, and specifying email recipients. The buttons for Cancel and Run Now are at the bottom right.jpeg

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:

  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. 

  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. 

Details include rule execution status, with one rule failed and one succeeded.jpeg

Delete Chain

This option allows you to delete the rule chain permanently.

Rules Engine interface showing Rule Chain tab with Delete Chain option .jpg

Known Issues

  • The date format that is currently accepted is YYYY-MM-DD.

  • There is a possibility that rule results emails may trigger in a different order than the rule chain executes.

 

  • Was this article helpful?