Business rules
Business rules are used to create universal expressions and conditions that control the behavior of processes. They are built in a visual editor from blocks – operations, functions, variables, parameters, and values entered directly – and are a convenient alternative to SQL expressions. A rule always returns a value of a specific type, e.g. text, a number, a logical value, a date, or a list of users.
Unlike form rules, which are executed in the user's browser and control the appearance and behavior of the form, business rules are evaluated by the system while the workflow runs, e.g. when checking an action execution condition or selecting a path. A rule defined once can be used in many places in the configuration – including other rules. If a rule needs to be changed, it is enough to modify it where it is defined – the change will apply to all places where the rule is used.
Where rules are defined
Business rules can be defined at two levels:
- globally – in the Global definitions section – the rules are available in all processes,
- in a process – in the Definitions node of the selected process – the rules are available only within that process.
Global rules
To go to the list of global business rules, select the Global definitions section in the icon bar of the side panel, and then the Business rules item. A new rule is added with the Add global business rule button.

Rules whose configuration cannot yet be edited in Designer Studio are marked on the list with a warning icon. Hovering over the icon displays the message Configuration available only in Legacy Designer Studio – such a rule can be viewed and edited only in the Legacy Designer Studio application. This currently applies to global business rules – both existing and newly added ones. In Designer Studio, you can still add, group, delete them and check where they are used.
Process rules
To go to the list of business rules of a process, expand the process in the application tree, select the Definitions node (or the Definitions tab in the process view), and then the Business rules item. The number of rules defined in the process is displayed next to the Business rules item. A new rule is added with the Add business rule button.

Rule list
The business rule list looks the same at the global level and at the process level. Above the list, there are:
| Element | Description |
|---|---|
| Search | Filters the rule list by name. |
| Add business rule / Add global business rule | Creates a new rule named New business rule (at the global level: New global business rule). A process rule is opened in the rule editor right away. |
| Add group | Creates a new rule group (see Rule groups). |
The list contains the Name and Documentation columns – the second column shows the description entered in the Documentation field of the rule configuration. Rules and groups that contain unpublished changes are marked with a blue dot.
Clicking a rule row opens the Rule configuration panel on the right side of the screen, and the Open configuration in full view icon next to the rule name opens the rule editor. The rule row menu (⋮ icon) contains the following commands:
| Command | Description |
|---|---|
| Open configuration in full view | Opens the rule in the rule editor. |
| Open configuration in the side panel | Opens the Rule configuration panel. |
| Show usages | Displays the Usage list in the left panel, i.e. the places in the configuration where the rule is used (see Rule usages). |
| Add business rule | Adds a new business rule (at the global level: Add global business rule). |
| Move to group | Moves the rule to the selected group. The <No group> option removes the rule from a group. The command is available when at least one group exists on the list. |
| Delete business rule | Deletes the rule. |
For rules available only in Legacy Designer Studio, the Open configuration in full view icon and command are not displayed, and the Rule configuration panel only shows a message that the rule must be edited in Legacy Designer Studio.
Rule groups
Business rules can be grouped to make them easier to manage when there are many definitions. To create a group, click the Add group button – a New group item appears on the list, and a panel opens on the right where you can rename the group (by clicking its name) and enter its Description.
To place a rule in a group, select the Move to group command from the rule menu and choose the group. A new rule can be created directly in a group with the Add business rule (Add global business rule) command from the group menu. The group menu also contains the Open configuration in the side panel and Delete group commands. Rules belonging to a group are displayed on the list nested under its name. Groups are also visible in the tree of the Functions tab in rule editors, which makes it easier to find the required rule.
Rule configuration
The Rule configuration panel opens after clicking a rule on the list, with the Open configuration in the side panel command from the rule menu, or with the Configuration button in the rule editor.
The panel header displays the rule name – clicking the name lets you change it. Below, there is the rule GUID (the Copy content to the clipboard button copies its full value) and the Show usages button. The Basic tab contains the following fields:
| Field | Description |
|---|---|
| Documentation | Rule description displayed in the Documentation column of the rule list. The Translations button lets you define its translations. |
| Return type | Type of the value returned by the rule (see Return type). |
| Definition | Preview of the rule content. The field is displayed in the panel opened from the rule list. The Open the expression editor button in the upper-right corner of the field opens the rule in the rule editor. |
The Open configuration in full view button in the panel header opens the rule in the rule editor, and the Close button closes the panel.
Return type
The return type of a rule should match the place where the rule will be used – e.g. a rule calculating a date should have the Date type, and a rule used as a condition – the Yes/No type. The return type determines where the rule is available: in configuration places that expect a specific data type, you can use a rule that returns that type.
| Type | Description |
|---|---|
| Text value | Any string of characters. Default type of a new rule. |
| Decimal value | A numeric value, e.g. an amount or a calculation result. |
| Yes/No | A logical value – POSITIVE (TRUE, 1) or NEGATIVE (FALSE, 0). Used, among others, in action execution conditions and when selecting a path based on form field values in flow control steps. |
| Date | A date or a date with time. |
| User list | A list of users or groups in the ID#Name format, where the identifier can be a login or an e-mail address (the name is optional). Used, among others, to specify the people for whom an element is to be visible or available. |
Where possible, the system converts values between types automatically. However, when the rule is executed, the system checks whether the returned value matches the set type – if it does not, an error is returned. Setting the correct type therefore makes it easier to diagnose configuration errors.
Rule editor
Business rules are built in the rule editor, which opens in the Designer Studio workspace after a new process rule is added, after selecting the Open configuration in full view command, or after clicking the Open the expression editor button in the Definition field. Above the editing area, there is the Return button and the name of the edited rule (e.g. Rule: Requires supervisor approval), and on the right – a side panel with the elements that can be inserted into the rule.

