Calculate attributes down (Order)

Event action – Abstract

Purpose: Multiplies the 'Value' in an order in all aggregated numeric attributes of line items of the relevant line item types by the 'General number of packages' to calculate the 'Aggregated value' per attribute.

See also: Calculate attributes down, Calculate attributes down (Shipment)

images/download/attachments/177907358/image-2024-8-7_16-39-29-version-1-modificationdate-1723041569214-api-v2.png

The Calculate attributes down (Order) event action executes the following steps for selected Line item types (see Line item type) in a reference object of the 'Order' type (see Orders):

  1. For 'Aggregate numeric attributes' within a relevant line item, the 'value" (value) is multiplied by the 'Aggregate number of packages' (aggregateNumberOfPackages), which can be determined in advance via the event action Calculate aggregate number of packages (Order), if required.

  2. The result of the multiplication is stored as an 'Aggregate value' (aggregateValue) within the attribute. If the 'value' (value) or the 'Aggregate number of packages' (aggregateNumberOfPackages) does not contain a value, the 'Aggregate value' (aggregateValue) field is deleted.

IMPORTANT◄ In contrast to the event action Calculate aggregate number of packages (Order), if the Line item types parameter does not specify a selection, the calculation does not include all line item types, but only the 'default' line item type (DEFAULT). Therefore, there is no possibility to parameterize the event action in such a way that it includes 'all' Line item types (i.e. also those that may be created in the future).

NOTE◄ On the line item level, basically every Numeric types appears as an 'Aggregate numeric attribute'. There is no possibility to distinguish between extensive and intensive quantities. The Calculate attributes down (Order) event action also treats each Numeric types the same: each 'value' is multiplied by the 'Aggregate number of packages' of the line item. However, scaling the 'value' does not make sense for every Numeric types, for example, if the value describes a 'maximum storage temperature', the 'standard lot size' for an item, or a 'minimum shelf life'. In such cases, simply ignore the calculation result in the 'Aggregated value' field and most importantly, do not display it in the form.

NOTE◄ Details on the calculation logic and an illustrative runtime example can be found on the page for the entity type Allgemeines Geschäftsobjekt:

Configuration

images/download/attachments/177907358/image-2024-8-7_16-41-22-version-1-modificationdate-1723041682174-api-v2.png

The event action Calculate attributes down (Order) expects an 'Order' (see Orders) as the reference object. In the context of another object type, the event action has no effect without an error occurring at runtime.

Multiple selection for Line item types can be used to define a positive list for relevant Line item types (see Line item type).

  • If no Line item types are selected, only the Positionstyp 'Default' (DEFAULT) will be taken into account.