================================================================================ QMS MODULE — MATRIX ENDPOINT DOCUMENTATION GB5 ERP | Quality Management System (QMS) Generated : 2026-05-28 Module : QMSSL.EndPoints.Matrix (10 Services) ================================================================================ TABLE OF CONTENTS ----------------- 1. SaveMatrix 2. GetMatrix 3. GetMatrixList 4. DeleteMatrix 5. ActivateMatrix 6. SupersedeMatrix 7. ValidateIssue 8. GetAvailableBatches 9. GetSelectListMatrix 10. ExplodeBOM ================================================================================ COMMON HEADER PARAMETER (all 10 endpoints) ================================================================================ Header : Login (string, required) A Base64-encoded or token-based login credential string that is decoded inside BaseEndpoint into a LoginDTO containing: - ClientId (TenantId — used for multi-tenant data isolation) - UserId (for audit trail fields CREATEDBYID / MODIFIEDBYID) - OUId (Operating Unit, retained for interface compatibility) ================================================================================ TABLES INVOLVED — MASTER REFERENCE ================================================================================ PRIMARY TABLES ├── TMATRIX — Traceability Matrix Planning Header ├── TMATRIXINPUT — Raw-Material / Buy-Out Consumption Lines (child of TMATRIX) └── TMATRIXOUTPUT — SET / FGSerial / MixOutputLot Output Lines (child of TMATRIX) REFERENCED MASTER TABLES (Foreign Keys) ├── MALLOCATION — Production Allocation / Work Order header ├── TMMDETAIL — MM Document Detail (Manufacturing Module) ├── MITEM — Item / Product Master ├── MSKU — SKU / Unit-of-Measure Master ├── MPROCESS — Process Master ├── MPROCESSGROUP — Process Group Master ├── TLOT — Lot / Batch Master (RM batches, SET lots, FGSerial lots) ├── TLOTDETAIL — Lot Transaction Detail (populated after posting) ├── MBOM — Bill of Materials Header ├── MBOMDETAIL — BOM Component Lines ├── TINDENT — Material Indent / Issue Request └── MCLIENT — Tenant / Client Master ================================================================================ 1. SAVE MATRIX ================================================================================ Route : POST /Matrix/SaveMatrix Purpose : Creates a new Traceability Matrix (draft) or updates an existing draft matrix. A matrix defines the production plan — which RM batches are consumed (inputs) and which SET/FGSerial lots are produced (outputs) — for a specific Allocation, Mode, and set range. Only matrices in MATRIXSTATUS = 0 (Draft) can be saved/ updated via this endpoint. Tables Written ├── TMATRIX — INSERT (new) or UPDATE (existing draft) header row ├── TMATRIXINPUT — DELETE + INSERT all input lines (full replace) └── TMATRIXOUTPUT — DELETE + INSERT all output lines (full replace) Foreign Keys Validated ├── MALLOCATION.ALLOCATIONID — Production work order must exist ├── MITEM.ITEMID — FG Item (Mode=1) must exist ├── MSKU.SKUID — FG SKU must exist ├── MPROCESS.PROCESSID — Process assignment ├── MPROCESSGROUP.PROCESSGROUPID — Open-Mix process group (Mode=2) ├── TMMDETAIL.DOCUMENTDETAILID — MM document linkage (optional, -1 if unused) ├── MBOM.BOMID — BOM to explode (optional, -1 if unused) └── TLOT.LOTID — RM batch assignment per input line Caching : NOT_REQUIRED (transactional write) ── Request ───────────────────────────────────────────────────────────────── Header: Login: Body (MatrixDTO — JSON): { "MatrixId" : 0, "MatrixCode" : "MTX-2026-001", "MatrixMode" : 1, "BatchAssignMode" : 0, "AllocationId" : 101, "MmDetailId" : -1, "AllocationSlNo" : 1, "SetFrom" : 1, "SetTo" : 5, "FgItemId" : 210, "FgSkuId" : 15, "ProcessId" : 3, "ProcessGroupId" : -1, "BomId" : 42, "ProcessLotQty" : 0, "Remarks" : "Initial draft for Batch A", "Inputs": [ { "MatrixInputId" : 0, "SlNo" : 1, "ItemId" : 305, "SkuId" : 8, "ItemCategory" : 0, "LotId" : 1024, "PlannedQty" : 50.0000, "AllocatedQty" : 0, "ConsumedQty" : 0, "MixProportion" : 0, "BomLineId" : 7, "BomId" : 42 } ], "Outputs": [ { "MatrixOutputId" : 0, "SlNo" : 1, "OutputLevel" : 0, "ItemId" : 210, "SkuId" : 15, "LotId" : -1, "LotQuantity" : 10.0000, "SetNumber" : 1, "BomLineId" : -1, "BomId" : 42 } ] } ── Response ──────────────────────────────────────────────────────────────── { "StatusCode" : 200, "Message" : "Success", "Data" : "Matrix saved successfully. MatrixId: 58", "CacheKey" : null } Error (400/500): { "StatusCode" : 500, "Message" : "Duplicate MATRIXCODE for this tenant.", "Data" : null, "CacheKey" : null } ================================================================================ 2. GET MATRIX ================================================================================ Route : GET /Matrix/GetMatrix?MatrixId={id} Purpose : Retrieves complete details of a single Traceability Matrix by its primary key — including the header, all input lines (RM/BO consumption), and all output lines (SET/FGSerial lots). Used by the UI to populate the Matrix editor / viewer form. Tables Read ├── TMATRIX — Matrix header ├── TMATRIXINPUT — Input consumption lines ├── TMATRIXOUTPUT — Output lot lines ├── MITEM — Item name/code joins (inputs & outputs) ├── MSKU — SKU name joins ├── TLOT — Lot/batch details per input line ├── MALLOCATION — Allocation code/description └── MPROCESS — Process name Foreign Keys Exposed in Response ├── TMATRIX.ALLOCATIONID → MALLOCATION ├── TMATRIX.FGITEMID → MITEM ├── TMATRIX.FGSKUID → MSKU ├── TMATRIX.PROCESSID → MPROCESS ├── TMATRIX.BOMID → MBOM ├── TMATRIXINPUT.ITEMID → MITEM ├── TMATRIXINPUT.SKUID → MSKU ├── TMATRIXINPUT.LOTID → TLOT └── TMATRIXOUTPUT.LOTID → TLOT Caching : CLIENT_LEVEL (keyed by MatrixId + TenantId) ── Request ───────────────────────────────────────────────────────────────── Header: Login: Query Parameter: MatrixId=58 ── Response ──────────────────────────────────────────────────────────────── { "StatusCode" : 200, "Message" : "Success", "Data" : { "MatrixId" : 58, "MatrixCode" : "MTX-2026-001", "MatrixMode" : 1, "BatchAssignMode" : 0, "MatrixStatus" : 0, "AllocationId" : 101, "AllocationCode" : "ALLOC-2026-101", "SetFrom" : 1, "SetTo" : 5, "FgItemId" : 210, "FgItemCode" : "FG-ITEM-A", "FgSkuId" : 15, "ProcessId" : 3, "BomId" : 42, "Remarks" : "Initial draft for Batch A", "ActivatedOn" : null, "SetsCount" : 0, "SerialsCount" : 0, "Inputs" : [ { "MatrixInputId" : 120, "SlNo" : 1, "ItemId" : 305, "ItemCode" : "RM-305", "SkuId" : 8, "ItemCategory" : 0, "LotId" : 1024, "LotCode" : "LOT-2025-1024", "PlannedQty" : 50.0000, "AllocatedQty" : 50.0000, "ConsumedQty" : 0.0000, "LineStatus" : 0 } ], "Outputs" : [ { "MatrixOutputId" : 230, "SlNo" : 1, "OutputLevel" : 0, "ItemId" : 210, "SkuId" : 15, "LotId" : -1, "LotQuantity" : 10.0000, "SetNumber" : 1 } ] }, "CacheKey" : "CLIENT|OBJECTMATRIX|58|" } ================================================================================ 3. GET MATRIX LIST ================================================================================ Route : GET /Matrix/GetMatrixList Purpose : Returns a paginated, filterable, and sortable list of matrices belonging to a specific Allocation. Supports searching by matrix code, filtering by status (Draft/Active/Superseded/Deleted) and mode (Product/FGItem/OpenMix), and sort on any exposed column. Used to populate the matrix grid/list UI within an allocation context. Tables Read ├── TMATRIX — Primary list source ├── MALLOCATION — Allocation code/name join ├── MITEM — FG Item name join └── MSKU — FG SKU join Foreign Keys Used in Filtering └── TMATRIX.ALLOCATIONID → MALLOCATION (MANDATORY filter — required param) Caching : CLIENT_LEVEL (keyed by all criteria + TenantId + PageOffset) ── Request ───────────────────────────────────────────────────────────────── Header: Login: Query Parameters: AllocationId = 101 (required — filters to one allocation) StatusFilter = 1 (optional: 0=Draft, 1=Active, 2=Superseded, 3=Deleted) ModeFilter = 1 (optional: 0=Product, 1=FGItem, 2=OpenMix) SearchText = "MTX-2026" (optional — searches MatrixCode) PageOffset = 0 (0-based page index) PageSize = 20 (rows per page; defaults to 20) SortBy = "MatrixCode" (optional column name) SortDesc = false (true = descending) ── Response ──────────────────────────────────────────────────────────────── { "StatusCode" : 200, "Message" : "Success", "Data" : { "TotalCount" : 2, "PageOffset" : 0, "PageSize" : 20, "Items" : [ { "MatrixId" : 58, "MatrixCode" : "MTX-2026-001", "MatrixMode" : 1, "MatrixStatus" : 1, "AllocationCode" : "ALLOC-2026-101", "FgItemCode" : "FG-ITEM-A", "SetFrom" : 1, "SetTo" : 5, "ActivatedOn" : "2026-05-15T10:30:00" }, { "MatrixId" : 59, "MatrixCode" : "MTX-2026-002", "MatrixMode" : 1, "MatrixStatus" : 0, "AllocationCode" : "ALLOC-2026-101", "FgItemCode" : "FG-ITEM-B", "SetFrom" : 6, "SetTo" : 10, "ActivatedOn" : null } ] }, "CacheKey" : "CLIENT|...|" } ================================================================================ 4. DELETE MATRIX ================================================================================ Route : DELETE /Matrix/DeleteMatrix?MatrixId={id} Purpose : Soft-deletes a Traceability Matrix by setting its MATRIXSTATUS to 3 (Deleted). Only Draft matrices (MATRIXSTATUS = 0) that have not been activated or used in production can be deleted. This is a logical delete — the row is retained in the database for audit trail purposes. Tables Written └── TMATRIX — UPDATE MATRIXSTATUS = 3, MODIFIEDBYID, MODIFIEDON Foreign Keys Validated (guard checks before delete) └── TMATRIX.MATRIXID — Must exist and belong to the caller's TenantId Caching : NOT_REQUIRED (transactional write; clears CLIENT_LEVEL cache) ── Request ───────────────────────────────────────────────────────────────── Header: Login: Query Parameter: MatrixId=58 ── Response ──────────────────────────────────────────────────────────────── { "StatusCode" : 200, "Message" : "Success", "Data" : "Matrix deleted successfully.", "CacheKey" : null } Error (business rule violation): { "StatusCode" : 500, "Message" : "Cannot delete an Active or Superseded matrix.", "Data" : null, "CacheKey" : null } ================================================================================ 5. ACTIVATE MATRIX ================================================================================ Route : GET /Matrix/ActivateMatrix?MatrixId={id} Purpose : Transitions a Draft matrix to Active status (MATRIXSTATUS = 0 → 1). During activation the BLL performs a stock sufficiency check — verifying that each input line's LOTID has sufficient available stock to cover PLANNEDQTY. On success, the system records ACTIVATEDON timestamp and may generate SET/FGSerial lot stubs in TLOT for output tracking. Only one Active matrix per ALLOCATIONID + ALLOCATIONSLNO combination is permitted. Tables Written ├── TMATRIX — UPDATE MATRIXSTATUS = 1, ACTIVATEDON, MODIFIEDBYID, MODIFIEDON └── TLOT — INSERT lot stubs for output SET / FGSerial rows (if applicable) Tables Read (validation) ├── TMATRIXINPUT — Input lines for stock sufficiency checks ├── TLOT — Current available stock per batch └── TLOTDETAIL — Transaction history for lot balance calculation Foreign Keys Validated ├── TMATRIX.ALLOCATIONID → MALLOCATION └── TMATRIXINPUT.LOTID → TLOT (stock balance check per input) Caching : NOT_REQUIRED (transactional write) ── Request ───────────────────────────────────────────────────────────────── Header: Login: Query Parameter: MatrixId=58 ── Response ──────────────────────────────────────────────────────────────── { "StatusCode" : 200, "Message" : "Success", "Data" : { "MatrixId" : 58, "MatrixCode" : "MTX-2026-001", "ActivatedOn" : "2026-05-28T09:15:00", "ShortageList": [] }, "CacheKey" : null } Error (stock shortage): { "StatusCode" : 500, "Message" : "Stock shortage detected for one or more input lines.", "Data" : { "ShortageList" : [ { "ItemId" : 305, "ItemCode" : "RM-305", "LotId" : 1024, "LotCode" : "LOT-2025-1024", "PlannedQty" : 50.0, "AvailableQty": 30.0, "Shortage" : 20.0 } ] }, "CacheKey" : null } ================================================================================ 6. SUPERSEDE MATRIX ================================================================================ Route : POST /Matrix/SupersedeMatrix?OldMatrixId={id} Purpose : Replaces an Active matrix with a revised version in a single atomic operation. The existing Active matrix is transitioned to MATRIXSTATUS = 2 (Superseded) and its SUPERSEDEDBYID column is set to the newly created matrix's ID. The new matrix is saved and immediately activated. This ensures production traceability is preserved — the historical matrix is never deleted, and the lineage chain (via SUPERSEDEDBYID self-FK) is maintained. Tables Written ├── TMATRIX — UPDATE old matrix: MATRIXSTATUS=2, SUPERSEDEDBYID= ├── TMATRIX — INSERT new matrix header (as Draft → immediately Activated) ├── TMATRIXINPUT — INSERT new input lines └── TMATRIXOUTPUT — INSERT new output lines Foreign Keys Validated ├── TMATRIX.MATRIXID (OldMatrixId) — Old matrix must be Active ├── TMATRIX.SUPERSEDEDBYID — Self-referencing FK on TMATRIX ├── MALLOCATION.ALLOCATIONID — New matrix allocation ├── MITEM.ITEMID — FG Item on new matrix └── TLOT.LOTID — RM batch assignments Caching : NOT_REQUIRED (transactional write) ── Request ───────────────────────────────────────────────────────────────── Header: Login: Query Parameter: OldMatrixId=58 Body (MatrixDTO — same structure as SaveMatrix, MatrixId = 0 for new): { "MatrixId" : 0, "MatrixCode" : "MTX-2026-001-R1", "MatrixMode" : 1, "BatchAssignMode" : 0, "AllocationId" : 101, "MmDetailId" : -1, "AllocationSlNo" : 1, "SetFrom" : 1, "SetTo" : 5, "FgItemId" : 210, "FgSkuId" : 15, "ProcessId" : 3, "ProcessGroupId" : -1, "BomId" : 42, "Remarks" : "Revised — replaced LOT-1024 with LOT-1030", "Inputs": [ { "MatrixInputId" : 0, "SlNo" : 1, "ItemId" : 305, "SkuId" : 8, "ItemCategory" : 0, "LotId" : 1030, "PlannedQty" : 50.0000, "AllocatedQty" : 0, "ConsumedQty" : 0, "MixProportion" : 0, "BomLineId" : 7, "BomId" : 42 } ], "Outputs": [ { "MatrixOutputId" : 0, "SlNo" : 1, "OutputLevel" : 0, "ItemId" : 210, "SkuId" : 15, "LotId" : -1, "LotQuantity" : 10.0000, "SetNumber" : 1, "BomLineId" : -1, "BomId" : 42 } ] } ── Response ──────────────────────────────────────────────────────────────── { "StatusCode" : 200, "Message" : "Success", "Data" : "Matrix superseded successfully. New MatrixId: 63", "CacheKey" : null } ================================================================================ 7. VALIDATE ISSUE ================================================================================ Route : GET /Matrix/ValidateIssue Purpose : Pre-validates a material issue transaction before it is posted. Given an Indent, Item, Lot/Batch, and Quantity, this endpoint checks: (1) whether the requested lot is the correct assigned batch per the Active matrix input line; (2) whether the quantity to be issued does not exceed the remaining planned quantity (PLANNEDQTY - CONSUMEDQTY); and (3) whether the indent's linked matrix is in Active status. This is called by the Material Issue module before committing a transaction to prevent over-issue and wrong-batch errors. Tables Read ├── TMATRIX — Matrix status check (must be Active) ├── TMATRIXINPUT — Input line lookup by MATRIXID + ITEMID + LOTID ├── TINDENT — Indent-to-Matrix linkage (TINDENT.MATRIXID FK) └── TLOT — Lot availability and stock balance Foreign Keys Used ├── TINDENT.MATRIXID → TMATRIX (indent links to a matrix) ├── TMATRIXINPUT.MATRIXID → TMATRIX ├── TMATRIXINPUT.ITEMID → MITEM └── TMATRIXINPUT.LOTID → TLOT Caching : NOT_REQUIRED (transactional — result changes as issues are posted) ── Request ───────────────────────────────────────────────────────────────── Header: Login: Query Parameters: IndentId = 501 ItemId = 305 LotId = 1024 Qty = 25.5 ── Response ──────────────────────────────────────────────────────────────── Success (issue is valid): { "StatusCode" : 200, "Message" : "Success", "Data" : { "IsValid" : true, "MatrixInputId" : 120, "MatrixId" : 58, "ItemId" : 305, "LotId" : 1024, "PlannedQty" : 50.0000, "AlreadyConsumed" : 10.0000, "BalanceQty" : 40.0000, "RequestedQty" : 25.5000, "ValidationMessage": "OK" }, "CacheKey" : null } Failure (over-issue or wrong lot): { "StatusCode" : 200, "Message" : "Success", "Data" : { "IsValid" : false, "MatrixInputId" : 120, "MatrixId" : 58, "PlannedQty" : 50.0000, "AlreadyConsumed" : 45.0000, "BalanceQty" : 5.0000, "RequestedQty" : 25.5000, "ValidationMessage": "Issue quantity 25.5 exceeds remaining balance 5.0 for this input line." }, "CacheKey" : null } ================================================================================ 8. GET AVAILABLE BATCHES ================================================================================ Route : GET /Matrix/GetAvailableBatches Purpose : Returns a list of available RM/BO lot batches for a given Item + SKU combination, along with each batch's current stock balance. An optional RequiredQty parameter allows the caller to flag batches with insufficient stock. This is used in the Matrix editor to help planners choose which lot to assign to an input line, ensuring only batches with actual stock are presented. Tables Read ├── TLOT — All lots for the given ItemId + SkuId ├── TLOTDETAIL — Transaction details to compute available balance ├── MITEM — Item code/name for display └── MSKU — SKU/UOM for display Foreign Keys Used ├── TLOT.ITEMID → MITEM └── TLOT.SKUID → MSKU Caching : CLIENT_LEVEL (keyed by ItemId + SkuId + RequiredQty + TenantId) ── Request ───────────────────────────────────────────────────────────────── Header: Login: Query Parameters: ItemId = 305 SkuId = 8 RequiredQty = 50.0 (optional — null means return all batches) ── Response ──────────────────────────────────────────────────────────────── { "StatusCode" : 200, "Message" : "Success", "Data" : [ { "LotId" : 1024, "LotCode" : "LOT-2025-1024", "LotDate" : "2025-11-20T00:00:00", "ItemId" : 305, "ItemCode" : "RM-305", "SkuId" : 8, "SkuCode" : "KG", "AvailableQty" : 120.0000, "IsSufficient" : true }, { "LotId" : 1025, "LotCode" : "LOT-2025-1025", "LotDate" : "2025-12-05T00:00:00", "ItemId" : 305, "ItemCode" : "RM-305", "SkuId" : 8, "SkuCode" : "KG", "AvailableQty" : 30.0000, "IsSufficient" : false } ], "CacheKey" : "CLIENT|...|ItemId:305|SkuId:8|Qty:50" } ================================================================================ 9. GET SELECT LIST MATRIX ================================================================================ Route : POST /Matrix/GetSelectListMatrix Purpose : Returns a lightweight picklist (ID + Code + Description) of matrices suitable for use in dropdown controls across the application (e.g., Indent creation, Issue posting). The result is filtered by the criteria provided — typically by AllocationId, status = Active only, and the caller's TenantId. Soft-deleted (MATRIXSTATUS = 3) matrices are always excluded. Tables Read ├── TMATRIX — Source of picklist data └── MALLOCATION — Allocation code join (for display label) Foreign Keys Used └── TMATRIX.ALLOCATIONID → MALLOCATION Caching : NOT_REQUIRED (criteria-driven; called on demand) ── Request ───────────────────────────────────────────────────────────────── Header: Login: Body (CriteriaDTO — JSON): { "Id" : 101, "StatusFilter": 1, "SearchText" : "", "ExtraInt1" : 0, "ExtraStr1" : null } Note: CriteriaDTO fields are interpreted contextually by the BLL. Typically: Id = AllocationId, StatusFilter = MatrixStatus filter. ── Response ──────────────────────────────────────────────────────────────── { "StatusCode" : 200, "Message" : "Success", "Data" : [ { "Id" : 58, "Code" : "MTX-2026-001", "Description" : "MTX-2026-001 | ALLOC-2026-101 | Sets 1-5" }, { "Id" : 60, "Code" : "MTX-2026-003", "Description" : "MTX-2026-003 | ALLOC-2026-101 | Sets 6-10" } ], "CacheKey" : null } ================================================================================ 10. EXPLODE BOM ================================================================================ Route : GET /Matrix/ExplodeBOM Purpose : Expands (explodes) a Bill of Materials for a given Product/FG Item across a specified set range (SetFrom to SetTo) and returns the calculated input and output lines that should populate a new matrix. This is a planning aid — when a matrix is being created, the user selects a BOM and the system auto-generates the expected RM consumption quantities and FG output quantities per set, pre-filling the matrix input/output line grids. SetFrom must not exceed SetTo (validated at endpoint level). Tables Read ├── MBOM — BOM header (linked to ProductItemId) ├── MBOMDETAIL — BOM component lines (RM quantities per output unit) ├── MITEM — Item code/name for each component └── MSKU — SKU/UOM for each component Foreign Keys Used ├── MBOM.ITEMID → MITEM (the FG/product item) └── MBOMDETAIL.BOMID → MBOM └── MBOMDETAIL.COMPONENTITEMID → MITEM Caching : CLIENT_LEVEL (keyed by ProductItemId + SetFrom + SetTo + TenantId) Validation : SetFrom > SetTo returns HTTP 400 immediately without BLL call. ── Request ───────────────────────────────────────────────────────────────── Header: Login: Query Parameters: ProductItemId = 210 SetFrom = 1 SetTo = 5 ── Response ──────────────────────────────────────────────────────────────── { "StatusCode" : 200, "Message" : "Success", "Data" : { "ProductItemId" : 210, "ProductCode" : "FG-ITEM-A", "BomId" : 42, "BomCode" : "BOM-FG-A-001", "SetFrom" : 1, "SetTo" : 5, "SetsCount" : 5, "ExplodedInputs" : [ { "BomLineId" : 7, "SlNo" : 1, "ItemId" : 305, "ItemCode" : "RM-305", "ItemName" : "Raw Material A", "SkuId" : 8, "SkuCode" : "KG", "QtyPerSet" : 10.0000, "TotalQty" : 50.0000, "ItemCategory": 0 }, { "BomLineId" : 8, "SlNo" : 2, "ItemId" : 306, "ItemCode" : "BO-306", "ItemName" : "Bought-Out Component B", "SkuId" : 9, "SkuCode" : "PCS", "QtyPerSet" : 2.0000, "TotalQty" : 10.0000, "ItemCategory": 1 } ], "ExplodedOutputs" : [ { "SlNo" : 1, "OutputLevel": 0, "ItemId" : 210, "ItemCode" : "FG-ITEM-A", "SkuId" : 15, "SkuCode" : "NOS", "QtyPerSet" : 1.0000, "TotalQty" : 5.0000 } ] }, "CacheKey" : "CLIENT|...|ProdItem:210|Set:1-5" } Error (SetFrom > SetTo): { "StatusCode" : 400, "Message" : "SetFrom cannot be greater than SetTo.", "Data" : null, "CacheKey" : null } ================================================================================ MATRIX STATUS REFERENCE ================================================================================ Code Label Description ---- ----------- ---------------------------------------------------------- 0 Draft Newly created; editable; can be deleted 1 Active Activated; production in progress; locked from edits 2 Superseded Replaced by a newer matrix revision; read-only; kept for audit 3 Deleted Soft-deleted; excluded from all read queries ================================================================================ MATRIX MODE REFERENCE ================================================================================ Code Label Description ---- ---------- ------------------------------------------------------------ 0 Product BOM-driven, one product type across multiple sets 1 FGItem FG Item-specific matrix with defined FG Item + SKU 2 OpenMix Open blend / mix mode with process group and mix proportions ================================================================================ BATCH ASSIGN MODE REFERENCE ================================================================================ Code Label Description ---- ------ ---------------------------------------------------------------- 0 Item One batch assigned per Item across all sets 1 Stage Batch assignment varies by production stage 2 SKU Batch assignment varies by SKU / unit of measure ================================================================================ STANDARD RESPONSE ENVELOPE (ResponseStandardDTO) ================================================================================ All 10 endpoints return a consistent envelope: { "StatusCode" : // 200 = success; 400 = bad request; 500 = error "Message" : // "Success" or error message "Data" : // Payload — type varies per endpoint (see above) "CacheKey" : // Cache key used; null for NOT_REQUIRED endpoints } ================================================================================ FOREIGN KEY SUMMARY TABLE ================================================================================ Column FK Target Referenced In ---------------------------- ------------------------ ---------------------------- TMATRIX.ALLOCATIONID MALLOCATION.ALLOCATIONID SaveMatrix, GetMatrixList, ActivateMatrix TMATRIX.MMDETAILID TMMDETAIL.DOCUMENTDETAILID SaveMatrix TMATRIX.FGITEMID MITEM.ITEMID SaveMatrix, GetMatrix TMATRIX.FGSKUID MSKU.SKUID SaveMatrix, GetMatrix TMATRIX.PROCESSID MPROCESS.PROCESSID SaveMatrix, GetMatrix TMATRIX.PROCESSGROUPID MPROCESSGROUP.PROCESSGROUPID SaveMatrix (Mode=2) TMATRIX.OUTPUTLOTID TLOT.LOTID ActivateMatrix (Mode=2) TMATRIX.SUPERSEDEDBYID TMATRIX.MATRIXID (self) SupersedeMatrix TMATRIX.BOMID MBOM.BOMID SaveMatrix, ExplodeBOM TMATRIXINPUT.MATRIXID TMATRIX.MATRIXID SaveMatrix, ValidateIssue TMATRIXINPUT.ITEMID MITEM.ITEMID SaveMatrix, GetAvailableBatches TMATRIXINPUT.SKUID MSKU.SKUID SaveMatrix TMATRIXINPUT.LOTID TLOT.LOTID SaveMatrix, ValidateIssue, GetAvailableBatches TMATRIXINPUT.BOMLINEID MBOMDETAIL.BOMLINEID SaveMatrix, ExplodeBOM TMATRIXINPUT.BOMID MBOM.BOMID SaveMatrix, ExplodeBOM TMATRIXINPUT.LOTDETAILID TLOTDETAIL.LOTDETAILID ValidateIssue (post-posting) TMATRIXOUTPUT.MATRIXID TMATRIX.MATRIXID SaveMatrix, ActivateMatrix TMATRIXOUTPUT.ITEMID MITEM.ITEMID SaveMatrix, GetMatrix TMATRIXOUTPUT.SKUID MSKU.SKUID SaveMatrix TMATRIXOUTPUT.LOTID TLOT.LOTID ActivateMatrix, GetMatrix TMATRIXOUTPUT.BOMLINEID MBOMDETAIL.BOMLINEID SaveMatrix, ExplodeBOM TMATRIXOUTPUT.BOMID MBOM.BOMID SaveMatrix, ExplodeBOM TMATRIXOUTPUT.LOTDETAILID TLOTDETAIL.LOTDETAILID ActivateMatrix (post-posting) TINDENT.MATRIXID TMATRIX.MATRIXID ValidateIssue ================================================================================ END OF DOCUMENT QMS Matrix Module | GB5 ERP | 10 Endpoints | 2026-05-28 ================================================================================