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:
- Warehouse Insight Advanced WMS (IWorks) - License plate tracking and advanced warehouse operations
- Bill of Lading Management - Automated BOL numbering and tracking
- Lot Tracking - FEFO (First Expiry, First Out) with shelf life validation
- EDI Integration - Automatic shipment data synchronization
- Weight/Volume Tracking - Shipment measurement for freight
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:
- Warehouse request created
- Warehouse shipment header created
- Bill of Lading number generated from number series
- Initial EDI fields populated
Key Fields Set:
- Bill of Lading No.
- TRCBillofLading (EDI field)
- TRCUDF2 (EDI BOL backup)
Code Reference: TSNEventSubscriber.Codeunit.al - OnAfterCreateWhseShipmentHeaderFromWhseRequest
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:
- Total Pallets (flow field from lines)
- Total Weight (sum of line weights)
- Total Volume (sum of line volumes)
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:
- Pick and Pack: Small orders (≤25 units) - case picks
- Pallet Pick and Pack: Large orders (>25 units) - pallet picks
Code Reference: TSNWarehouseShipmentHeader.TableExt.al
Business Impact:
- Determines picking method
- Affects packing requirements
- Influences carrier selection
- Impacts EDI ASN message format
4. Pick Creation
Trigger: Create pick from warehouse shipment
Automatic Processes:
A. FEFO (First Expiry, First Out) Logic
- System suggests lots with earliest expiration first
- Ensures oldest inventory ships first
- Minimizes waste from expiration
B. Shelf Life Validation
- Retrieves customer shelf life requirement
- Calculates remaining shelf life for each lot
- Filters out lots with insufficient shelf life
- Only lots meeting requirement are available for picking
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
- Considers “Exclude from Planning” bins
- Selects optimal bin based on:
- Lot expiration date
- Bin ranking
- Pick efficiency
- Zone/bin type
D. Warehouse Insight Integration
- If using license plates, pick suggests by license plate
- License plate contains lot/expiration information
- Pick confirmation scans license plate barcode
5. Pick Registration
Process:
- Warehouse worker prints pick document
- Physical picking performed
- Lot numbers scanned/recorded
- Pick quantities confirmed
- Pick registered in system
Automatic Actions:
- Item tracking synchronized with picked lots
- Lot numbers assigned to shipment lines
- Inventory reserved against specific lots
- Bin content updated
Code Reference: TSNEventSubscriber.Codeunit.al - OnAfterRegisterPick
6. Shipment Posting
Pre-Posting Validation:
- All lines have picks registered
- Lot numbers assigned to all tracked items
- EDI fields populated
- Bill of Lading number present
Posting Actions:
- Create posted warehouse shipment
- Create sales shipment
- Update inventory ledger entries
- Preserve shipment data (BOL, seal, trailer, weights)
- Trigger EDI ASN transmission (via TrueCommerce)
Posted Document Data:
All shipment header fields preserved in posted documents:
- Bill of Lading No.
- Seal No.
- Trailer Reference
- Pallet counts
- Weight/volume totals
- All TRC* EDI fields
Code Reference: TSNPostedWhseShipmentHeader.TableExt.al
Warehouse Receipt Processing
1. Receipt Creation
Trigger: Release purchase order with warehouse location
Automatic Actions:
- Warehouse request created
- Warehouse receipt header created
- Receipt lines populated from purchase lines
Key Fields:
- PO Number (from purchase order)
- Delivery Appointment Date/Time
- Shipping Agent Code
- Special Instructions
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:
- Receiver scans item barcode
- System identifies purchase order line
- Receiver enters quantity received
- System prompts for lot number and expiration
- System suggests or generates lot number
- Receiver confirms receipt
Automatic Data Population:
- Alternate lot number copied from PO line
- Country of origin copied from PO line
- Vendor information populated
- Item tracking created
Code Reference: TSNWMSExtension.Codeunit.al - OnAfterManualItemReceiptLineCreate
4. Put-Away Creation
Trigger: Create put-away from warehouse receipt
Actions:
- System suggests put-away bins based on item setup
- Put-away document created
- Lot numbers carried to put-away lines
Warehouse Insight Integration:
- License plates created during put-away
- License plate template determines package vs. pallet level
- Barcode labels printed for license plates
5. Receipt Posting
Posting Actions:
- Create posted warehouse receipt
- Create purchase receipt
- Update inventory ledger entries
- Record lot numbers, expiration dates, country of origin
- Create bin content entries
Item Ledger Entry Fields:
- Lot No.
- Alternate Lot No. (vendor lot)
- Country of Origin
- Expiration Date
- Net Weight
Bill of Lading (BOL) Management
BOL Number Generation
Configuration:
- Open Warehouse Setup
- Navigate to “BOL Number Series” field
- Assign number series (e.g., BOL-0001)
Automatic Generation:
- BOL number assigned when warehouse shipment created
- Pulled from number series
- Immediately synced to EDI fields
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:
- BOL number (prominently displayed)
- Shipper information (company address)
- Consignee information (ship-to address)
- Carrier information (shipping agent)
- Trailer/seal numbers
- Pallet count
- Total weight and cubage
- Itemized shipment lines with weights
- Barcode of BOL number
Print Timing:
- Can print before posting (draft BOL)
- Typically printed during/after pick registration
- Accompanies shipment physically
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:
- Purchase Order: PO-001234, Item Line 10000 → Lot No: PO-001234-10000
- Purchase Order: PO-001234, Item Line 20000 → Lot No: PO-001234-20000
Benefits:
- Traceability to source purchase order
- Unique lot numbers per receipt
- Easy identification of supplier batch
Alternate Lot Number
Purpose: Track vendor’s lot/batch number alongside internal lot number
Data Flow:
- Vendor lot number entered on purchase order line
- Copied to warehouse receipt line
- Posted to item ledger entry
- Available for reporting and traceability
Use Cases:
- Supplier quality issues → trace by vendor lot
- Product recalls → identify vendor batch
- Certificate of Analysis → link to vendor lot
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:
- Determines if license plates created at pallet or package level
- Controls barcode format and label layout
- Sets license plate number series
License Plate Creation:
- Created during put-away process
- Links to bin, lot, and expiration
- Barcode label printed
License Plate Usage:
- Picking by license plate
- Inventory moves by license plate
- Cycle counting by license plate
Code Reference: TSNLicensePlateTemplate.TableExt.al
Advanced WMS Features
Supported by Integration:
- Directed Put-Away: System-directed bin assignments
- Directed Picking: Optimized pick paths
- Bin Ranking: Prioritized bin selection
- Wave Picking: Batch pick multiple orders
- Cross-Docking: Direct receipt to shipment
- 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:
- Item No. & Description
- Variant Code
- Location Code
- Bin Code
- Lot No.
- Vendor No. & Name
- Expiration Date
- Quantity
- Reserved Quantity
- Available Quantity
Filters:
- Filter by item, location, bin, lot, vendor
- Filter by expiration date range
- Show only available inventory
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)
- Receipt documentation with barcodes
- Lot/expiration tracking
- Printed during receiving
2. Warehouse Shipment BOL (50001)
- Pre-posting Bill of Lading
- Weight and pallet details
- Carrier information
3. Posted Warehouse Shipment BOL (50002)
- Final Bill of Lading
- Posted shipment details
- Archive/audit copy
4. Output Label (50003)
- Production output labels
- Lot and item barcodes
- Date/time stamps
Best Practices
1. Shelf Life Management
- Configure Customer Requirements: Set shelf life days on customer cards
- Monitor Expiration: Use Inventory Expiry Analysis report (50010)
- Review Near-Expiry: Regular review of lots approaching expiration
- FEFO Compliance: Let system select lots automatically
2. Lot Tracking
- Alternate Lot Numbers: Always enter vendor lot numbers on PO
- Country of Origin: Critical for food compliance - enter on PO
- Expiration Dates: Verify/enter during receiving
- Lot Traceability: Use lot tracking reports for recalls
3. Bill of Lading
- BOL Number Series: Configure in Warehouse Setup before go-live
- Seal Numbers: Always enter seal number before posting
- Trailer Reference: Enter for freight tracking
- Document Retention: Print and file BOL for audit trail
4. Warehouse Insight
- License Plate Templates: Configure before using WMS features
- Barcode Scanning: Use RF scanners for accuracy
- Bin Setup: Proper bin ranking for optimal picks
- Cycle Counting: Regular cycle counts by license plate
5. EDI Integration
- Field Validation: Ensure all TRC fields populate before posting
- ASN Transmission: Verify ASN sent successfully
- Customer Setup: Confirm customer EDI requirements
- Error Monitoring: Monitor EDI errors and resolve promptly
Troubleshooting
Issue: BOL Number Not Generated
Cause: Number series not configured in Warehouse Setup
Solution:
- Open Warehouse Setup
- Set “BOL Number Series” field
- 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:
- Verify customer shelf life requirement on customer card
- Check lot expiration dates in inventory
- Review shelf life calculation: (Expiration Date - Ship Date) >= Requirement
- Receive newer inventory or adjust customer requirement
Issue: Lot Not Suggested for Picking
Possible Causes:
- Lot fails shelf life validation
- Lot not in pickable bin
- Bin excluded from planning
- Quantity already reserved
Solution:
- Check lot expiration vs. customer shelf life requirement
- Verify bin is pick-enabled
- Check bin “Exclude from Planning” flag
- Review reservation entries
Issue: EDI Fields Not Syncing
Cause: Event subscriber not firing or field mapping issue
Solution:
- Verify TSN Event Subscriber codeunit is published
- Check field mappings in event subscriber code
- Test by manually entering Seal No., verify TRCUDF3 populates
- Review event subscriber log (if logging enabled)
Summary
The warehouse management system provides:
- Bill of Lading Management: Automated numbering and tracking
- Lot Tracking: Comprehensive lot/expiration tracking with FEFO
- Shelf Life Validation: Ensures customer requirements met
- WMS Integration: Warehouse Insight for advanced operations
- EDI Integration: Automatic shipment data synchronization
- Real-Time Visibility: Warehouse overview for inventory analysis
- Compliance: Food safety and traceability requirements
See Also: