--- title: "Sum packaging (Manifest)" slug: "mfst-manifest-calculate-packaging-summary-actor" updated: 2026-04-02T07:42:21Z published: 2026-04-02T07:42:21Z canonical: "docs.lobstersoftware.com/mfst-manifest-calculate-packaging-summary-actor" --- > ## 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. # Sum packaging (Manifest) *See also:* [Sum packaging (Order)](/v1/docs/en/ord-order-calculate-packaging-summary-actor), [Sum packaging (Shipment)](/v1/docs/en/shp-shipment-calculate-packaging-summary-actor), [Type of packaging](/v1/docs/en/base-type-of-packaging) > [!NOTE] > Event action – Abstract > > **Purpose:** Sums up in a manifest one or all packaging types in the contained [Shipments](/v1/docs/en/shp-shipment) and writes the sum(s) to packing sum attributes in the manifest header. > > > [!TIP] > > Tooltip > > > > - **Usage:** The event action must be executed with a manifest as a *reference object*. The calculation takes into account either a specific [Type of packaging](/v1/docs/en/base-type-of-packaging) (see **Type** parameter) or all packaging types that occur in the shipments contained in the manifest**.** > > - **Parameter:** The *optional* Type parameter restricts the evaluation to a *specific* [Type of packaging](/v1/docs/en/base-type-of-packaging)*.* By default (without a selection), the packing sum attributes are updated for all shipments found in the shipment. > > - **Output:** Updated or newly added packing sum attributes for the manifest header. > > - **NOTE:** Packaging sum attributes in the shipment header are neither read nor written by the event action. > > - **WARNING:** If the calculation is performed across the board for all packaging types (without selection for **Type**), then existing values in packaging sum attributes for packaging types that currently do not (no longer) occur in any shipment are not automatically deleted. ![images/download/attachments/177912416/image-2024-9-18_15-55-6-version-1-modificationdate-1726667706282-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-9-18_15-55-6-version-1-modificationdate-1726667706282-api-v2.png) The [Sum packaging (Manifest)](/v1/docs/en/mfst-manifest-calculate-packaging-summary-actor) event action summarizes the quantity information for a specific [Type of packaging](/v1/docs/en/base-type-of-packaging) (or all) in the [Shipments](/v1/docs/en/shp-shipment) contained as manifest items in a *reference object* of the 'Manifest' type (see [Manifests](/v1/docs/en/mfst-manifest)). The value in the 'Number of packages' field (`numberOfPackages`) and not the 'Aggregate number of packages' field (`aggregateNumberOfPackages`) is crucial for the imputation on the level of the respective line item. **CAUTION****:** If the 'Aggregated number of packages' is calculated for a [Line item type](/v1/docs/en/base-line-item-type), e.g. with the event action [Calculate aggregate number of packages](/v1/docs/en/cmn-calculate-aggregate-number-of-packages-actor), in order to cascade the number of packages in sub-items in a multi-level line item hierarchy, this leads to inconsistencies in the calculation of packaging totals for each [Type of packaging](/v1/docs/en/base-type-of-packaging) that occurs in these sub-items. The total number per packaging type over all [Shipments](/v1/docs/en/shp-shipment) is written to the corresponding packaging summary attribute in the manifest header (see [Input forms for manifests](/v1/docs/en/administration-designer-entity-form-manifest)). There are corresponding event actions for [Orders](/v1/docs/en/ord-order) ([Sum packaging (Order)](/v1/docs/en/ord-order-calculate-packaging-summary-actor)) and [Shipments](/v1/docs/en/shp-shipment) ([Sum packaging (Shipment)](/v1/docs/en/shp-shipment-calculate-packaging-summary-actor)). In configurations, the 'matching' event action must always be used for the *reference object* in question. To avoid confusion, no error message occurs at runtime. The calculation just does not return a result. **NOTE:** The calculation is always based on the detailed data given and does not take into account any deviating intermediate results from the packaging summary attributes from the header of the shipments. These are also neither supplemented nor updated by the calculation. To ensure that the data status in the shipment headers is consistent with the total in the manifest, the event action [Sum packaging (Shipment)](/v1/docs/en/shp-shipment-calculate-packaging-summary-actor) can be called in a loop over all manifest items if required. It is more elegant to update the summary attributes of each shipment in a separate event handler that is triggered by the [Common action event](/v1/docs/en/core-common-action-event). ## Configuration ![images/download/attachments/177912416/image-2024-9-18_15-55-40-version-1-modificationdate-1726667740319-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-9-18_15-55-40-version-1-modificationdate-1726667740319-api-v2.png) The event action [Sum packaging (Manifest)](/v1/docs/en/mfst-manifest-calculate-packaging-summary-actor) expects a manifest as a *reference object* (see [Manifests](/v1/docs/en/mfst-manifest)). In the context of a different object type, the event action has no effect without an error occurring at runtime. The *optional* **Type** parameter can be used to limit the evaluation to *a specific* [Type of packaging](/v1/docs/en/base-type-of-packaging). - If no **Type** is specified, all [Type of packaging](/v1/docs/en/base-type-of-packaging) that occur in the [Shipments](/v1/docs/en/shp-shipment) manifest line items are added up. **IMPORTANT:** If no **Type** is specified, the action updates only the summary attributes of the packaging types that are currently in use. If in previous calculations summary values were calculated for types that currently no longer occur in any of the order items, then these values are retained unchanged. They must be explicitly reset or deleted if necessary. ## Example Whenever [Manifests](/v1/docs/en/mfst-manifest) are saved, their packing summary attributes should be updated depending on the [Shipments](/v1/docs/en/shp-shipment) included as manifest items. Configuration: | - 'Create' and 'Update' (see [Common action event](/v1/docs/en/core-common-action-event)) are selected as **Triggering** **events** so that the update of the sum attributes takes place each time 'Save' is performed. --- - The **Validating rule** uses [Check type](/v1/docs/en/core-check-type-rule) to ensure that the **Actions on passed rule** are executed only in the context of a manifest. --- The **Actions on passed rule** are configured as shown on the right: - Before calculating the sum attributes for 'Packaging summary attribute', an event action of the [Modify list/Clear](/v1/docs/en/core-modify-collection-actor-clear) type deletes all existing attributes of this category, so that after the recalculation, no obsolete information for any 'packaging materials' that may no longer be relevant is contained in the manifest header (see, 'Important' above). The list is determined by an [All attributes of one type](/v1/docs/en/core-attributes-resolver) value resolver. - Subsequently, the event action [Sum packaging (Manifest)](/v1/docs/en/mfst-manifest-calculate-packaging-summary-actor) is executed with no restrictions for **Type**, so that a summary is calculated for each [Type of packaging](/v1/docs/en/base-type-of-packaging) that is in use within the shipments included as manifest items. | ![images/download/attachments/177912416/image2021-7-26_15-42-5-version-1-modificationdate-1726667560190-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2021-7-26_15-42-5-version-1-modificationdate-1726667560190-api-v2.png) | | --- | --- | Runtime example: The following example shows an input form for a **Manifest** in which the 'Packaging summary attribute' per [Type of packaging](/v1/docs/en/base-type-of-packaging) (*configured here*: **Hobbock** and **Sack**) appear in the header level of the purchase order. Within the **Manifest line item**, several line items, possibly with sub-items, can be seen for each **Shipment**, for which a **Number of** **packages** can be specified in each case in connection with a **Type of packaging**. **NOTE:** For the sub-items in the example, the convention is that the **Number of packages** field indicates the absolute number of packages of the packaging type in question and not the number of packages within each package in the higher level. Specifically, for **Line Item no.** 2 in the 2nd manifest item, this means that there are a total of 36 bags in 3 barrels. Whether this is 12 bags per barrel is thus not explicitly defined. ![images/download/attachments/177912416/image2021-7-26_15-43-2-version-1-modificationdate-1726667560181-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2021-7-26_15-43-2-version-1-modificationdate-1726667560181-api-v2.png) The packaging summary attributes are updated when the manifest is saved. Saving after removing the second manifest item results in the following image: ![images/download/attachments/177912416/image2021-7-26_15-43-38-version-1-modificationdate-1726667560178-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2021-7-26_15-43-38-version-1-modificationdate-1726667560178-api-v2.png) **NOTE:** - Without explicitly resetting (deleting) all packaging sum attributes in the event handling, the value 1 would still appear in the **Barrel** field. - If the **Type** 'Barrel' was explicitly named within the event action [Sum packaging (Manifest)](/v1/docs/en/mfst-manifest-calculate-packaging-summary-actor), then the value 0 would appear in the **Barrel** field, since the attribute is then created but assigned the value 0.