{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":37690,"path":"order-management/order-line-milestones-data-model.md","title":"Order Line Milestone Data Model","bundle":null,"doc_type":null,"release":"australia","body":"\n# Order Line Milestone Data Model\n\nThe Order Line Milestone table stores milestone records created at order fulfillment time. Understand the table structure, field definitions, and relationships to milestone definitions and order line items.\n\n## Order Line Milestone table overview\n\nThe Order Line Milestone table \\(`sn_ind_tmt_orm_order_line_milestone`\\) stores milestone records created when orders are submitted. Each record represents a single milestone event on a single order line item.\n\nRecords are created by the **Create Order Line Milestones** business rule during order submission. They aren't created manually; they are driven by the **Milestone Flow Policy** decision table.\n\n## Table structure\n\nThe table has the following key fields:\n\n|Field|Type|Required|Description|\n|-----|----|--------|-----------|\n|**Number**|Auto Number|Yes|System-generated unique identifier \\(for example, OLMS0001002\\). Begins with OLMS.|\n|**Milestone**|Reference to Milestone|Yes|Reference to the milestone definition this record is tied to. Set by the Milestone Flow Policy decision table.|\n|**Order Line Item**|Reference to Order Line Item|Yes|Reference to the order line item this milestone applies to. Set when the record is created.|\n|**Status**|Choice|Yes|Current state: `Open` \\(initial state on creation\\) or `Reached` \\(when milestone is marked complete\\).|\n|**Sequence**|Integer|No|Optional sequencing value to indicate the order in which milestones are typically reached \\(for example, 1, 2, 3\\). Useful for reporting and workflow logic.|\n|**Milestone reached date**|Date/Time|No|The date and time the milestone transitioned to `Reached` status. Empty until the milestone is marked as reached \\(either manually or by a fulfillment flow\\).|\n\n## Relationships\n\n-   **Milestone \\(Parent\\)**\n\n    Each order line milestone references a Milestone record. The milestone definition provides the template—name, description, active status—that the order line milestone inherits.\n\n-   **Order Line Item \\(Parent\\)**\n\n    Each order line milestone belongs to exactly one order line item. When you view an order line in Workspace, milestones for that line appear in the **Order Line Milestones** related list.\n\n-   **Customer Order \\(Ancestor\\)**\n\n    Indirectly, through the order line item. You can trace back to the parent order to understand the broader fulfillment context.\n\n\n## Record creation and updates\n\n**Creation:** Records are created automatically during order submission by the **Create Order Line Milestones** business rule. The rule:\n\n1.  Iterates through each order line in the submitted order.\n2.  Passes the order and order line to the **Milestone Flow Policy** decision table.\n3.  For each matching decision row, creates a new order line milestone record with the determined milestone.\n4.  Sets initial status to `Open` and leaves **Milestone reached date** empty.\n\n**Updates:** Order line milestone records are typically updated to set status to `Reached` when:\n\n-   A user clicks the **Mark as Reached** UI action on the milestone form.\n-   A fulfillment flow executes the **Set Order Line Milestone to Reached** action in response to a business event \\(for example, domain order closure or characteristic update\\).\n\nWhen status changes to `Reached`, the **Milestone reached date** field is automatically populated with the current date and time.\n\n## Accessing the table\n\nTo query or customize the Order Line Milestone table in the platform:\n\n-   Table name: `sn_ind_tmt_orm_order_line_milestone`\n-   In Workspace: Navigate to **Order Milestone Setup** → **Order Line Milestones** \\(admin view only\\) or view the related list on any order line item \\(end-user view\\).\n-   In reports or queries: Reference the table by its system name `sn_ind_tmt_orm_order_line_milestone` to filter or aggregate milestone data.\n\n## Related tables\n\n-   **Milestone \\(`sn_ind_tmt_orm_milestone`\\)**\n\n    The configuration-time milestone definitions. Each milestone record is referenced by one or more order line milestones.\n\n-   **Order Line Item \\(`sn_ind_tmt_orm_order_line_item`\\)**\n\n    Parent table. Each order line item can have multiple order line milestones.\n\n-   **Customer Order \\(`sn_ind_tmt_orm_order`\\)**\n\n    Ancestor table \\(through order line item\\). Provides order context \\(account, order type, status, etc.\\).\n\n\n"}}