Share This:

Hi Everyone, As discussed in the last blog, We will continue with the topic of business rule, In this topic, we will cover On-screen and On-Page load triggers.

 

Understand the processing of business rules having After Save trigger:

This topic explains how the system processes business rules having the After Save trigger.

  • The following diagram illustrates how After Save rules process when a Ticket is created manually, through email, through web services, or through another automated process.

                                                                     

 

  • The following diagram illustrates how After Save rules process when a Ticket is updated manually or updated by a rule in a previous round.

 

                                               

 

When the On Update By User Or Rule option is selected instead of the On Update By User option, if the last update was made by a user and not by a rule, the system performs around to evaluate the criteria of all such rules. After the system has gone through all the rules once, the system stops, because there would be no further updates by a user, but only by rules.

 

Example

Consider a scenario where there are 10 rules. Out of the 10 rules, five rules have the On Create option and five rules have the On Update By User Or Rule option.

When you create a new ticket, the business rules are processed. If one of the rules containing the On Update By User Or Rule option is evaluated, which results in updating a ticket, the system checks all the rules one by one again. The system stops this process only when no updates are made to a ticket.

If one of the rules using the On Create option runs and causes an update, then a new round of rules will run and all rules will be evaluated again from top to bottom. Only those using the On Update By User Or Rule option will possibly run in the 2nd or subsequent rounds.

 

Triggering sequence considerations:

 

You can have rules defined and associated with different parts of your workflows (states, transitions, groups, and entire workflows).

The order in which the system processes rules depends on the internal ordering of rules based on triggers and on administrator-defined ordering.

It is important to order your rules properly, taking into account how the rules relate to each other.

Triggers are processed in the following order.

On UpdateOn Create

1. On Exit (for State)

1. On Enter

2. On Exit (for Group)

2. On Create as part of a copy/move operation

3. On Transition

3. After Save (On Create)

4. On Enter (for Group)

 

5. On Enter (for State)

 

6. Updated in State or Group (for State)

 

7. Updated in State or Group (for Group)

 

8. Updated in any State

 

9. Updated in any Group

 

10. On any Transition

 

11. After Save (On Update By User Or Rule)

 

For linked records, the system processes rule in production as shown in the following table. In addition, Administrators should set the order for rules attached to the same part of a record definition. The best way to update the triggering order is on the Business Rules page. View the rules in the Expanded View, expanding the nodes to see the rules you want to re-order and then change the settings in the Order column.

 

OperationOn Source ItemOn Linked Item
Linked item create in state A as a result of copying
  1. Upon Item Copy
  2. On Linked Item Create
  1. On Enter (on A)
  2. On Create as part of a copy/move operation
  3. After Save (On Create)
Linked item update in state A and group G
  1. On Linked Item Update
  1. Updated in State or Group (on A)
  2. Updated in State or Group (on G)
  3. Updated in any State
  4. Updated in any Group
  5. After Save (On Update By User Or Rule)
Linked item update with transition A-B and in group G
  1. On Linked Item Update
  1. Updated in State or Group (on A)
  2. Updated in State or Group (on G)
  3. Updated in any State
  4. Updated in any Group
  5. After Save (On Update By User Or Rule)
Linked item update with transition A-B and between groups G-H
  1. On Linked Item Update
  1. On Exit (on A)
  2. On Exit (on G)
  3. On Transition (on A-B)
  4. On Enter (on H)
  5. On Enter (on B)
  6. On any Transition
  7. After Save (On Update By User Or Rule)

 

 

 

On-Screen business rule:

Select On Create, On Update, or both. This trigger is useful for assigning tickets based on category, setting field values based on other field values, giving the user informative messages based on selections they made, or changing field visibility as a user fills out a form.

Ex. Auto Assignment

 

On-Page Load

Select On Create, On Update, or both. This trigger is useful for defining default values, identifying assignees, or changing field visibility immediately when the page loads to hide fields that don't pertain to the situation or maybe revealed later while the user fills out the form. When you apply a quick template to a record, the record page refreshes and the business rule is fired based on the selected trigger.

Ex. Default Assignment

 

Best Practice for On-screen and On page load rules:

  • On-Screen business rule with On Update trigger loops and the actions are performed multiple times. Make sure that the defining criteria set on the business rule do not match after an Action has been triggered.  An action should change a value in the ticket so the rule no longer executes against that ticket.
  • Our recommendation for On-screen or On-Page load business rule is to apply of dropdown fields. If we apply On-screen rule on a simple text field with large text in it, It will give you performance issues. We should avoid applying On-screen business rule on a single line or Multiline text field if the value is not pre-populated.
  • When a field is used as Criteria in an On-Screen business rule, the rule can not apply a 'Set Field' action to that field.

 

 

We will continue to publish the next blogs on the business rule so we get more insights. So stay tuned and thanks for reading the article. Please rate the blog and add comments to share your experiences.