--- title: "Company rule" slug: "base-company-rule" updated: 2026-04-13T05:56:32Z published: 2026-04-13T05:56:32Z canonical: "docs.lobstersoftware.com/base-company-rule" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # Company rule > [!NOTE] > Rule types – Abstract > > **Purpose:** Is considered 'passed' if the [Company of session](/v1/docs/en/base-session-company-account-value) is included in the whitelist defined by the parameters **Companies** and **or any child company (all levels)**. > > > [!TIP] > > Tooltip > > > > - **Usage**: The rule checks whether the [Company of session](/v1/docs/en/base-session-company-account-value) is included in the positive list statically configurable by multiple selection in the **Companies** parameter. > > - **Parameter**: > > - The **Companies** parameter defines a multiple selection for [Companies/Clients](/v1/docs/en/base-company-account), which is used by the rule as a positive list for matching with the [Company of session](/v1/docs/en/base-session-company-account-value). > > - The **or any child company (all levels)** option extends the whitelist to include all [Companies/Clients](/v1/docs/en/base-company-account) that belong to the hierarchy below at least one of the explicitly selected **Companies** and refer to it directly or indirectly as a 'parent company'. > > - **NOTE:** During configuration, only [Companies/Clients](/v1/docs/en/base-company-account) for which there is at least read access can be selected. ![images/download/attachments/201665954/image-2025-3-28_15-12-43-version-1-modificationdate-1743171163415-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-3-28_15-12-43-version-1-modificationdate-1743171163415-api-v2.png) A [Company rule](/v1/docs/en/base-company-rule) is considered 'passed' if the company account (see [Companies/Clients](/v1/docs/en/base-company-account)) in the current login context belongs to the companies that the rule configuration specifies via the static parameters **Companies** and **or any child company (all levels)**. If no **Companies** are specified in the configuration, then the [Company rule](/v1/docs/en/base-company-rule) is always considered as 'failed'. ## Configuration The [Company rule](/v1/docs/en/base-company-rule) refers to the [Company of session](/v1/docs/en/base-session-company-account-value), which is primarily defined by the session, but can be temporarily changed in the context of event handling by the [Run as](/v1/docs/en/base-run-as-actor) event action (see also [Session based](/v1/docs/en/orchestration-rules-session)). The *reference object* in the execution context is irrelevant for this rule. | The configuration of the [Company rule](/v1/docs/en/base-company-rule) provides a static multiple selection via a [Multiselect combobox](/v1/docs/en/fre-multi-select-combo-box-vo) with a search function in the **Companies** parameter, which offers all [Companies/Clients](/v1/docs/en/base-company-account) with at least read access in the context of the configuration for selection. If no **Companies** are selected, the rule is always considered as 'failed'. **NOTE:** If read access is missing for a company that has already been selected, then a label ('Hidden company') appears for this company that has been neutralized except for the internal ID. As long as such an entry is not specifically removed, it will remain in the list even if other entries are added or removed. 'Hidden' entries deselected by 'reversing' an existing selection do not reappear in the selection by 'reversing' again. | ![images/download/attachments/201665954/image-2025-3-28_15-13-56-version-1-modificationdate-1743171236690-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-3-28_15-13-56-version-1-modificationdate-1743171236690-api-v2.png) | | --- | --- | | The option **or any child company (all levels)**, which is deselected by default, expands the selection of company accounts accepted by the rule to include all **child companies** of the explicitly selected companies. **Child companies** are all companies that belong to the hierarchy below a company and refer to it directly or indirectly as a 'parent company'. **NOTE:** The option cannot be selectively applied to specific **Companies**. Instead, however, two instances of the [Company rule](/v1/docs/en/base-company-rule) can be linked by an OR junction to select companies 'with and without **child companies**', if required. | ![images/download/attachments/201665954/image-2025-3-28_15-14-32-version-1-modificationdate-1743171272622-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-3-28_15-14-32-version-1-modificationdate-1743171272622-api-v2.png) | ## Example An association criterion is 'passed' if the current session takes place in the context of a company that either belongs to one of the company groups 'EMEA' or 'APAC' defined in the company hierarchy as **child companies** (see [Company meta type](/v1/docs/en/base-company-meta-type)) or is included in a list of companies defined directly in the association criterion. Configuration: | To satisfy the explicit and implicit requirements (above), the association criterion is configured using multiple instances of the [Company rule](/v1/docs/en/base-company-rule) as shown on the right: - The [Company rule](/v1/docs/en/base-company-rule) on the top left specifies the named company groups ('EMEA' and 'APAC') including **child companies** as 'acceptable' in the sense of the rule. - Since only the **child companies** of these groups should be considered 'acceptable' and not the group company accounts that hierarchically combine them, these are excluded from the second [Company rule](/v1/docs/en/base-company-rule) in the AND-junction below by negation (see [Not rule](/v1/docs/en/core-not-rule)). - In contrast, in the third [Company rule](/v1/docs/en/base-company-rule) (on the right of the OR-junction), the list of companies considered to be 'acceptable' appears without their **child companies** being included. **NOTE:** However, **child companies** of the companies in the selection list (right) are not explicitly excluded by this configuration either. If one of the **Companies** listed on the right is directly or indirectly subordinated to a company that also belongs to an 'APAC' or 'EMEA' group, this **child company** is considered 'acceptable' for the rule. | ![images/download/attachments/201665954/image-2025-3-28_15-12-5-version-1-modificationdate-1743171125142-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-3-28_15-12-5-version-1-modificationdate-1743171125142-api-v2.png) | | --- | --- | | **NOTE:** Since the groups 'APAC' and 'EMEA' can each conceal an extensive multi-level company hierarchy, it would be advantageous – at least theoretically – with regard to the performance of the evaluation of this association criterion, which may be necessary to check the more specific selection (*above*: right) with priority, so that the more time-consuming evaluation of entire hierarchies (*above*: left) is not necessary in the case of any direct match. Simply swapping the pages within the OR junction, which is achieved by cut and paste in a few clicks starting from the above configuration, ensures this 'runtime optimization' for the check logic. Due to the same reasoning, shown in the example on the right, the order within the AND junction has also been swapped, so that the evaluation of the **child companies** is also omitted within a session with a group company account. | ![images/download/attachments/201665954/image-2025-3-28_15-11-45-version-1-modificationdate-1743171105493-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-3-28_15-11-45-version-1-modificationdate-1743171105493-api-v2.png) |