> ## Documentation Index
> Fetch the complete documentation index at: https://docs.engini.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Business Rules

Create business rules that let you control how your application behaves in response to specific events.
Discover the power of Business Rules to make your app dynamic by following several steps.

## Step 1: Build your rule

### Create business rule

Business Rules let you define automatic behavior in an app based on specific conditions or events. They can trigger actions such as updating records, opening or closing forms, displaying messages, refreshing screens, or changing session variables.

1. Press the “Business rule” section located at the right side of the screen.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/oS1j-QbVx4TsfzwP-ZBbH_untitled-design-17.png" alt="" />

2. Click **Create Your First Rule** if no Business Rules have been created yet.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/G_jHXgKhntirxSJIIoxPH_untitled-design-18.png" alt="" />

If a Business Rule already exists, click **Add Business Rule** to create an additional rule.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/rOFDPfqbGXSmP_NWhqwEs_untitled-design-19.png" alt="" />

### Name your business rule

By default, each new rule is assigned the name “new busniess rule”.
This can be altered via a few simple steps:

1. Click the “new business rule” phrase located in the top left of the page.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/-PHbhT_U94aYO4iHIftg1_untitled-design-20.png" alt="" />

2. Remove the current name and enter the new name.

3. Save the rule.

## Choose a trigger

Triggers define the event that starts a Business Rule. A Business Rule must have a trigger in order to run, because the trigger determines when the rule should be activated, for example when a button is clicked, a dropdown is opened, or another supported event occurs in the app.

1. In the displayed “Choose Active Block” section, select the “Apps” software that you want to use as your trigger. You can also filter the trigger tasks directly.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/5FPskZWE5KjL5B0-mLvGV_untitled-design-21.png" alt="" />

2. Choose the trigger activity from the available options.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/L_Uwl-i0KtH6fNlM3ahkH_image.png" alt="" />

3. Fill in the requested fields.

**Note:** When selecting any trigger action (excluding barcode), it provides access to three groups of objects: **parent screen values, new values, and old values.**

These values are the ones you can use in subsequent actions as you can see in the image below:

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/brSeggPsCMCB9zKqvGhUM_untitled-design-22.png" alt="" />

Now, let’s redirect our attention to delve into a variety of potential triggers for the app:

### On field value changed

Click on the empty field “Choose Field”. A tooltip will popup showing the fields you’ve defined in your Screen Properties.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/3zzdGXrCKGB8kvHkGujCd_2026-09-22-110003.png" alt="" />

* *Button changed* - Choose the field you want from this list, initiating the trigger’s activation upon any change to the chosen field’s value.

### On barcode input

This trigger allows your app to react to barcode input events.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/0MyQjGRE5dObSGN3Gq5ad_2026-09-22-105922.png" alt="" />

### On record creation

This trigger activates when a new record is added to the specified table.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/s_7NL9om68w6skgghj98V_2026-09-22-110030.png" alt="" />

### On record changed

This trigger activates when a record is modified or updated within the app.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/yhePR-Qk7JC8gXc1I-qoz_2026-09-22-110013.png" alt="" />

### On record delete

This trigger activates when a record is deleted within the app.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/zW1PEure4GX1aypAhvD6V_2026-09-22-110102.png" alt="" />

### On record clicked

Triggers the Business Rule when a user clicks a record.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/QVvA8DGUC94D8X6FVQh84_2026-09-22-110021.png" alt="" />

### On add record clicked

This trigger activated when a user clicks the “Add Record” button to create a new entry.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/qNnl7XYHFBQYJ9B10I5vw_2026-09-22-105914.png" alt="" />

### On screen load

This trigger represents a specific event that occurs when a user loads a particular screen or page within the application.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/k4xhD4sWoBhU_R6K-nQMD_2026-09-22-110109.png" alt="" />

### On button clicked

Click on the empty field labeled “Choose button”. A tooltip will appear, displaying the button you’ve defined in your properties.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/NaCTp5YzpO9iagB9l5SVs_2026-09-22-105931.png" alt="" />

