What is a rule location (Which rule should be triggered first?)

Rules location is there to prioritize the system rule checking in the trigger. Once a trigger starts, such as 'a ticket is created in the inbox', the system checks for rules in the trigger.

When just one rule applies for the ticket, tickets' location is irrelevant.

For example: Suppose you have a rule that determines when a ticket's title or body contains "support", it is assigned to "Support" and when a ticket's title or body contains "new" it is assigned to "New". If no tickets contain both "Support" and "New" there's no problem, each is assigned to its respective assignee.

But sometimes, more than one rule applies.

The rules are processed in order. Once a rule is successful, the system executes the actions defined in the rule and then continues checking for and running other rules that also apply. For example: Suppose you have a rule that determines that all tickets are assigned to "Support" (you decided not to use any condition) and a rule that determines when a ticket's title or body contains "new" it is assigned to "New". A ticket that contains "new" is assigned to both "Support" and "New".

When more than one rule applies, the decision which rules to execute is made by 2 variables: the 'Continue processing rules / Stop processing rules' drop-down in the rule itself and the location of the rule in the trigger.

If it weren't for the 'Stop processing rules' option inside the rule, rules' location would still have no meaning. BUT, the option does exist. At the bottom of each rule, there's a drop-down list with 2 choices: either you choose 'Continue processing rules' or 'Stop processing rules'. Choosing to 'stop' means that once the current rule applies for the ticket, the system will stop checking if lower located rules apply for the ticket as well (but higher located rules will be counted). Choosing the 'Continue' option means the system will continue checking for lower located rules.

For example:

Let's go back to our last example; what happens with a ticket that contains both "support" and "new"? The "Support" rule comes first, and then the "New " rule.

If we choose to "Continue" in the 'Support' rule, then the ticket is assigned to both "Support" and "New" (because we continued the check to the next rule that applies, the "New" rule). If we choose the 'Stop' option, the ticket will only be assigned to "Support" (because we stopped checking after executing the rule). If it would have been the other way around and the "New" rule would have been first, then the ticket would have been assigned only to "New" - That is why rules numbers within a trigger has significant meaning.

The rule location in the trigger should be defined in order of importance.

If the rules before a given rule have no relations to it (so there is no chance that a trigger might trigger it as well), or you don't mind that those rules will also be executed, then the decision is easy: just number it however you like.

However, if you want a rule to be executed alone, with no other rules in the trigger to be also executed, then you must define the rule first and then choose the "stop" option in the bottom drop-down inside the rule.

Remember: You can always change rule location to suit your needs.