Business Rule Conditions

The conditions of a rule compose its “if” statement. If these conditions are met, then the rules engine performs the action specified in the rule.

Examples of conditions include:

  • If the contact’s state equals Montana
  • If the incident customer thread contains 'warranty'
  • If the forecast for the opportunity is greater than $5,000

The basic form of a condition is “If [this object] [has this relationship to] [the basis for comparing the object].”

Tip: It isn’t necessary to add conditions to a rule. If for example, you want to apply the rule action to all objects, then simply don’t add any condition to the rule.

A condition contains these primary elements:

  • Field—The field is the element you want to consider in the rule. In the previous examples, the fields are state, customer thread, and forecast. Each type of rule has a set of fields that are used to add conditions for its rules. This can be an answer, contact, incident, chat, opportunity, organization, or task rule.
  • Operator—The operator is the relationship between the field and the value. In the preceding examples the equals, contains, and greater than operators are used. The selection of operators varies with the field. Some are simply “equals” and “not equals,” while others express more complex relationships.
  • Field—The field is the element you want to consider in the rule. In the previous examples, the fields are state, customer thread, and forecast. Each type of rule has a set of fields that are used to add conditions for its rules. This can be an answer, contact, incident, chat, opportunity, organization, or a task rule.
  • Operator—The operator is the relationship between the field and the value. The preceding example uses the equals, contains, and greater than operators. The selection of operators varies with the field. Some are simply “equals” and “not equals,” while others express more complex relationships.
  • Value—The value is the comparison you want to make with the field. In the examples, the values are Montana, warranty, and $5,000. The format of the value changes, depending on the field. You might select a menu option, enter a string of text, or select a check box or option to define the value.

The fields are organized according to their type. In the first example (“If the contact’s state equals Montana”), the state field is a contact field. The second example has the field customer thread, which is an incident field, and the third example field, forecast, is an opportunity field.

When you click Add IF Condition Based On, a list of field types specific to the type of rule appears. Each field type has a drop-down list of the available fields. For example, contact rules let you select Contact and Organization fields, while incident rules let you select Incident, Contact, and Organization fields.

Available Field Types for Rule Bases

Rule Base Field Types
Answer Answers
Chat
  • Incident
  • Contact
  • Organization
Contact
  • Contact
  • Organization
Incident
  • Incident
  • Contact
  • Organization
Opportunity
  • Opportunity
  • Contact
  • Organization
Organization Organization
Task
  • Tasks
  • Opportunity
  • Incident
  • Answers
  • Contact
  • Organization

Some conditions depend on how you’ve configured your site. For example, customizable menu items, such as products, categories, and dispositions, appear as conditions only if you add them. If the rules engine doesn’t detect the presence of customizable menu items, custom fields, and items such as SLAs, mailboxes, Outreach emails and mailings, and Feedback surveys, they don't appear in the list of conditions. If you add them while you create rules, you must close and reopen the Rules editor for them to display.

Note: You can add items to a customizable menu that already has items in it without needing to close the Rules editor for them to be visible.

In addition to the fields that are specific to each type of rule, all rules can use rule variables for rule conditions. If you defined no variables in the rule base, this disables the Rule Variables field type.