texasstarbc

Warehouse Management

This document describes the warehouse management functionality and workflows implemented for Texas Star Nuts.

Overview

The warehouse management system integrates Business Central’s standard warehouse functionality with:


Architecture

System Components

Sales Order
    ↓
Warehouse Request
    ↓
Warehouse Shipment ← [Bill of Lading Generation]
    ↓
Pick Creation ← [Shelf Life Validation] ← [FEFO Logic]
    ↓
Register Pick ← [Lot Number Assignment]
    ↓
Post Shipment ← [EDI Field Sync]
    ↓
Sales Shipment + Posted Warehouse Shipment
    ↓
EDI ASN (via TrueCommerce)

Warehouse Shipment Processing

1. Shipment Creation

Trigger: Release sales order with warehouse location

Automatic Actions:

Key Fields Set:

Code Reference: TSNEventSubscriber.Codeunit.al - OnAfterCreateWhseShipmentHeaderFromWhseRequest


2. Shipment Header Data Entry

User-Entered Fields:

Field Purpose EDI Mapping
Bill of Lading No. Shipment identifier TRCBillofLading, TRCUDF2
Seal No. Trailer seal number TRCUDF3
Trailer Reference Trailer/container number TRCTrailerNumber, TRCCarrierPro
Shipping Agent Code Carrier code TRCUDF5
Shipment Time Scheduled ship time -
Pallet Code Pallet type/size -
Shipping Instructions Special instructions -
Manual Pallets User-entered pallet count -

Calculated Fields:

Field Synchronization: Every field modification triggers EDI field synchronization via event subscriber.

Code Reference: TSNWarehouseShipmentHeader.TableExt.al


3. ASN Type Determination

Trigger: Warehouse shipment line inserted

Logic:

if SalesHeader."TSN Total Quantity" > 25 then
    SalesHeader.TRCASNType := "Pallet Pick and Pack"
else
    SalesHeader.TRCASNType := "Pick and Pack";

ASN Types:

Code Reference: TSNWarehouseShipmentHeader.TableExt.al

Business Impact:


4. Pick Creation

Trigger: Create pick from warehouse shipment

Automatic Processes:

A. FEFO (First Expiry, First Out) Logic

B. Shelf Life Validation

Example:

Customer Requirement: 60 days shelf life
Shipment Date: 2026-01-13
Lot A Expiration: 2026-02-15 (33 days remaining) ← EXCLUDED
Lot B Expiration: 2026-04-01 (78 days remaining) ← AVAILABLE
Lot C Expiration: 2026-03-20 (66 days remaining) ← AVAILABLE
Pick Suggestion: Lot C (FEFO - earliest expiry among compliant lots)

Code Reference: TSNShelfLifeManagement.Codeunit.al

C. Bin Selection

D. Warehouse Insight Integration


5. Pick Registration

Process:

  1. Warehouse worker prints pick document
  2. Physical picking performed
  3. Lot numbers scanned/recorded
  4. Pick quantities confirmed
  5. Pick registered in system

Automatic Actions:

Code Reference: TSNEventSubscriber.Codeunit.al - OnAfterRegisterPick


6. Shipment Posting

Pre-Posting Validation:

Posting Actions:

  1. Create posted warehouse shipment
  2. Create sales shipment
  3. Update inventory ledger entries
  4. Preserve shipment data (BOL, seal, trailer, weights)
  5. Trigger EDI ASN transmission (via TrueCommerce)

Posted Document Data: All shipment header fields preserved in posted documents:

Code Reference: TSNPostedWhseShipmentHeader.TableExt.al


Warehouse Receipt Processing

1. Receipt Creation

Trigger: Release purchase order with warehouse location

Automatic Actions:

Key Fields:


2. Receipt Data Entry

User-Entered Fields:

Field Purpose Source
Alternate Lot No. Supplier lot number Purchase line
Country of Origin Product origin Purchase line
Expiration Date Lot expiration Manual entry or PO
Lot No. Internal lot number Auto-generated or manual

Lot Number Generation: If not manually entered, lot number auto-generated as:

Format: [PO Number]-[Item Line Number]
Example: PO12345-10

Code Reference: TSNWMSExtension.Codeunit.al


3. Manual Item Receipt (Warehouse Insight)

Workflow:

  1. Receiver scans item barcode
  2. System identifies purchase order line
  3. Receiver enters quantity received
  4. System prompts for lot number and expiration
  5. System suggests or generates lot number
  6. Receiver confirms receipt

Automatic Data Population:

Code Reference: TSNWMSExtension.Codeunit.al - OnAfterManualItemReceiptLineCreate


4. Put-Away Creation

Trigger: Create put-away from warehouse receipt

Actions:

Warehouse Insight Integration:


5. Receipt Posting

Posting Actions:

  1. Create posted warehouse receipt
  2. Create purchase receipt
  3. Update inventory ledger entries
  4. Record lot numbers, expiration dates, country of origin
  5. Create bin content entries