* *Button -* Select the wanted button from this list, initiating the trigger’s activation upon any button clicked happened.

### On dropdown clicked

When this trigger is activated, it signifies that the user has interacted with a dropdown field on the screen. In response to this interaction, you have the opportunity to define specific actions.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/ICWI6Vtq7aJ727YDXi0p9_2-51.png" alt="" />

1. *Dropdown* - Select the dropdown field that should trigger the Business Rule when the user interacts with it.
2. *Execute On Screen Load* - Enable this option if the rule should also run automatically when the screen is loaded. If disabled, the rule will only run when the configured dropdown event occurs.
3. *Columns to listen to refresh DropDown* - Select the columns whose value changes should refresh the dropdown. When one of the selected columns is updated, the dropdown data is reloaded so it can reflect the latest values or conditions.

### iFrame Event

The **iFrame Event** trigger is designed to listen for specific events triggered within an iFrame and initiate workflows accordingly.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/uilCsy8hZ9oU6icJhPWzL_image.png" alt="" />

An **iFrame** is a frame embedded in a webpage that displays content from another website.

This trigger allows Engini to respond dynamically to user actions within the embedded content, such as form submissions and button clicks.

## Add an Action

1. Click on the “Next step” button to add an activity block.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/9NXUsCOZG-zsvMl--4sT__untitled-design-23.png" alt="" />

2. Select the software you want to use for your action. For example: Select Engini software.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/eK0n1rHY4d6iAW8hyRspS_chatgpt-image-sep-22-2026-12-08-55-pm.png" alt="" />

3. Fill in the requested fields.

Now, let’s shift our focus to explore a selection of potential App’s actions:

### Sort and Filter records

The action enables you to arrange records based on specific criteria (sorting), narrow down the displayed records based on defined conditions (filtering).

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/IFO0oF8aqBNaxS7pUtosh_2-56.png" alt="" />

