--- title: "Insert company of loading area group" slug: "tsmt-insert-loading-place-company-in-booking-header" updated: 2026-04-02T09:34:35Z published: 2026-04-02T09:34:35Z canonical: "docs.lobstersoftware.com/tsmt-insert-loading-place-company-in-booking-header" --- > ## 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. # Insert company of loading area group > [!NOTE] > 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. > > > [!TIP] > > Tooltip > > > > - **Usage:** The event action expects a time slot book entry as a *reference object* for which a concrete booking already exists. The ID of the booked loading place (`bookedLoadingPlaceId`) is used to determine the associated loading area group. The company account defined there as a required field is read from its master data in order to assign it as a value to a company attribute identified via the company type parameter in the time slot book entry. > > - **Parameter:** The **Company type** of the company attribute where the loading area group company is assigned must be specified by a static single selection. > > - **Output:** If a loading point is booked for the time slot book entry, the company is transferred from the master data of the associated loading area group to a company attribute. As far as necessary, this company attribute is created again. ![images/download/attachments/177913140/image-2024-9-24_12-10-5-version-1-modificationdate-1727172604888-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-9-24_12-10-5-version-1-modificationdate-1727172604888-api-v2.png) The event action [Insert company of loading area group](/v1/docs/en/tsmt-insert-loading-place-company-in-booking-header) 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](/v1/docs/en/administration-master-data-tsmt)). - In the master data for [Loading area group](/v1/docs/en/tsmt-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](/v1/docs/en/tsmt-insert-loading-place-company-in-booking-header) 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](/v1/docs/en/base-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)](/v1/docs/en/tsmt-tsmt-action-event)) is configured as shown on the right: - The **Validating rule** uses a [Check type](/v1/docs/en/core-check-type-rule) to ensure that the *reference object* is a time slot book entry. - As an **Action on passed rule**, an [If then else](/v1/docs/en/core-if-then-else-actor) event action checks if the company attribute for the 'Principal' (`AAL`) [Company type](/v1/docs/en/base-company-type) is empty. - In the 'Then' branch of the [If then else](/v1/docs/en/core-if-then-else-actor) event action – i.e. if no principal has been specified up to now – the [Insert company of loading area group](/v1/docs/en/tsmt-insert-loading-place-company-in-booking-header) 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](/v1/docs/en/core-is-empty-matcher). 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](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-9-24_14-32-44-version-1-modificationdate-1727181164001-api-v2.png) | | --- | --- |