The editor is shared by many places in the Designer Studio configuration – a general description of how it works and of the available variables can be found in the Variables chapter.
Building a rule
A rule is built from blocks. To insert an element, click a place in the editing area, and then double-click the element in the side panel or drag it to the editing area. As indicated by the hint displayed in the empty editing area, the Ctrl + Space key combination displays a list of suggestions, and typing the @ character lets you search for objects. Constant values, e.g. numbers, can be typed directly in the selected place of the rule.
Functions that require arguments are inserted together with empty argument slots. For example, the IF THEN function from the Conditional choice group inserts an IF [condition] THEN [value] row and an ELSE [value] row. Next to the condition row, there are buttons that move the row up or down, add another condition row, and delete the row. Conditions are checked one by one until one of them is met – the value from the THEN section of that row is then returned. If none of the conditions is met, the rule returns the value from the ELSE section.
Inserted elements are visually distinguished – numbers are displayed in blue, and rule parameters as yellow blocks. A block selected in the editing area can be deleted with the Delete or Backspace key.
When entering constant values, keep the following rules in mind:
- numbers are entered without a thousands separator, and the decimal part is separated with a period,
- text does not need to be enclosed in apostrophes,
- dates should preferably be entered in the ISO 8601 format (e.g.
2026-11-02), - logical values can be entered as
true/falseor with the POSITIVE/NEGATIVE functions.
Comparison operations (=, <>, >, >=, <, <=), logical operations (AND, OR, NOT), and the condition of the IF THEN function require a logical value. If a value of a different type is used in such a place, it is converted according to the following rules:
| Value | Conversion result |
|---|---|
Text true or 1 (case-insensitive) | POSITIVE |
Text false or 0 (case-insensitive) | NEGATIVE |
| Any other text | NEGATIVE |
Number 1 / 0 | POSITIVE / NEGATIVE |
| Any other number or a date | Rule execution error |
The editor also provides:
- the Close the side panel / Open the side panel button in the upper-right corner of the editing area – hides and shows the side panel again,
- the Configuration button – opens the Rule configuration panel,
- the Testing button in the lower-left corner – displays the rule testing bar (see Testing a rule),
- the Fit to screen, Zoom out, and Zoom in buttons in the lower-right corner – let you control the zoom level of the editing area. As the info icon hint explains, the zoom can also be adjusted with the Ctrl + Scroll keyboard shortcut.
Additional information on building rules with the keyboard can be found in the article Writing business/form rules without using a mouse available on the technical blog.
Contextual help
Hovering over a function or operation block in the editing area displays contextual help with the element name and a description of what it does.
Side panel
The elements that can be inserted into a rule are grouped on the tabs of the side panel. There is a Search field above the element tree.
| Tab | Content |
|---|---|
| Operations | Arithmetic and logical operations and comparisons (see the table below). |
| Functions | Process business rules, global business rules, integration functions, and built-in functions (see Business rule functions). |
| Values | Variables – System fields, Form fields, Global constants, Process constants, Context variables, and Performance indicators. The Context variables group includes, among others, Current user, Current date, Document entry points, Paths, and Form display modes. A detailed description of the variables can be found in the Variables chapter. |
| Objects | Identifiers of configuration objects, e.g. form fields, steps, or paths. |
| Parameters | Rule parameters (see Rule parameters). |
The Operations tab contains the following elements:
| Group | Element | Description |
|---|---|---|
| Arithmetic operations | +, -, *, / | Addition, subtraction, multiplication, and division. Adding two text values joins them together. |
| Logic operations | AND, OR, NOT | Conjunction, disjunction, and negation of conditions. |
| ANY TRUE | Returns POSITIVE if at least one of the given conditions is met – replaces combining many OR operators. | |
| ALL TRUE | Returns POSITIVE if all of the given conditions are met – replaces combining many AND operators. | |
| Comparisons | = | Equal. |
| <> | Not equal. | |
| >, >= | Greater than, greater than or equal. | |
| <, <= | Less than, less than or equal. | |
| EMPTY | No value. |
The Functions tab lets you use other, previously defined rules in a rule – simply expand the Process business rules or Global business rules group and insert the selected rule. Rules with parameters are marked in the tree with the (...) characters. This way, complex logic can be defined once and called in many places.
Rule parameters
Parameters let you create universal rules that can be reused in different scenarios. A parameter is defined once in the rule, and wherever the rule is used, an appropriate value is passed to it, e.g. the value of a form field.
Parameters are defined on the Parameters tab of the side panel, in the Local variables section. The Add button opens the New parameter window:
| Field | Description |
|---|---|
| Name | Parameter name displayed on the parameter list and on the parameter block in the rule. |
| Type | Type of the value passed to the parameter: Text value, Decimal value, Yes/No, Date, or User list. |
| Description | Parameter description that helps to use it correctly. |
| Encode special characters | As the info icon hint explains, any unsafe characters in the parameter value are escaped before being used in a query to prevent its logic from being changed (e.g. the apostrophe ' is replaced with ''). |
Defined parameters are displayed in the Local variables section together with a type icon, and their number is shown next to the section. The parameter menu (⋮ icon) contains the Edit, Delete, and Show usages commands. To use a parameter, double-click it on the list – in the rule, it is displayed as a yellow block.
Testing a rule
You can check how a rule works without running the entire process. The Testing button in the lower-left corner of the editor displays a bar with the following elements:
| Element | Description |
|---|---|
| Element ID | ID of the workflow element in the context of which the rule will be tested. |
| Test | Executes the rule with variable values taken from the specified workflow element and displays the returned value. |
| Preview | Displays the expression with variable values substituted from the specified workflow element. |
The Test and Preview buttons become available after an element ID is entered. The arrow on the right side of the bar collapses it.
Using business rules
A defined rule can be used in any place in Designer Studio where an expression is built, provided that the type returned by the rule matches the type expected in that place. Business rules are used, among others, to:
- calculate default values of form fields,
- specify action execution conditions,
- select a path based on form field values in flow control steps,
- restrict the visibility and availability of paths and form fields,
- build other, more complex rules.
To use a rule, go to the Functions tab in the expression editor, expand the Process business rules or Global business rules group, and insert the rule. If the rule has parameters, pass values to them after inserting it.
In a purchase requisition process, the supervisor's opinion is to be required only when the order value exceeds a specific threshold. To achieve this:
- A Requires supervisor approval rule with the Yes/No return type was defined in the process.
- An Amount to approve parameter of the Decimal value type was added to the rule.
- The rule content was built with the IF THEN function: if the parameter value is greater than the threshold (e.g.
10000), the rule returns POSITIVE, otherwise – NEGATIVE. The threshold does not have to be hard-coded – it can be calculated by a separate rule or taken from a process constant. - The rule was used in the condition that controls whether the Supervisor opinion form field is required, passing the value of the form field holding the total order value to the parameter.
This way, the same rule can be used in different places of the process with different parameter values.
Rule usages
The Show usages command (available in the rule menu on the list and in the Rule configuration panel) displays the Usage list in the left panel of Designer Studio – a list of the configuration places where the rule is used, together with the object type and the application it belongs to. The list can be searched with the Search field and narrowed down with the Add filter option. Before changing or deleting a rule, it is worth checking where it is used.
Business rule functions
In addition to the defined rules, the Functions tab of the side panel contains the Integrations group and the Functions group with built-in functions divided into folders.
Integrations
| Function | Description |
|---|---|
| SQL COMMAND | Lets you define a part of the rule as an SQL query in which variables can be used. |
| DATA SOURCE VALUE | Retrieves a value from a specific column of a data source. |
| SDK EXECUTION | Lets you use an SDK extension in the rule. |
Conditional choice
| Function | Description |
|---|---|
| IF THEN | Creates a logical condition with the IF, THEN, and ELSE sections. |
| POSITIVE | Condition met (YES, TRUE, 1). |
| NEGATIVE | Condition not met (NO, FALSE, 0). |
| PATH | Selects a path of the given process. |
Item list
These functions are available only in process business rules (they are not available in global business rules).
| Function | Description |
|---|---|
| ITEM LIST COUNT | Returns the number of rows of an item list. |
| HAS ANY ROWS | Returns TRUE if the item list contains at least one row, otherwise FALSE. |
| SELECT VALUES | Returns the values from the specified item list column. |
AI rules
| Function | Description |
|---|---|
| AI ANALYSIS RULE COUNT FOR INSTANCE | Counts the AI rules applied to the workflow element. |
| AI ANALYSIS BROKEN RULE COUNT FOR INSTANCE | Counts the AI rules broken on the given workflow element. |
| AI ANALYSIS SCORE FOR INSTANCE | Returns the AI analysis score for the workflow element. |
| AI TEXT SUMMARY | Prepares a summary of a text of a specified length (number of words). Uses an external AI model and requires an additional license. |
| AI SENTIMENT ANALYSIS | Performs a sentiment analysis of a text and returns one value from the given rating scale (by default: -1 – negative, 0 – neutral, 1 – positive). Uses an external AI model and requires an additional license. |
| AI PROMPT | Passes a prompt and system instructions to an LLM and returns the result as text. Uses an external AI model and requires an additional license. |
Users
| Function | Description |
|---|---|
| CURRENT USER IS ONE OF | Checks whether the current user belongs to a specified group of people – returns TRUE or FALSE. |
| USER IS ONE OF | Checks whether the given user, user list, or group is on the given list or in the given group of users. |
| USERS | Returns a list of users as a collection of ID#Name values separated by semicolons. |
| GROUP MEMBERS | Returns all members of a group (including subgroups) as a collection of ID#Name values separated by semicolons. |
| SUBSTITUTES OF | Returns a collection of current substitutes in task delegation mode for the specified user. |
Number
| Function | Description |
|---|---|
| ROUND | Rounds a numeric value with the given precision, e.g. ROUND [1.25] [1] returns 1.3, ROUND [1.25] [0] returns 1, and ROUND [11.25] [-1] returns 10. |
Text
| Function | Description |
|---|---|
| TO UPPER | Converts text to uppercase, e.g. contract → CONTRACT. |
| TO LOWER | Converts text to lowercase, e.g. CONTRACT → contract. |
| TEXT LEN | Returns the length of a text (number of characters). |
| SUBSTRING | Returns a part of a text based on the start character index and the number of characters. The first character has index 1. |
| STRING REPLACE | Replaces the specified phrase in a text with another one. |
| INDEX OF | Returns the position of the first occurrence of a string in a text. |
| CONCAT | Joins text values into one text. |
| TRIM | Removes white space from the beginning and end of a text. |
| LIKE | Checks whether a text matches the given pattern – returns TRUE if it does. |
| CONTAINS | Checks whether a text contains a specific fragment (case-insensitive). |
| STARTS WITH | Checks whether a text starts with a specific fragment (case-insensitive). |
| SPLIT | Splits a text into parts using the given separator. The result is a collection of elements separated by semicolons. |
| REMOVE HTML TAGS | Removes all HTML tags from a text. |
| TEXT | Lets you enter a text with the option to define translations. |
Using the CONCAT function inside the LIKE function lets you create advanced filtering conditions for data sources, e.g. in the configuration of Choice field form fields. Additional information on filtering data sources with the CONCAT and LIKE functions can be found in the article Using CONCAT inside the LIKE function to filter data sources available on the technical blog.
Date and time
| Function | Description |
|---|---|
| NOW | Returns the current date and time. |
| TODAY | Returns the current date – the returned time always points to 00:00:00. |
| DATE DIFF | Calculates the difference between two dates in the selected unit (second, minute, hour, day, business day, week, month, year) and returns it as a number. |
| ADD DATE | Adds a specified number of seconds, minutes, hours, days, months, or years to a date or subtracts it (to subtract, enter a negative number). |
| DATE PART | Returns an integer representing the second, minute, hour, day, day of week, month, or year of the given date. |
| MONDAY – SUNDAY | Return the name of the corresponding day of the week in English. |
| IS BUSINESS DAY | Checks whether the given date is a business day according to the business days calendar. |
Element collections
| Function | Description |
|---|---|
| GET IDs | Returns only the identifiers, separated by semicolons, from an ID#Name collection, e.g. 144#Shock absorber;14#Radiator → 144;14. |
| GET NAMEs | Returns only the names, separated by semicolons, from an ID#Name collection, e.g. 144#Shock absorber;14#Radiator → Shock absorber;Radiator. |
| IS IN | Checks whether an element is in a collection (or in one of several collections). Elements are compared as case-insensitive strings, taking white space into account. |
| COLLECTION | Combines many element collections into one. |
| GET AT INDEX | Returns the element at the specified position of a collection. |
| SUM | Returns the sum of the values of a number collection. |
| AVG | Returns the arithmetic mean of the values of a number collection. |
| MAX | Returns the largest value of a number collection. |
| MIN | Returns the smallest value of a number collection. |
| COUNT | Returns the number of elements in a collection. |
| DISTINCT | Returns the unique values of a collection. |
Conversions
| Function | Description |
|---|---|
| DECIMAL TO TEXT | Converts a floating-point value to text. |
| TEXT TO DECIMAL | Converts text to a floating-point value. |
| TEXT TO DATE | Converts text to a date. Lets you convert a date written in a non-standard format – both the date and its format must be given as text. |
| FORMAT DATE | Formats a date according to the given pattern. |
Files
| Function | Description |
|---|---|
| ATTACHMENTS COUNT | Returns the number of attachments related to the element. |
| CONTENT AS BASE64 | Returns the attachment content in Base64 format. |
| CONTENT TYPE | Returns the MIME type of the attachment. |
| FILE NAME | Returns the file name of the attachment. |
| GET ATTACHMENTS | Returns the IDs of one or more attachments of the element. |
| PICTURE | Loads a file and returns it in Base64 format. |
| GET PHOTO GEOLOCATION | Retrieves the location from the photo metadata in the 'Latitude, Longitude' format. Collection values are separated by semicolons. |
Additional information on business rules can be found on the KB technical blog in the following articles: