AI Automation

Explore
HomeEngineering BlogFootwear & Apparel Retail: Business Central Multi-Store Matrix & Variant Architecture
Industry Blueprint: Retail & Apparel 16 min read DataDaur Retail & ERP Engineering PracticePublished: 2026-08-21

Footwear & Apparel Retail: Business Central Multi-Store Matrix & Variant Architecture

An engineering blueprint for managing high-volume Size/Color/Width item matrix grids, real-time multi-store POS sync, and automated replenishment logic in Microsoft Dynamics 365 Business Central.

1. Executive Summary & Apparel Retail Debt

Footwear and apparel retail brands operate in high-complexity SKU environments. A single shoe style imported in 4 colors, 12 sizes, and 3 width fittings expands to 144 unique Stock Keeping Units (SKUs). Standard ERP systems designed for generic products force purchasing teams to create hundreds of individual item cards manually.

In Microsoft Dynamics 365 Business Central, implementing a 3D Size/Color/Width Variant Matrix Schema alongside Automated Store Replenishment Codeunits reduces SKU setup overhead by 90% and optimizes stock distribution across retail store networks.

2. 3D Size/Color/Width Variant Matrix Schema

Standard Business Central supports 1D Item Variants. DataDaur extends the data structure in AL to support a 3-dimensional matrix:

  • Parent Style Card: Holds common attributes (Brand, Season, Tariff Code, Fabric Composition).
  • Variant Dimension 1 (Color): Black, Navy, Off-White, Olive.
  • Variant Dimension 2 (Size): US 7, 7.5, 8, 8.5, 9, 9.5, 10, 10.5, 11.
  • Variant Dimension 3 (Width): Narrow (B), Medium (D), Wide (EE).

3. Production AL Code: Automated Store Replenishment

Below is a production AL Codeunit that calculates daily sales velocity over a rolling 14-day window and generates Store Transfer Orders automatically:

Codeunit 50180 Retail Replenishment Engine.al
codeunit 50180 "Retail Replenishment Engine"
{
    Access = Public;
    Subtype = Normal;

    procedure GenerateStoreTransferOrders(StoreLocationCode: Code[10]; TargetSafetyDays: Integer)
    var
        Item: Record Item;
        ItemVariant: Record "Item Variant";
        SKU: Record "Stockkeeping Unit";
        TransferHeader: Record "Transfer Header";
        TransferLine: Record "Transfer Line";
        SalesVelocity: Decimal;
        RequiredQty: Decimal;
        LineNo: Integer;
    begin
        SKU.SetRange("Location Code", StoreLocationCode);
        if not SKU.FindSet() then
            exit;

        repeat
            // 1. Calculate Daily Sales Velocity (Past 14 Days)
            SalesVelocity := CalculateDailyVelocity(SKU."Item No.", SKU."Variant Code", StoreLocationCode, 14);

            // 2. Determine Net Reorder Target
            RequiredQty := (SalesVelocity * TargetSafetyDays) - SKU.Inventory;

            if RequiredQty > 0 then begin
                if TransferHeader."No." = '' then
                    CreateTransferHeader(TransferHeader, 'CENTRAL_WH', StoreLocationCode);

                LineNo += 10000;
                TransferLine.Init();
                TransferLine."Document No." := TransferHeader."No.";
                TransferLine."Line No." := LineNo;
                TransferLine."Item No." := SKU."Item No.";
                TransferLine."Variant Code" := SKU."Variant Code";
                TransferLine.Quantity := RequiredQty;
                TransferLine.Insert(true);
            end;
        until SKU.Next() = 0;
    end;

    local procedure CalculateDailyVelocity(ItemNo: Code[20]; VariantCode: Code[10]; LocationCode: Code[10]; DaysWindow: Integer): Decimal
    var
        ValueEntry: Record "Value Entry";
        TotalSold: Decimal;
    begin
        ValueEntry.SetRange("Item No.", ItemNo);
        ValueEntry.SetRange("Variant Code", VariantCode);
        ValueEntry.SetRange("Location Code", LocationCode);
        ValueEntry.SetRange("Item Ledger Entry Type", ValueEntry."Item Ledger Entry Type"::Sale);
        ValueEntry.SetRange("Posting Date", CalcDate('<-' + Format(DaysWindow) + 'D>', Today), Today);

        ValueEntry.CalcSums("Invoiced Quantity");
        TotalSold := Abs(ValueEntry."Invoiced Quantity");

        if DaysWindow > 0 then
            exit(TotalSold / DaysWindow);
        exit(0);
    end;

    local procedure CreateTransferHeader(var TransferHeader: Record "Transfer Header"; FromLoc: Code[10]; ToLoc: Code[10])
    begin
        TransferHeader.Init();
        TransferHeader."No." := '';
        TransferHeader.Insert(true);
        TransferHeader.Validate("Transfer-from Code", FromLoc);
        TransferHeader.Validate("Transfer-to Code", ToLoc);
        TransferHeader.Modify(true);
    end;
}

4. Real-Time POS Sync & Webhook Architecture

Point-of-Sale (POS) integration principles:

  • Real-time Stock Inquiry: POS terminals query Business Central web APIs to check inventory availability in neighboring stores for omni-channel click-and-collect.
  • End-of-Day Sales Settlement: Automated background POST requests post consolidated Daily Sales Statements into Item Ledger and G/L accounts.

5. Landed Cost & Freight Container Allocation

Importing overseas containers requires accurate landed cost allocation (ocean freight, customs duty, port handling). Business Central Item Charges allocate costs by cubic volume or net weight across matrix variants.

6. Measurable Retail Velocity & ROI

90%
Faster Style SKU Creation
35%
Reduction in Out-of-Stock Store Occurrences
100%
Gross Margin Accuracy with Landed Cost

Need Expert Technical Guidance?

Consult directly with DataDaur's Senior ERP Architects & AI Engineers for custom architecture reviews, migration strategies, or technical audits.

Share Blog Post:

Editorial & Compliance Disclaimer: DataDaur is an independent enterprise software and AI consulting firm. Microsoft, Microsoft Dynamics 365, Business Central, Microsoft Power Platform, Dataverse, Copilot, Odoo, and related marks are registered trademarks of their respective owners. All technical specs, release data, and API capabilities documented in this blog post are cross-verified directly against official Microsoft Learn (learn.microsoft.com) and vendor documentation. System capabilities may vary depending on licensing tiers, regional localizations, and tenant configurations.

Book an Engineering Blog Consultation

Discuss custom architecture, AI agents, or ERP implementation strategy with our senior engineers.

Get In Touch

Let's Start a Conversation

Tell us about your project and we'll connect you with the right team.