Building criteria

Build conditions by using the Criteria builder. Reuse the criteria in other builders to create business rules and work queues. Build complex criteria by chaining existing criteria.

About this task

If you create work queues and business rules from Builder on the user interface, you can query the database for data when you define the work queues and rules without having to create queries by using the GraphQL interface.

Procedure

To create criteria: Allow roll back to earlier versions

  1. In the criteria library, click New criteria.
  2. Enter a name for the criteria, which is visible to general users in your organization. You can edit the name later.
  3. Review the logical name for reference.
    The logical name of the criteria uniquely identifies the criteria in the system. This value is automatically generated based on the text that you enter in the name field, but you can change the logical name until you save the criteria for the first time. The logical name must be a unique name.
  4. Enter a description for the criteria to help your users understand the condition that it refers to.
    This description is displayed next to the criteria name in the criteria list.
  5. Optional: Set the category.
    A category is similar to a tag, for example, you might add the tag priority orders to the criteria.
  6. Optional: Activate the criteria by setting the toggle to Active.

    Activating criteria makes them visible and available to others in your organization after you create it. Incomplete criteria are not visible to general users even if they are activated. Criteria must be both complete and activated to be shown to others. If you deactivate criteria that are currently active, it will no longer be available for others to use.

  7. Optional: Make the query in real time by setting the toggle to On.

Define new criteria:

  1. Click Create new.
  2. Set the database view, for example, graph.
  3. Select a business object from Primary data object, for example, Order, to set the scope of the condition.
  4. Specify criteria.
    • Use the Criteria editor tab, which allows you build your criteria by entering conditions that are based on the fields available for each type of business object. See figure 1 for an example.
    • Use the Criteria source tab, which is an advanced source view that allows you to refine and define your criteria by using operators and expressions that are not available to the criteria editor. See figure 2 for an example.
  5. Click Save.

Build from existing criteria:

  1. Click Select existing.
  2. Set the database view, for example, graph.
    The criteria that are available for the database view are listed in the table.
  3. Select a business object from Primary data object, for example, Order, to narrow the list to conditions that are based to a specific object.
    The criteria that are based on the database view are displayed and are available for building a new condition.
  4. Define the criteria by selecting AND or OR as the operand and by selecting one or more criteria from the list.
    See the figure 3 for an example.
  5. Click Save.

Example

In the following example, the condition is defined by selecting columns from the Order data object from the graph database view.
Figure 1. Defining the criteria by using the editor view
Selecting table columns to create criteria.

In the following example, the condition is defined by writing a query in the source view to select data values from the Order data object from the graph database view.

Figure 2. Defining the criteria by using the source view
Using the source editor to write a query.

In the following example, two existing conditions are chained together by using the All operand to create a new condition.

Figure 3. Chaining criteria to create a new definition
Combining criteria to create a new condition.

What to do next

Your criteria now ready to be activated. After it is activated, you can use the criteria to build new criteria definitions, or to define a work queue, or to define a business rule.