Permissions: Users must have the Study Configure privilege to create, manage, and run rules.
A rule in Orchestrator is a saved set of conditions, created with the Condition Builder or the SQL Editor, that examines imported study data to find records that match the specified criteria. When triggered during import or by manual execution, a rule can generate issues and, for bidirectional EDC setups, open related queries. Rules can be added, edited, and deleted throughout the study.
Create Rule(s)
Access Orchestrator
- Click the 9-dot icon to open the Platform Menu.
- Select Study Management → Orchestrator on the left, then choose the study on the right to open Orchestrator.
- Click the Add Rule (plus sign) icon in the master header. The Add Rule window opens on Step 1: Build with the Condition Builder tab selected.
Step 1: Build
Use the Condition Builder tab or SQL Editor tab to build the conditions.
Using the Condition Builder
Create a Simple Rule (1 or 2 conditions)
- When: The first condition is defaulted to When rather than AND or OR. There is no action to take here.
- Data Store: Type or select the Data Mart or Staging Area from the drop-down.
- Domain: Type or select the Domain from the drop-down or use a wildcard / character substitution.
- Field: Type or select the Field from the drop-down or use a wildcard / character substitution.
- Operator: Select the Operator from the drop-down. By default, Include Selection is selected. Click the Exclude Selection if appropriate.
- Value: Type in the value for the field, or select Add Token. See the Add and Manage Tokens in this article.
- To add another condition, click the Add (+) icon and choose Add Condition. Select AND or OR from the dropdown on the left of the new row. (To add three or more conditions, see the section below to create an advanced rule.)
- Repeat steps 1 through 6 to complete the second condition.
- Optionally, reorder the conditions by clicking the 6-dot icon to the left and dragging above or below other conditions.
-
Click the Preview button at the bottom left. This triggers a validation check, displaying a success or error message. An error message displays if any field is not filled in.
A separate window opens, showing the records that meet the rule conditions and the related fields in the Rule Preview table. The SQL Preview section displays the SQL statements used to generate the results, along with the validation output.
To close the window, click the Close button at the bottom or the X at the top right.
- If you need to delete a condition, click the checkbox at the left of the condition and then click the Delete button.
- Click Save.
Create an Advanced Rule (3 or more conditions / with Grouping)
In Orchestrator, the AND operator is evaluated before the OR operator when using three or more conditions. Users can use the Add Group feature to control the evaluation order, ensuring that the logic aligns with the rule's intent.
- Build the first condition(s) as in steps 1–7 above.
- When two or more conditions must be evaluated together, click Add (+) and choose Add Group. Two rows are added inside a blue block. The first row begins with When; additional rows begin with AND or OR. Complete steps 2–6 above for each row.
- Group header operator: In the blue header, choose AND or OR to control how the entire group connects to the condition above.
- To create a group from existing rows, select the checkboxes at the left for the desired rows and click the Group button.
- To remove a group and retain the conditions, click Ungroup. Note: removing a group can change results when mixing AND and OR.
- Click the Delete Group button to remove the entire group; confirm Delete or Cancel.
- Finish building the condition for the rule by following steps 9-11 above.
Using the SQL Editor
Use this option to build the rule directly in the SQL Editor.
Tip: When switching to the SQL Editor, any conditions previously added using the Condition Builder will be automatically transformed into SQL statements.
- Click the Enable SQL Editor button.
A warning message displays, 'Are you sure you want to enable SQL Editor? If you enable SQL Editor, you will disable the Condition Builder and any changes you made.' - Click Enable to continue, or Cancel to dismiss.
- Build the rule using the SQL Editor.
-
Click the Preview button at the bottom left. This triggers a validation check, providing a success or error message. An error message displays if any field is not filled in.
A separate window opens, listing the records that meet the rule conditions and the defined related fields in the Rule Preview table. The SQL Preview section displays the SQL statements used to generate the results, as well as the run-time output of the validation.
Click the Close button at the bottom or the x at the top right to close the window.
- Click Save.
Add and Manage Tokens
To Add a Token:
- Within the Add / Edit Advanced Filter window, click in the Value field.
-
Click Add Token from the drop-down. The Add Token window opens.
- Name: Enter the name of the token (notice it begins with @).
- Description: Enter a description of the token.
- Value / SQL: Select either Value or SQL.
- Value: If Value was selected, enter the value.
- SQL: If SQL was selected, enter the SQL Query.
- Click the Validate button.
- The token editor may throw errors:
- Error (red text): if entered SQL does not have proper syntax, 'Invalid Sql statement: Syntax error in token.'
- Warning (yellow text): if the entered SQL has proper syntax but references to tables or columns do not exist in the data, 'Invalid object name' or 'Invalid column name.'
-
Update the SQL if needed.
Note: A token can be saved with warnings, but not with errors.
- The token editor may throw errors:
- Click the Save button.
To Edit a Token:
- Within the Add / Edit Advanced Filter window, click in the Value field.
-
Hover over the name of the Token to edit.
- Click the Edit Token icon. The Edit Token window opens.
- Make changes as needed.
- Click the Validate button.
- Click the Save button.
To Delete a Token:
- Within the Add / Edit Advanced Filter window, click in the Value field.
-
Hover over the name of the Token to delete.
- Click the Delete Token icon. A Delete Token confirmation window opens.
- Click OK to confirm, or Cancel to dismiss.
Step 2: Information
Within the Add / Edit window, define the Basic Information and Issue Information.
- In the Create / Edit Rule window, click Step 2: Information.
Basic Information - Name: Enter the name of the rule.
- Tag: Select the tag from the drop-down. (Tags are managed in Configuration.)
- Description: Enter a description of the rule.
- Status: Select Active or Inactive. When Active is selected, the rule will automatically run when data are imported. When Inactive is selected, a user with the Study Configuration privilege can manually run the rule.
-
Related Fields: Select related fields from the drop-down. These fields will be for reference only and do not impact the rule.
Issue Information - Primary Field: Select the field from the drop-down where the issue will be created.
- Priority: Select the priority from the drop-down.
- Assign To: Select User, Role, or User Group.
- User / Role / User Group: Select from the drop-down.
- Due in Days: Enter the number of days, or use the up/down arrows.
- Send Notification to the User / Role / Group: Check the box and select either Send immediately or Send in Batch. (If Send in Batch is selected, be sure the study is configured to send issues in batch.)
- Issue Text: Enter the issue text. The left curly bracket can be used to enter replacer values.
- Click the Preview button at the bottom left.
This triggers a validation check, and provides a success or error message. An error message displays if not all fields are filled in.
A separate window opens, listing the records that meet the rule conditions and the defined related fields in the Rule Preview table. The SQL Preview section displays the SQL statements used to generate the results, as well as the run-time output of the validation.
Click the Close button at the bottom or the x at the top right to close the window. - Click Save.
Step 3: Action
For studies configured for bidirectional queries with the EDC system, users can enable automatic query creation. When an issue is created as a result of a rule, a related query will also be created.
- In the Create / Edit Rule window, click Step 3: Action tab.
- Use the toggle to Enable query creation.
- Category: Select the category from the drop-down.
- Domain: Select the domain from the drop-down.
- Field: Select the field from the drop-down.
- Notification Group: Select the notification group from the drop-down.
- Query Text: Enter the query text. The left curly bracket can be used to enter replacer values.
- Click the Preview button at the bottom left.
This triggers a validation check, and provides a success or error message. An error message displays if not all fields are filled in.
A separate window opens, listing the records that meet the rule conditions and the defined related fields in the Rule Preview table. The SQL Preview section displays the SQL statements used to generate the results, as well as the run-time output of the validation.
Click the Close button at the bottom or the x at the top right to close the window. - Click Save.
Manage Rule(s)
Edit Rules
- Click the checkbox to the left of the rule to edit.
- Click the Edit icon in the master header, or click the rule name (blue hypertext). The Edit Rule window opens.
- Make the appropriate updates in the Edit Rule window.
- Click the Preview button.
- Confirm the updates in the Preview window.
- Close the Preview window.
- Click Save.
Deactivate / Activate Rules
By default, rules are active when first created and will be included in the Orchestrator evaluations and actions. Deactivate a rule to suspend it, and it will be skipped on all runs until reactivated. Deactivation does not retroactively remove prior outputs.
- Click the checkbox to the left of the rule to deactivate / activate.
- Click the Deactivate button in the master header. Notice the checkmark in the Active column is removed. This rule will not run until it is reactivated.
- To Activate the rule, click the checkbox to the left to highlight the row.
- Click the Activate button in the master header. The checkmark in the Active column displays and the rule will run again.
Delete Rules
- Click the checkbox to the left of the rule to delete.
- Click the Delete icon in the master header.
- Click Confirm to confirm the deletion.
Best Practices for Rule Creation
- When using the Condition Builder, use Preview frequently to validate and review the result set and the generated SQL. Switch to the SQL Editor only when necessary; enabling the SQL Editor disables the visual Condition Builder for the rule. Consider duplicating the rule first to preserve a visual version.
- Use Tokens instead of hard-coding. Create Value tokens for fixed constants (for example, a specific country or site) and SQL tokens for dynamic sets (for example, a subject cohort). Assign clear names to tokens (e.g., @subjects_with_fatigue), and ensure the token output type matches the filtered field. For example, do not use @site = '101 - University Hospital' (string) against DM.SITEID (numeric), because such a mismatch may return no rows.
-
In a condition, AND is evaluated before OR. Use a Group (blue block) to control the execution order, so that grouped conditions run first. Example:
AESER='Y' AND (AEREL='RELATED' OR AEREL='POSSIBLY RELATED') returns records with AESER='Y' and AEREL equal to RELATED or POSSIBLY RELATED.
AESER='Y' AND AEREL='RELATED' OR AEREL='POSSIBLY RELATED' without the grouping is interpreted as (AESER='Y' AND AEREL='RELATED') OR (AEREL='POSSIBLY RELATED'), which also returns all POSSIBLY RELATED records regardless of AESER.
- Use clear naming and tagging conventions. When naming rules, make it meaningful. Keep the name short, as it is displayed in the Opened By column in the Issues listing. Apply relevant Tags and add a concise Description specifying intent, the tokens used, and the expected outcome.