1. *Top N -* In this field you can define the maximum number of values you want to retrieve. For example, by entering the value 1, the activity will return only the first record that meets the conditions setup (if filtering is defined).
2. *Add Filter -* Click Add Filter to define conditions that narrow down the data list and return only the relevant items. To learn more about using filters, [click here](/help/workflows/workflow-editor#add-filters).
3. *Add Sort -* Click Add Sort to organize the data list by a selected field in ascending or descending order. To learn more about sorting data, [click here](/help/workflows/workflow-editor#add-sorts).

### Open Form

The action enables you to display a specific form or interface (screen) in a designated manner (display type) using the provided record identifier (record ID) for contextual access and interaction.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/NXspAcSJB0edEcoL2XydH_2-54.png" alt="" />

1. *Screen -* Select the desired screen (defaulting to the current screen associated with the business rules) that you want to display or interact with when using this action.
2. *Display Type -* Choose how you want the screen to be presented: either as a preview, or as a detailed view (this choice is influenced by the app’s initial settings and design preferences set during the app development phase).
3. *Record Id -* Select the unique identifier associated with the relevant record from previous activities, enabling interaction or display focused on the selected screen and display type. The identifiers of records in Engini tables are called “record id”.

### Close Form

Closes the currently open form automatically after a defined action or process is completed, returning the user to the previous screen.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/-u6aUzTRXxQZbKBkv5Cb5_2026-09-22-112411.png" alt="" />

### Dropdown Data

This action allows you to create a dropdown menu within your application interface, providing users with a selection of options to choose from.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/MntUK37fvpNOZRmueGtZ9_2-53.png" alt="" />

1. *Data List -* Here, you define the set of options that will be presented in the dropdown menu. You input the list of data elements, and these will be displayed as selectable choices for the users.
2. *Display -* Determines what will be visible to the users in the dropdown menu.
3. *Value -* Underlying data associated with each option. When a user selects an option from the dropdown, the corresponding value is captured.

### Save Changes

Saves all changes made in the current form or record automatically as part of the defined action or business rule.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/X8XIM8LDOyBTj0UcMgp8B_2026-09-22-112618.png" alt="" />

### Set Focus

Directs a user’s attention to a particular input field within the application interface. It visually indicating that the user should interact with that specific field.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/lpFxpDlvh_dJfMZnsSpMx_2026-09-22-112628.png" alt="" />

* *Input Field -* Select the input field that you want to bring into focus.

### Display error message

Displays error messages to users. When triggered, it presents a message dialog on the screen.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/kjBIToTLGYrgraJ38gyeD_2-51.png" alt="" />

1. *Dropdown* - Select the dropdown field that should trigger the Business Rule when clicked.
2. *Execute On Screen Load* - Enable this option to run the rule automatically when the screen loads.
3. *Columns to listen to refresh DropDown* - Select the columns whose changes should refresh the dropdown and reload its available values.

### Display warning message

*Display Warning Message* - Displays a warning dialog to the user when the Business Rule is triggered.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/SiyZL-3Ox0bnxaUEsJpeH_2-57.png" alt="" />

1. *Title* - Enter the title that will appear at the top of the warning dialog.
2. *Message* - Enter the warning message or detailed information that should be shown to the user.
3. *Cancel Button* - Enter the text that should appear on the cancel button.
4. *OK Button* - Enter the text that should appear on the confirmation button.

### Add record

Creates a new record in the app using the values configured in the action.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/IwICjufoRnrqkcSKXQd4z_2026-09-22-112356.png" alt="" />

* *Add Field* - Click Add Field to add and populate additional fields for the selected activity. To learn more about managing activity data, [click here](/help/workflows/workflow-editor#add-fields).

### Delete Record

Deletes the selected record from the app when the Business Rule is triggered.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/CzOXdrLSz-17_bFQHu1hK_2026-09-22-112435.png" alt="" />

### Open form and add record

Opens the selected screen as a form and creates a new record using the values configured in the action.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/5TUhSacHrbQvb6I5Pnwxp_2-55.png" alt="" />

1. *Screen -* Select the Screen where you want the record to be added.
2. *Add Field* - Click Add Field to add and populate additional fields for the selected activity. To learn more about managing activity data, [click here](/help/workflows/workflow-editor#add-fields).

**Note:** This action only fills the fields. To complete the process, you must manually click the back button in the app or follow this step with a “Save and exit” action.

### Undo Changes

Reverts any unsaved changes made in the current form or record, restoring it to its previous state.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/egDLUge6nVnmOR3DLICuy_2026-09-22-112651.png" alt="" />

### Update record

Updates the selected record with the values configured in the action.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/is_8oWYcHGcJuVGI1gvYR_2026-09-22-112713.png" alt="" />

* *Add Field* - Click Add Field to add and populate additional fields for the selected activity. To learn more about managing activity data, [click here](/help/workflows/workflow-editor#add-fields).

### Get Session Details

Retrieves information about the current app session, such as session-related values and context that can be used by later actions in the Business Rule.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/f7Kx8Uj7hRTKKMnIE0TMS_2026-09-23-152049.png" alt="" />

### Get Session Details

The Get Session Details action retrieves information about the current app session. It can be used to access session-related data and reuse it in later steps of the business rule or workflow.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/zoIGxbLxcopkD5uIZN1rm_image.png" alt="" />

### Update Session Variables

Updates the session variables with new values during the workflow execution to control behavior and store temporary data.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/ThWqfelfQx_EzBldJJAya_2026-09-22-112722.png" alt="" />

### Display iFrame

Displays an external web page within an embedded frame.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/tlfsc9n6P0lkbYrMI6Zld_2-52.png" alt="" />

1. *Title -* Defines the title of the iFrame dialog.
2. *Source URL -* The web address (URL) of the page to be displayed.
3. *Referrer Policy -* Determines how the browser handles referrer information when loading the iFrame.
4. *Add Field* - Click Add Field to add and populate additional fields for the selected activity. To learn more about managing activity data, [click here](/help/workflows/workflow-editor#add-fields).

### Close iFrame

The “Close iFrame” action used to close the previously displayed iFrame.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/5l66cfuDEW_oA9yHYWz46_2026-09-22-112425.png" alt="" />

* *Close Status* - Stores the iFrame closure status, which can be used later in the workflow to determine or continue the next step in the process.

### Refresh Screen

This action ensures that the main screen reflects the most up-to-date data after changes are made in a sub-screen.

For example, when a user modifies information in a sub-screen (such as editing an item within an order), the updated data is saved to the relevant table.
However, if the change also affects the parent record (e.g., updating an order total based on a modified item), the parent screen is not automatically refreshed. As a result, when the user returns to the main screen, the updated values may not be visible.

Therefore, after updating the parent table with the necessary changes, the “Refresh Screen” action should be applied to ensure the main screen displays the latest data.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/nxbob3U5ZWAdLe5wx-XhB_2026-09-22-112604.png" alt="" />

* *Screen –* Select the name of the screen you want to refresh.

## Step 2: Activate your rule

Your rule is almost ready to go! Engini’s rules are enabled by default.
Make sure the on/off switch is activated.
For **Editing, Duplicating or Deleting** your business rule:

<img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/caRYphiAjFkEYpAKwWq00_untitled-design-26.png" alt="" />

1. Click on the three dots **•••**
2. Select the action you wish to execute.

## Step 3: Test your business rule

It’s time to test your business rule to ensure that all components are functioning correctly.
To ensure they’re working as expected, follow these steps to test them thoroughly:

1. **Navigate to the Demo App, as seen below**

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/TlgMV1dzaHdPc87KLi4tm_image.png" alt="" />

2. **Trigger the Business Rule Workflow**
   Identify the action or event that you’ve configured as the trigger for your Business Rule. This could be a button click, a value change, or any other user interaction that initiates the workflow.

   Perform the action that corresponds to the trigger.
   For example, if your trigger is “On Status Change,” update the status of a record to the desired value.

   As you perform the trigger action, the Business Rule workflow will be automatically initiated in the background.

3. **Observe the Expected Outcome**
   Once the Business Rule workflow is initiated, observe the outcome of the action that you wanted the workflow to perform. This could involve data updates, status changes, sending notifications, etc.

   Verify whether the action has been carried out exactly as you defined in the Business Rule.

4. **Check Run History**
   After triggering the Business Rule, navigate to the “Run History” section located at the right top of the page. This is where you can view the history of Business Rule executions.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/engini/help/assets/appmaker/business-rules/FefhDueIYuNY2Y0U329hA_untitled-design-25.png" alt="" />

Look for the recent execution corresponding to the action you triggered. Each execution entry will provide detailed information about what occurred during that particular run.

6. **Review Execution Details**
   Open the execution entry to access detailed information about the Business Rule’s execution.

   Examine the execution logs, status updates, and any other relevant information to understand how the workflow progressed.

   If everything went as planned, you’ll see a clear record of the steps taken by the Business Rule. If there were any errors or unexpected behavior, this log will help you diagnose the issue.
7. **Troubleshoot Issues (If Necessary)**
   If the Business Rule didn’t execute as expected, carefully review the execution details to identify where the issue occurred.

   Check for any error messages, unexpected conditions, or missing data that could have impacted the workflow’s behavior.

   Use the information from the logs to make adjustments to your Business Rule configuration.
8. **Iterate and Refine**
   If adjustments are required, return to the Business Rule configuration and make the necessary changes based on your findings.

   Repeat the testing process by triggering the workflow again, and monitor the run history to ensure the adjustments have resolved the issue.
9. **Final Verification**
   Continue testing the Business Rule in various scenarios to ensure it works consistently across different situations.

   Verify that the Business Rule reliably automates the desired actions without errors.

**Important:**
Testing is an iterative process, and refining your Business Rules based on the results will help you create a robust and efficient application workflow.

For more information about workflow’s test, referring to our detailed guide Workflow Run History


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.