--- title: "Flag attribute rule" slug: "base-flag-attribute-rule" updated: 2026-04-02T13:15:00Z published: 2026-04-02T13:15:00Z canonical: "docs.lobstersoftware.com/base-flag-attribute-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. # Flag attribute rule > [!NOTE] > Rule type – Abstract > > **Purpose:** Is considered 'passed' if the evaluation of the indicator attributes of the *reference object* for at least one of the usually selected **Flag types** meets the criterion defined by the **Flag value** (selected: true or deselected: false/not present). > > > [!TIP] > > Tooltip > > > > - **Usage:** The rule should only be used in the context of *reference objects* that are not only 'attribute owners' but explicitly support flag attributes. The **Flag value** option decides how the flag attributes of the reference object specified under **Flag type** are evaluated. If the option is selected, at least one of the selected flag attributes must return the value `true`. If the option is deselected, at least one flag attribute must return the value `false` or not be present. > > - **Parameter:** > > - **Flag type:** Multiple selection for the [Flag type](/v1/docs/en/base-flag-types), of the flag attributes to be evaluated. > > - **Flag value:** Evaluation criterion for flag attributes (selected: `true` or not selected: `false`/not present). ![images/download/attachments/201665163/image-2025-3-26_14-34-16-version-1-modificationdate-1742996055127-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-3-26_14-34-16-version-1-modificationdate-1742996055127-api-v2.png) The [Flag attribute rule](/v1/docs/en/base-flag-attribute-rule) is considered 'passed' if the evaluation of the flag attributes of the *reference object* for at least one specified **Flag type** meets the criterion defined by **Flag value** (`true`/`false`): - If the **Flag value** option is selected, then the rule is considered 'passed' if the *reference object* has at least one flag attribute with the value `true` whose [Flag type](/v1/docs/en/base-flag-types) is selected in the **Flag type** parameter. - If the **Flag value** option is deselected, then the rule is considered 'failed' if the *reference object* has a flag attribute whose value is true for each [Flag type](/v1/docs/en/base-flag-types) selected in the **Flag type** parameter. **IMPORTANT:** The '**Flag value** deselected' configuration defines as a check criterion for each [Flag type](/v1/docs/en/base-flag-types) selected in the **Flag type** parameter, and that it should be among the attributes of the *reference object* with the value `false` or not present. If multiple types are selected under **Flag type**, then the rule as a whole is considered to have 'passed' if the *reference object* does not have a flag attribute for at least one selected [Flag type](/v1/docs/en/base-flag-types) or has one with the value `false`. Only entities whose type supports the possession of flag attributes can be considered as *reference objects*. By default, this applies to the following entity types: - All business transaction objects ([Common business object](/v1/docs/en/orchestration-common-bto), [Orders](/v1/docs/en/ord-order), [Manifests](/v1/docs/en/mfst-manifest), [Shipments](/v1/docs/en/shp-shipment) and time slot book entries – see [Time slot management](/v1/docs/en/orchestration-rules-tsmt)). - Line items of business transaction objects (exception: manifest line items, which are not considered as 'attribute owners'). - Certain referenced objects ([Addresses](/v1/docs/en/base-address), [Products](/v1/docs/en/base-product)). **NOTE:** The use of the [Flag attribute rule](/v1/docs/en/base-flag-attribute-rule) for *reference objects* that (may) not support flag attributes should be strongly avoided. The rule does not categorically return 'failed' for all unsuitable entity types. The 'failed' rule applies reliably only to *reference objects* that are not an entity by type (e.g. a client object), or are an entity but not an attribute owner (e.g. a [Role](/v1/docs/en/base-role-value)). Especially when checking against the **Flag value** `false` , this can lead to unexpected or confusing results, since the rule is categorically considered 'failed' for some types from the attribute owner group, while for other attribute owner types the rule is considered 'passed' because a flag attribute is 'not present'. For the following explanations, it is assumed that only suitable *reference objects* are used in order to reduce the complexity of the presentation. The **Flag type** parameter is technically optional, but should always be specified to ensure that a meaningful and effective check criterion is obtained (see table). The option **Flag value** is only taken into account if at least one flag type is specified (see table). | Flag type | Flag value | Effective check criterion of the rule (for a reference object that supports flag attributes) | Comment | | --- | --- | --- | --- | | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/check.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/check(28).svg) one or more 'flag types' selected | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/check.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/check(28).svg) selected (`true`) | The *reference object* has at least one flag attribute with the value `true`, whose [Flag type](/v1/docs/en/base-flag-types) is selected in the **Flag type** parameter? | Typical use | | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/check.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/check(28).svg) one or more 'flag types' selected | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/error.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/error(22).svg) selected (`false`) | The *reference object* does not have a flag attribute with the value true for each [Flag type](/v1/docs/en/base-flag-types) in the selection for the **Flag type** parameter. | Typical use | | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/error.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/error(22).svg) no selection | irrelevant![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/check.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/check(28).svg) / ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/error.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/error(22).svg) | Always 'passed' (for a suitable *reference object*) | Limited usefulness | ## Configuration The [Flag attribute rule](/v1/docs/en/base-flag-attribute-rule) expects a *reference object* that supports flag attributes (see above). | The optional **Flag Type** parameter defines a static multiple selection for values from the dynamic enumeration for the [Flag type](/v1/docs/en/base-flag-types). The selection determines which flag attributes of the *reference object* criterion should be evaluated depending on the **Flag value** option defined. | ![images/download/attachments/201665163/image-2025-3-26_14-34-48-version-1-modificationdate-1742996088023-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-3-26_14-34-48-version-1-modificationdate-1742996088023-api-v2.png) | | --- | --- | | The **Flag value** option defines the check criterion applied to the *reference object* for each [Flag type](/v1/docs/en/base-flag-types) specified via the **Flag type** parameter. The rule is considered to be passed overall if the test criterion for the **Flag value** applies to at least one **Flag** **type**: - 'selected': Flag value = `true` - 'deselected': Flag value = `false` OR flag attribute not present. | ![images/download/attachments/201665163/image-2025-3-26_14-35-27-version-1-modificationdate-1742996127049-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-3-26_14-35-27-version-1-modificationdate-1742996127049-api-v2.png) ![images/download/attachments/201665163/image-2025-3-26_14-35-41-version-1-modificationdate-1742996140922-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-3-26_14-35-41-version-1-modificationdate-1742996140922-api-v2.png) | ## Example ### Simple use case An association criterion should apply to instances of an entity type 'Shipments' that are classified as *stackable* via the [Flag type](/v1/docs/en/base-flag-types) 'Stackable' or 'Stackable Pallets' in the shipment header. Configuration: | The [Flag attribute rule](/v1/docs/en/base-flag-attribute-rule) is configured as shown on the right: - The [Check type](/v1/docs/en/core-check-type-rule) ensures that the *reference object* is a shipment. - The subsequent [Flag attribute rule](/v1/docs/en/base-flag-attribute-rule) specifies in the **Flag** **type** parameter which flag attributes of the shipment are checked. - The option **Flag value** is set because it is checked whether at least one of the flags selected by **Flag type** is 'set' for the shipment. Then the corresponding flag attribute contains the value `true` in the 'Flag value' (`flagValue`) field. Within an overview for 'Shipments', the selection for the screenshot illustrates to which shipments the association criterion applies: ![images/download/attachments/201665163/image-2025-3-26_14-31-22-version-1-modificationdate-1742995881790-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-3-26_14-31-22-version-1-modificationdate-1742995881790-api-v2.png) | ![images/download/attachments/201665163/image-2025-3-26_14-30-44-version-1-modificationdate-1742995843917-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-3-26_14-30-44-version-1-modificationdate-1742995843917-api-v2.png) | | --- | --- | ### More complex use case An association criterion 'recognizes' whether a shipment is *stackable,* as in the previous example. However, this time the classification cannot be read directly from flag attributes in the shipment header. Instead, the flag attributes of the 'Stackable' and 'Stackable Pallets' types are evaluated at line item level. The association criterion shall apply in total to classify a shipment as stackable if the shipment does not contain a direct line item (with the [Line item type](/v1/docs/en/base-line-item-type) 'Default') that is not explicitly marked as 'Stackable' and/or 'Stackable Pallets'. **NOTE:** As long as the shipment does not contain any 'Default' line items, it should also be considered *stackable*. Configuration: | The rule for the association criterion can be configured as shown on the right: - In the input, a [Check type](/v1/docs/en/core-check-type-rule) ensures that a *reference object* of the [Shipments](/v1/docs/en/shp-shipment) type is present as an input value. - Below this follows an [Entity property rule](/v1/docs/en/core-entity-property-rule) in which a [Direct line items](/v1/docs/en/base-get-line-items-resolver) value resolver is combined with a [Rule list resolver](/v1/docs/en/core-list-rule-resolver). This combination is used to determine whether a direct line item exists that does not meet the criterion for 'stackability' at the line item level. This criterion must be configured in the [Rule list resolver](/v1/docs/en/core-list-rule-resolver): - In the example, the [Flag attribute rule](/v1/docs/en/base-flag-attribute-rule) is used twice in an AND junction to check for exactly one **Flag type** to see whether the flag attribute in question is `false` or *not present*. The **Flag value** option is deselected for this purpose. **NOTE:** In connection with the **Flag value** `false`, both **Flag types** cannot simply be used in the same [Flag attribute rule](/v1/docs/en/base-flag-attribute-rule), otherwise a shipment line item would already be evaluated as not-stackable if one of the two flags is `false` or not present. However, the following alternative configuration for the rule in the [Rule list resolver](/v1/docs/en/core-list-rule-resolver) would have the same effect, with a single instance of the [Flag attribute rule](/v1/docs/en/base-flag-attribute-rule): ![images/download/attachments/201665163/image-2025-3-26_14-28-30-version-1-modificationdate-1742995709892-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-3-26_14-28-30-version-1-modificationdate-1742995709892-api-v2.png) The negation (see [Not rule](/v1/docs/en/core-not-rule)) of the [Flag attribute rule](/v1/docs/en/base-flag-attribute-rule) is crucial, which is marked by the '!' symbol. The AND junction on the right (not 'Stackable' AND not 'Stackable Pallets') is alternatively reformulated as not ('stackable' OR 'Stackable Pallets'). Since an OR junction applies within the [Flag attribute rule](/v1/docs/en/base-flag-attribute-rule) for the check per **Flag type**. This results in a more streamlined configuration. | ![images/download/attachments/201665163/image-2025-3-26_14-29-22-version-1-modificationdate-1742995761578-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-3-26_14-29-22-version-1-modificationdate-1742995761578-api-v2.png) | | --- | --- |