StateSet One Guides
Warehouse Quickstart
Getting started with the Stateset Warehouse Management API
Warehouse Management Quickstart Guide
Table of Contents
- Introduction
- Core Concepts
- Setting Up Your Environment
- Advanced API Usage
- Warehouse Optimization Strategies
- Error Handling and Logging
- Real-time Warehouse Monitoring
- Integration with Other Systems
- Performance Optimization
- Security Best Practices
- Troubleshooting and Maintenance
Introduction
Stateset One provides a powerful REST and GraphQL API for advanced Warehouse Management. This guide will dive deep into the intricacies of the Warehouse Management module, exploring advanced features and best practices for efficient warehouse operations.
Key Objects in the Warehouse Management Module:
- Inventory Items
- Storage Locations
- Receiving Orders
- Pick Orders
- Packing Lists
- Shipments
- Return Orders
Core Concepts
Before we dive into the implementation, let’s review some core concepts and challenges in warehouse management:
Warehouse Management Processes:
- Inventory Management
- Warehouse Layout and Slotting
- Receiving
- Picking
- Packing
- Shipping
- Returns Processing
Common Challenges:
- Inventory accuracy
- Space utilization
- Order fulfillment speed
- Labor efficiency
- Stock balancing
- Seasonal demand fluctuations
- Returns processing
Stateset’s Solutions:
- Real-time inventory tracking
- Dynamic slotting algorithms
- Optimized pick paths
- Batch and wave picking support
- Automated receiving and putaway
- Returns processing workflow
- Analytics and reporting
Setting Up Your Environment
-
Sign up for Stateset One at stateset.io/signup
-
Generate an API Key in the Stateset Cloud Console
-
Install the Stateset Node.js SDK:
npm install stateset-node
- Set up environment variables:
export STATESET_API_KEY=your_api_key_here
- Initialize the Stateset client:
import { stateset } from 'stateset-node';
const client = new stateset(process.env.STATESET_API_KEY);
Advanced API Usage
Inventory Management
// Create a new Inventory Item
const newItem = await client.inventoryItems.create({
sku: 'WIDGET-001',
name: 'Premium Widget',
description: 'High-quality widget for various applications',
category: 'Widgets',
unit_of_measure: 'EA',
weight: 0.5,
dimensions: { length: 10, width: 5, height: 2 }
});
// Update Inventory Item quantity
const updatedItem = await client.inventoryItems.updateQuantity(newItem.id, {
quantity: 100,
location_id: 'loc_A1'
});
// Get Inventory Item details
const itemDetails = await client.inventoryItems.get(newItem.id);
// List Inventory Items with filtering
const inventoryList = await client.inventoryItems.list({
category: 'Widgets',
in_stock: true
});
// Perform cycle count
const cycleCount = await client.inventoryItems.cycleCount({
location_id: 'loc_A1',
items: [
{ id: newItem.id, counted_quantity: 98 }
]
});
Warehouse Layout and Slotting
// Create a new Storage Location
const newLocation = await client.storageLocations.create({
name: 'A1-01',
type: 'SHELF',
zone: 'PICKING',
capacity: { units: 100, weight: 50 }
});
// Update Storage Location
const updatedLocation = await client.storageLocations.update(newLocation.id, {
status: 'ACTIVE'
});
// Get Storage Location details
const locationDetails = await client.storageLocations.get(newLocation.id);
// List Storage Locations
const locationsList = await client.storageLocations.list({
zone: 'PICKING',
status: 'ACTIVE'
});
// Optimize slotting
const slottingPlan = await client.warehouse.optimizeSlotting({
optimization_criteria: ['pick_frequency', 'item_affinity']
});
Receiving Process
// Create a Receiving Order
const receivingOrder = await client.receivingOrders.create({
supplier_id: 'sup_123',
expected_delivery_date: '2024-10-01',
items: [
{ sku: 'WIDGET-001', expected_quantity: 500 }
]
});
// Update Receiving Order status
const updatedReceivingOrder = await client.receivingOrders.update(receivingOrder.id, {
status: 'IN_PROGRESS'
});
// Record received items
const receivedItems = await client.receivingOrders.recordReceivedItems(receivingOrder.id, {
items: [
{ sku: 'WIDGET-001', received_quantity: 498, location_id: 'loc_A1' }
]
});
// Complete Receiving Order
const completedReceivingOrder = await client.receivingOrders.complete(receivingOrder.id);
Pick, Pack, and Ship Processes
// Create a Pick Order
const pickOrder = await client.pickOrders.create({
order_id: 'ord_456',
items: [
{ sku: 'WIDGET-001', quantity: 5 }
]
});
// Optimize pick path
const optimizedPickPath = await client.warehouse.optimizePickPath(pickOrder.id);
// Record picked items
const pickedItems = await client.pickOrders.recordPickedItems(pickOrder.id, {
items: [
{ sku: 'WIDGET-001', picked_quantity: 5, location_id: 'loc_A1' }
]
});
// Create a Packing List
const packingList = await client.packingLists.create({
pick_order_id: pickOrder.id,
items: pickedItems
});
// Create a Shipment
const shipment = await client.shipments.create({
packing_list_id: packingList.id,
carrier: 'UPS',
service_level: 'GROUND',
tracking_number: '1Z999AA1234567890'
});
Warehouse Optimization Strategies
- Implement ABC Analysis for Inventory: Categorize inventory items based on their value and pick frequency to optimize storage locations.
async function performABCAnalysis() {
const items = await client.inventoryItems.list({ limit: 1000 });
const totalValue = items.reduce((sum, item) => sum + item.value * item.quantity, 0);
const totalPicks = items.reduce((sum, item) => sum + item.pick_frequency, 0);
const categorizedItems = items.map(item => ({
...item,
value_score: (item.value * item.quantity) / totalValue,
pick_score: item.pick_frequency / totalPicks
})).sort((a, b) => b.value_score + b.pick_score - (a.value_score + a.pick_score));
let cumulativeScore = 0;
const abcCategories = categorizedItems.map(item => {
cumulativeScore += item.value_score + item.pick_score;
if (cumulativeScore <= 0.8) return { ...item, category: 'A' };
if (cumulativeScore <= 0.95) return { ...item, category: 'B' };
return { ...item, category: 'C' };
});
// Update items with their ABC category
for (const item of abcCategories) {
await client.inventoryItems.update(item.id, { abc_category: item.category });
}
return abcCategories;
}
- Implement Cross-Docking for Fast-Moving Items: Minimize storage time for high-demand items by moving them directly from receiving to shipping.
async function setupCrossDocking(receivingOrderId) {
const receivingOrder = await client.receivingOrders.get(receivingOrderId);
const crossDockItems = receivingOrder.items.filter(item => item.cross_dock_eligible);
if (crossDockItems.length > 0) {
const crossDockOrder = await client.crossDockOrders.create({
receiving_order_id: receivingOrderId,
items: crossDockItems
});
// Assign cross-dock items to pending shipments
await assignCrossDockItemsToShipments(crossDockOrder);
}
}
async function assignCrossDockItemsToShipments(crossDockOrder) {
const pendingShipments = await client.shipments.list({ status: 'PENDING' });
for (const item of crossDockOrder.items) {
const matchingShipment = pendingShipments.find(shipment =>
shipment.items.some(shipmentItem => shipmentItem.sku === item.sku)
);
if (matchingShipment) {
await client.shipments.update(matchingShipment.id, {
items: matchingShipment.items.map(shipmentItem =>
shipmentItem.sku === item.sku
? { ...shipmentItem, cross_dock: true, location_id: crossDockOrder.id }
: shipmentItem
)
});
}
}
}
- Implement Wave Picking: Group multiple orders into waves for more efficient picking.
async function createPickingWave() {
const pendingOrders = await client.orders.list({ status: 'PENDING', limit: 50 });
const wave = await client.pickingWaves.create({
orders: pendingOrders.map(order => order.id)
});
const optimizedPickPath = await client.warehouse.optimizePickPath(wave.id);
return { wave, optimizedPickPath };
}
async function processPickingWave(waveId) {
const wave = await client.pickingWaves.get(waveId);
for (const orderId of wave.orders) {
const pickedItems = await pickOrderItems(orderId);
await createPackingList(orderId, pickedItems);
}
await client.pickingWaves.complete(waveId);
}