The Rule Chain feature helps simplify the process of scheduling groups of related rules (Custom and Bionic) that you need to run in a particular sequence. This sequence is based on the scheduled time of the rules. With Rule Chains, ‘Rule B‘ automatically starts as soon as ‘Rule A’ completes, and there’s no need to schedule them separately. Rule Chains are helpful, for example, if you are loading usage data via rules, and then you want to trigger CTAs based on that usage data.
You’ll continue to configure and modify individual rules in the List View, but do not schedule them.
Parent and Child Rules:
With Rule Chains, Gainsight introduced the option of configuring parent and child rules. For every rule, you can add a child rule. This is discussed in detail in the following procedure:
- You can add a maximum of 20 rules to a rule chain.
- One rule can be added to a maximum of five Rule Chains.
- Rules that are already scheduled will have their schedule deleted when they are added to a Rule Chain.
You can drag-and-drop rules in a rule chain.
To create a Rule Chain:
1. Go to Administration > Rules > Rule chain view > + Rule Chain.
2. Enter details for the following fields:
- Name: The name of Rule Chain being created.
- Description: The description of the Rule Chain being created.
3. Click CREATE. A card with the new Rule Chain name appears.
From this card:
- Switch the Rule Chain status ON or OFF. When the rule chain is already scheduled, if you switch the rule chain to OFF, the schedules associated with the rule chain will be deleted. You should schedule the rule chain to run the rule chain again in a schedule.
- View the scheduled Rule Chain date and last run status.
- View the number of rules associated with the selected Rule Chain.
- Click VIEW to view the rules associated with the Rule Chain.
4. Click the Pencil icon to add rules that should be part of this rule chain.
5. From the Select drop-down box, search and select the rule that you want to add in the Rule Chain. The rule automatically gets added to the Rule Chain. Rules that are already a part of another Rule Chain will not appear in the Select drop-down box.
The following image describes how the Load to Usage Data from MDA rule is added to the Rule Chain being created.
6. Click SAVE. In addition, you can click UNDO to obtain the last saved state of the Rule Chain being created.
7. (Optional) You can click the + icon to add a child rule. Also, you can click the Unlink icon to unlink a rule from a Rule Chain. After you unlink a rule from a rule chain, if you want to add the same rule later, the schedule associated to the rule in the rule chain will not be applied automatically.
- In the example below, if rule number 2 fails, rule number 3 (child rule) will not be executed.
- All rules at the same level are executed and are not dependent on the success of the previous rule. For example, rule number 4 will execute even if rule number 2 or rule number 3 has failed.
8. Click SCHEDULE and enter the following details:
- Start Date: The start date of Rule Chain execution.
- End Date: The end date for Rule Chain execution.
- Preferred Time: The preferred time for Rule Chain execution.
- Email results to: The email addresses to which Rule Chain results are to be sent.
9. Click CREATE. A card similar to the following image is created:
10. Click the Run icon and enter the following details:
- Rule Chain Date: The date on which Rule Chain will be executed.
- (Optional) Select Test Run to check the results of the rule without actually making changes to your production data.
- Send a copy of Rule Result email to: Enter email address to send a copy of the rule results to.
- Include Gainsight support checkbox: Select this to send rule chain execution details to Gainsight support.
11. Click RUN.
Parallel Rule Runs
Rule Chains (or Rules) can run in parallel. Any two Rule Chains (or Rules) scheduled at the same time can run in parallel, if:
- Both are mutually exclusive
- Both are not writing to the same object
- One is reading from and other is not writing to the same object
This ensures rules are executed faster by reducing the wait-time in queue. Also, the manual rule runs are prioritized over scheduled rule runs.
Note: Multiple reads to the same object are allowed while running rules in parallel.
- When running a rule chain manually, the calendar icon does not allow you to click in and choose a date for rule execution. (Est. fix timeframe: mid-May)
- The date format current accepts YYYY-MM-DD.
- It's possible Rule results emails and rule success emails may not trigger in the precise order that the rule chain actually executes.