Item Ledger Entry Fields:


Bill of Lading (BOL) Management

BOL Number Generation

Configuration:

  1. Open Warehouse Setup
  2. Navigate to “BOL Number Series” field
  3. Assign number series (e.g., BOL-0001)

Automatic Generation:

Manual Override: Users can manually edit BOL number if needed (number series still validates uniqueness).

Code Reference: TSNWarehouseFunctions.Codeunit.al - GetNextBOLNumber


BOL Document Printing

Report: TSN Whse Ship Bill of Lading (50001)

Includes:

Print Timing:

Posted Document Report: TSN Post Whse Ship BOL (50002)


Lot Number Management

Automatic Lot Generation

Trigger: Warehouse receipt creation from purchase order

Format:

[PO Number]-[Item Line Number]

Examples:

Benefits:


Alternate Lot Number

Purpose: Track vendor’s lot/batch number alongside internal lot number

Data Flow:

  1. Vendor lot number entered on purchase order line
  2. Copied to warehouse receipt line
  3. Posted to item ledger entry
  4. Available for reporting and traceability

Use Cases:


Lot Tracking Throughout Process

Stage Lot Information
Purchase Order Alternate Lot No., Country of Origin
Warehouse Receipt Both internal & alternate lot, expiration
Item Ledger Entry Full lot details recorded
Bin Content Lot-specific inventory
Pick Creation Lot selected by FEFO + shelf life
Shipment Lot number on packing slip
Sales Shipment Lot number on shipment document

Warehouse Insight (IWorks) Integration

License Plate Management

License Plate Template Configuration:

License Plate Creation:

License Plate Usage:

Code Reference: TSNLicensePlateTemplate.TableExt.al


Advanced WMS Features

Supported by Integration:

  1. Directed Put-Away: System-directed bin assignments
  2. Directed Picking: Optimized pick paths
  3. Bin Ranking: Prioritized bin selection
  4. Wave Picking: Batch pick multiple orders
  5. Cross-Docking: Direct receipt to shipment
  6. RF Scanning: Barcode scanning for all transactions

Warehouse Overview

TSN Warehouse Overview Page

Purpose: Real-time visibility of inventory by bin, lot, vendor, and expiration

Access: Search for “TSN Warehouse Overview” or page 50000

Columns:

Filters:

Use Cases:

1. Find Inventory for Picking

Filter by item to see all bins/lots available.

2. Expiration Monitoring

Filter by expiration date range to find near-expiry lots.

3. Vendor Analysis

Filter by vendor to see supplier inventory on hand.

4. Bin Content Review

Filter by bin to see what’s stored in a specific location.

Code Reference: TSNWarehouseOverview.Page.al


Shipping Documentation

Reports Available

1. Warehouse Receipt (50000)

2. Warehouse Shipment BOL (50001)

3. Posted Warehouse Shipment BOL (50002)

4. Output Label (50003)


Best Practices

1. Shelf Life Management

2. Lot Tracking

3. Bill of Lading

4. Warehouse Insight

5. EDI Integration


Troubleshooting

Issue: BOL Number Not Generated

Cause: Number series not configured in Warehouse Setup

Solution:

  1. Open Warehouse Setup
  2. Set “BOL Number Series” field
  3. Create/assign number series (e.g., BOL)

Issue: Shelf Life Validation Failing

Cause: Customer shelf life requirement not set or lots have insufficient shelf life

Solution:

  1. Verify customer shelf life requirement on customer card
  2. Check lot expiration dates in inventory
  3. Review shelf life calculation: (Expiration Date - Ship Date) >= Requirement
  4. Receive newer inventory or adjust customer requirement

Issue: Lot Not Suggested for Picking

Possible Causes:

  1. Lot fails shelf life validation
  2. Lot not in pickable bin
  3. Bin excluded from planning
  4. Quantity already reserved

Solution:

  1. Check lot expiration vs. customer shelf life requirement
  2. Verify bin is pick-enabled
  3. Check bin “Exclude from Planning” flag
  4. Review reservation entries

Issue: EDI Fields Not Syncing

Cause: Event subscriber not firing or field mapping issue

Solution:

  1. Verify TSN Event Subscriber codeunit is published
  2. Check field mappings in event subscriber code
  3. Test by manually entering Seal No., verify TRCUDF3 populates
  4. Review event subscriber log (if logging enabled)

Summary

The warehouse management system provides:

  1. Bill of Lading Management: Automated numbering and tracking
  2. Lot Tracking: Comprehensive lot/expiration tracking with FEFO
  3. Shelf Life Validation: Ensures customer requirements met
  4. WMS Integration: Warehouse Insight for advanced operations
  5. EDI Integration: Automatic shipment data synchronization
  6. Real-Time Visibility: Warehouse overview for inventory analysis
  7. Compliance: Food safety and traceability requirements

See Also: