--- title: "Adding tracking state" slug: "base-ts-tracking-status-event-adding-tracking-status" updated: 2025-12-12T16:00:37Z published: 2025-12-13T16:24:31Z canonical: "docs.lobstersoftware.com/base-ts-tracking-status-event-adding-tracking-status" --- > ## 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. # Adding tracking state Event [Adding tracking state](/v1/docs/en/base-ts-tracking-status-event-adding-tracking-status) is triggered by an attempt to add a [Tracking state](/v1/docs/en/tracking-state-1) to business object or one its line items. This event can be used to trigger event handling related to adding tracking state entries before tracking state transformations are validated against applicable [Tracking state workflows](/v1/docs/en/base-ts-tracking-status-transformation), if any. The data context for event handling is the **Tracking state owner** – i.e. a business object or one if its line items – as identified by the properties `statusOwner` (class) and `statusOwnerId` (Object ID) of the tracking state entry. Within event handlers the tracking state entry to be added can be addressed for reading and writing via [Variable](/v1/docs/en/core-storage-value) **trackingStatusEntry** with a reference to class **Tracking state entry** (`de.lobster.scm.base.ts.trackingstatus.entry.TrackingStatusEntry`). ## Configuration example Adding any tracking state for an **Order** or **Order line item** should be prevented by definition and independent of regulations by [Tracking state workflows](/v1/docs/en/base-ts-tracking-status-transformation), if a tracking state entry referring to the same tracking state code already exists for the the same owner object (order or order line item). ![images/download/attachments/36571097/image2019-5-14_15-51-53-version-1-modificationdate-1557841916000-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2019-5-14_15-51-53-version-1-modificationdate-1557841916000-api-v2.png) - The event **Adding tracking state** is configured as the only triggering event to handle. - The **Validating rule** checks for types 'Order' or 'Order line item' by [Check type](/v1/docs/en/core-check-type-rule) rules. - Further, the [Check existence](/v1/docs/en/core-exists-rule) rule seeks existing tracking state entries that resemble certain values of the new entry. Configuration details are documented in the screenshot below. - The [Abort](/v1/docs/en/core-abort-actor) (with a notification message) is only executed, if the new entry is qualified as a 'duplicate' to at least one existing entry. The 'duplicate search' inside the [Check existence](/v1/docs/en/core-exists-rule) rule is configures as pointed out below: ![images/download/attachments/36571097/image2019-5-14_16-6-40-version-1-modificationdate-1557842804000-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2019-5-14_16-6-40-version-1-modificationdate-1557842804000-api-v2.png) - The **Where** condition checks property projections **Owner** (`statusOwner`), **statusOwnerId** (`statusOwnerId`) and **Trackingstatus-Code.Code** (`trackingStatus.code`) for all visible tracking state entries in the system (left side of all three conditions). - Each conditions compares against the value from the same field in the new tracking state entry (right side of all three conditions), which is addressed via variable **trackingStateEntry** with type **Tracking state entry**.