Insert company of loading area group

Event action – Abstract

Purpose: Assigns to a company attribute of a time slot booking determined by the company type the company from the master data of the loading area group in which the booked loading place is located.


images/download/attachments/177913140/image-2024-9-24_12-10-5-version-1-modificationdate-1727172604888-api-v2.png

The event action Insert company of loading area group expects an entity of the 'Time slot book entry' type as a reference object for which a specific booking already exists.

If there is any entry at all for the time slot book entry that exists as a reference object, it will be evaluated as follows:

  • The ID of the booked loading place (bookedLoadingPlaceId) is used to determine the 'loading area group' to which it belongs (see Time slot administration).

  • In the master data for Loading area group, it is required to specify a 'company' (companyId) where the loading area group is assigned.

  • The event action Insert company of loading area group sets this 'company' as the value of a company attribute determined via the Company type in the time slot book entry present as a reference object.

If the reference object is not the 'Time slot book entry' type or there is no reference to a loading point due to a lack of booking, nothing happens. No error occurs either.

Configuration

The Company type parameter specifies the Company type of the company attribute of the time slot book entry in which the company of the loading area group is written.

  • If no Company type is selected, then nothing happens. No error occurs either.

Example

When a time slot book entry is posted to a specific loading point, the company is assigned to the relevant loading area group in the company attribute for the company type 'Principal' (AAL), if there is no assignment for the 'Principal' yet.

Configuration:

An event handler that reacts to 'Book' as a Triggering event (see Time slot management tool (Events)) is configured as shown on the right:

  • The Validating rule uses a Check type to ensure that the reference object is a time slot book entry.

  • As an Action on passed rule, an If then else event action checks if the company attribute for the 'Principal' (AAL) Company type is empty.

  • In the 'Then' branch of the If then else event action – i.e. if no principal has been specified up to now – the Insert company of loading area group event action is configured with the Company type 'Principal' (AAL).

NOTE◄ Since no definitions for the 'Else' branch are configured in the example, the company attribute could also be checked within the Validating rule per Is empty. However, further event actions that are executed during 'Book' will follow (below the section shown), even if the 'Principal' has already been defined.

images/download/attachments/177913140/image-2024-9-24_14-32-44-version-1-modificationdate-1727181164001-api-v2.png