# Ecommerce Fulfillment

> When the user wants to optimize e-commerce fulfillment, online order processing, or direct-to-consumer logistics. Also use when the user mentions "e-commerce fulfillment," "online orders," "DTC fulfillment," "pick-pack-ship," "3PL," "fulfillment center," "order accuracy," "shipping optimization," or "returns processing." For omnichannel (stores + online), see omnichannel-fulfillment. For last-mil…

- **Type:** Skill
- **Install:** `agentstack add skill-kishorkukreja-awesome-supply-chain-ecommerce-fulfillment`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [kishorkukreja](https://agentstack.voostack.com/s/kishorkukreja)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [kishorkukreja](https://github.com/kishorkukreja)
- **Source:** https://github.com/kishorkukreja/awesome-supply-chain/tree/main/skills/ecommerce-fulfillment

## Install

```sh
agentstack add skill-kishorkukreja-awesome-supply-chain-ecommerce-fulfillment
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# E-Commerce Fulfillment

You are an expert in e-commerce fulfillment operations and direct-to-consumer logistics. Your goal is to help online retailers optimize order processing, warehouse operations, shipping strategies, and returns management to deliver fast, accurate, cost-effective fulfillment while maximizing customer satisfaction.

## Initial Assessment

Before optimizing e-commerce fulfillment, understand:

1. **Business Model & Scale**
   - Order volume? (orders per day, peak vs. average)
   - Average order value (AOV)?
   - SKU count and product types?
   - B2C, B2B, or both?
   - Growth trajectory? (scaling challenges)

2. **Fulfillment Operations**
   - Fulfillment model? (in-house, 3PL, hybrid)
   - Number of fulfillment centers? Locations?
   - Warehouse size and capacity?
   - Technology? (WMS, OMS, automation level)
   - Current order accuracy rate?

3. **Shipping & Delivery**
   - Shipping carriers used? (USPS, UPS, FedEx, regional)
   - Delivery promises? (2-day, 3-5 day, standard)
   - Free shipping threshold?
   - International shipping?
   - Average shipping cost per order?

4. **Current Performance**
   - Order fulfillment cycle time? (order to ship)
   - On-time shipment rate?
   - Order accuracy? (correct items, no damages)
   - Return rate? (% of orders)
   - Fulfillment cost per order?

---

## E-Commerce Fulfillment Framework

### Fulfillment Models

**1. In-House Fulfillment**
- Own warehouse and operations
- Full control over process and quality
- Higher fixed costs, requires expertise
- Best for: Large volumes, specialized products

**2. Third-Party Logistics (3PL)**
- Outsource to fulfillment provider
- Variable costs, scalability
- Less control, shared resources
- Best for: Growing businesses, seasonal peaks

**3. Dropshipping**
- Supplier ships directly
- No inventory investment
- Longer delivery times, less control
- Best for: Marketplaces, extended assortment

**4. Hybrid Model**
- Combination of in-house + 3PL
- Fast movers in-house, long tail via 3PL
- Balance control and flexibility
- Best for: Mature businesses, diverse catalog

**5. Fulfillment by Amazon (FBA) / Marketplace**
- Leverage platform's fulfillment network
- Access to Prime customers
- Fees and restrictions
- Best for: Sellers on marketplaces

---

## Order Processing Optimization

### Order Management Workflow

```python
import numpy as np
import pandas as pd
from datetime import datetime, timedelta
from typing import List, Dict

class OrderProcessingEngine:
    """
    Optimize order processing workflow

    From order receipt to shipment handoff
    """

    def __init__(self, warehouse_config):
        """
        Parameters:
        - warehouse_config: Warehouse capacity and operational parameters
        """
        self.warehouse = warehouse_config
        self.order_statuses = {}

    def prioritize_orders(self, orders_df):
        """
        Prioritize order processing

        Factors:
        - Shipping method (expedited first)
        - Order time (FIFO generally)
        - Customer tier (VIP, repeat, new)
        - Geographic zone (consolidate picking)
        """

        orders_df = orders_df.copy()

        # Calculate priority score
        def calculate_priority(row):
            score = 0

            # Shipping method priority
            shipping_priority = {
                'overnight': 100,
                'two_day': 80,
                'three_day': 60,
                'standard': 40,
                'economy': 20
            }
            score += shipping_priority.get(row['shipping_method'], 40)

            # Order age (older = higher priority)
            hours_since_order = (
                datetime.now() - pd.to_datetime(row['order_time'])
            ).total_seconds() / 3600
            score += min(hours_since_order * 2, 50)  # Cap at 50

            # Customer tier
            customer_priority = {
                'vip': 30,
                'repeat': 15,
                'new': 0
            }
            score += customer_priority.get(row.get('customer_tier', 'new'), 0)

            # Order value (higher value = slight priority boost)
            if row['order_value'] > 200:
                score += 10
            elif row['order_value'] > 100:
                score += 5

            # At-risk SLA (cut-off time approaching)
            cutoff_time = pd.to_datetime(row['order_date'].date()) + timedelta(hours=14)
            minutes_to_cutoff = (cutoff_time - datetime.now()).total_seconds() / 60

            if minutes_to_cutoff  0:
                score += 40  # Urgent - approaching cutoff

            return score

        orders_df['priority_score'] = orders_df.apply(calculate_priority, axis=1)

        # Sort by priority
        orders_df = orders_df.sort_values('priority_score', ascending=False)

        return orders_df

    def batch_orders_for_picking(self, orders_df, batch_size=20):
        """
        Batch orders for efficient picking

        Group orders that can be picked together
        """

        # Simple zone-based batching
        # (In practice, would use sophisticated wave planning)

        orders_df = self.prioritize_orders(orders_df)

        batches = []
        current_batch = []

        for idx, order in orders_df.iterrows():
            current_batch.append(order['order_id'])

            if len(current_batch) >= batch_size:
                batches.append({
                    'batch_id': len(batches) + 1,
                    'order_ids': current_batch.copy(),
                    'order_count': len(current_batch),
                    'estimated_pick_time': len(current_batch) * 3  # 3 min per order
                })
                current_batch = []

        # Add remaining orders
        if current_batch:
            batches.append({
                'batch_id': len(batches) + 1,
                'order_ids': current_batch,
                'order_count': len(current_batch),
                'estimated_pick_time': len(current_batch) * 3
            })

        return pd.DataFrame(batches)

    def calculate_order_cycle_time(self, order_volume_per_hour,
                                   picker_count=10):
        """
        Calculate expected order cycle time

        From order receipt to ready-to-ship
        """

        # Processing steps and times (minutes)
        steps = {
            'order_validation': 1,
            'inventory_allocation': 0.5,
            'picking': 8,  # Varies by order size
            'packing': 5,
            'labeling': 2,
            'quality_check': 2,
            'staging': 1
        }

        total_processing_time = sum(steps.values())

        # Capacity
        orders_per_picker_per_hour = 60 / total_processing_time
        total_capacity = orders_per_picker_per_hour * picker_count

        # Queue time (if volume exceeds capacity)
        if order_volume_per_hour > total_capacity:
            queue_time = (order_volume_per_hour - total_capacity) / total_capacity * 60
        else:
            queue_time = 0

        total_cycle_time = total_processing_time + queue_time

        return {
            'processing_time_minutes': total_processing_time,
            'queue_time_minutes': queue_time,
            'total_cycle_time_minutes': total_cycle_time,
            'hourly_capacity': total_capacity,
            'utilization': min(order_volume_per_hour / total_capacity, 1.0) * 100
        }

    def calculate_cutoff_times(self, carrier_pickup_times):
        """
        Calculate order cutoff times for same-day shipping

        Work backwards from carrier pickup
        """

        cutoffs = []

        for carrier, pickup_time in carrier_pickup_times.items():
            # Work backwards
            pickup = datetime.strptime(pickup_time, '%H:%M')

            # Need 30 min buffer before pickup
            ready_by = pickup - timedelta(minutes=30)

            # Average processing time: 45 minutes
            processing_time = 45

            cutoff = ready_by - timedelta(minutes=processing_time)

            cutoffs.append({
                'carrier': carrier,
                'pickup_time': pickup_time,
                'order_cutoff': cutoff.strftime('%H:%M'),
                'processing_buffer': processing_time
            })

        return pd.DataFrame(cutoffs)

# Example usage
orders_data = pd.DataFrame({
    'order_id': [f'ORD{i:05d}' for i in range(1, 51)],
    'order_time': pd.date_range('2024-03-15 08:00', periods=50, freq='15min'),
    'order_date': pd.Timestamp('2024-03-15'),
    'shipping_method': np.random.choice(
        ['standard', 'two_day', 'three_day', 'overnight'],
        50,
        p=[0.5, 0.3, 0.15, 0.05]
    ),
    'order_value': np.random.uniform(30, 250, 50),
    'customer_tier': np.random.choice(['new', 'repeat', 'vip'], 50, p=[0.3, 0.6, 0.1])
})

processor = OrderProcessingEngine({})

# Prioritize orders
prioritized = processor.prioritize_orders(orders_data)
print("Top 5 Priority Orders:")
print(prioritized.head()[['order_id', 'shipping_method', 'priority_score']])

# Batch orders
batches = processor.batch_orders_for_picking(orders_data, batch_size=20)
print(f"\nCreated {len(batches)} picking batches")
print(batches)

# Calculate cycle time
cycle_time = processor.calculate_order_cycle_time(
    order_volume_per_hour=100,
    picker_count=15
)
print(f"\nOrder cycle time: {cycle_time['total_cycle_time_minutes']:.1f} minutes")
print(f"Capacity utilization: {cycle_time['utilization']:.1f}%")
```

---

## Warehouse Operations Optimization

### Pick-Pack-Ship Efficiency

```python
class WarehouseEfficiencyOptimizer:
    """
    Optimize warehouse picking, packing, and shipping operations
    """

    def __init__(self, warehouse_layout, sku_velocity_data):
        """
        Parameters:
        - warehouse_layout: Warehouse zones and locations
        - sku_velocity_data: SKU sales velocity (for slotting)
        """
        self.layout = warehouse_layout
        self.velocity = sku_velocity_data

    def optimize_slotting(self, strategy='velocity_based'):
        """
        Optimize SKU slotting in warehouse

        Place fast movers in prime locations (near packing stations)
        """

        # Classify SKUs by velocity
        self.velocity['velocity_class'] = pd.qcut(
            self.velocity['daily_units'],
            q=3,
            labels=['Slow', 'Medium', 'Fast']
        )

        # Assign zones
        def assign_zone(velocity_class):
            if velocity_class == 'Fast':
                return 'Zone_A_Front'  # Closest to packing
            elif velocity_class == 'Medium':
                return 'Zone_B_Middle'
            else:
                return 'Zone_C_Back'

        self.velocity['recommended_zone'] = self.velocity['velocity_class'].apply(assign_zone)

        # Calculate expected savings
        current_avg_pick_distance = 150  # feet
        optimized_avg_pick_distance = 95  # feet
        picks_per_day = self.velocity['daily_units'].sum()

        distance_saved = (current_avg_pick_distance - optimized_avg_pick_distance) * picks_per_day
        time_saved_minutes = distance_saved / 200  # 200 ft/min walk speed
        labor_cost_saved = time_saved_minutes / 60 * 18  # $18/hour

        return {
            'sku_assignments': self.velocity[['sku', 'velocity_class', 'recommended_zone']],
            'distance_saved_feet': distance_saved,
            'time_saved_minutes': time_saved_minutes,
            'daily_labor_cost_saved': labor_cost_saved
        }

    def calculate_picking_method_efficiency(self):
        """
        Compare picking methods

        - Discrete picking (one order at a time)
        - Batch picking (multiple orders)
        - Zone picking (pickers assigned to zones)
        - Wave picking (batches at scheduled times)
        """

        methods = []

        # Discrete picking
        discrete_picks_per_hour = 35
        discrete_accuracy = 0.98
        methods.append({
            'method': 'Discrete (single-order)',
            'picks_per_hour': discrete_picks_per_hour,
            'accuracy': discrete_accuracy,
            'complexity': 'Low',
            'best_for': 'Low volume, simple orders'
        })

        # Batch picking
        batch_picks_per_hour = 80
        batch_accuracy = 0.95
        methods.append({
            'method': 'Batch picking',
            'picks_per_hour': batch_picks_per_hour,
            'accuracy': batch_accuracy,
            'complexity': 'Medium',
            'best_for': 'Medium-high volume'
        })

        # Zone picking
        zone_picks_per_hour = 75
        zone_accuracy = 0.96
        methods.append({
            'method': 'Zone picking',
            'picks_per_hour': zone_picks_per_hour,
            'accuracy': zone_accuracy,
            'complexity': 'Medium',
            'best_for': 'Large warehouses, high SKU count'
        })

        # Wave picking
        wave_picks_per_hour = 90
        wave_accuracy = 0.95
        methods.append({
            'method': 'Wave picking',
            'picks_per_hour': wave_picks_per_hour,
            'accuracy': wave_accuracy,
            'complexity': 'High',
            'best_for': 'Very high volume, scheduled waves'
        })

        return pd.DataFrame(methods)

    def recommend_automation_opportunities(self, order_volume_per_day,
                                          avg_order_lines=3):
        """
        Recommend warehouse automation based on volume

        - Put walls / Light-directed picking
        - Automated storage and retrieval (AS/RS)
        - Robotic picking
        - Automated packing
        - Conveyor systems
        """

        recommendations = []

        total_picks_per_day = order_volume_per_day * avg_order_lines

        # Put wall / Light-directed picking
        if order_volume_per_day > 500:
            recommendations.append({
                'technology': 'Put wall / Light-directed picking',
                'investment': '$50K - $150K',
                'expected_benefit': '40% picking efficiency gain',
                'payback_months': 12,
                'priority': 'High' if order_volume_per_day > 2000 else 'Medium'
            })

        # Conveyor system
        if order_volume_per_day > 1000:
            recommendations.append({
                'technology': 'Conveyor system',
                'investment': '$200K - $500K',
                'expected_benefit': '30% labor reduction in movement',
                'payback_months': 18,
                'priority': 'High' if order_volume_per_day > 3000 else 'Medium'
            })

        # Goods-to-person (AS/RS)
        if order_volume_per_day > 3000:
            recommendations.append({
                'technology': 'Goods-to-person (AS/RS)',
                'investment': '$1M - $3M',
                'expected_benefit': '3x picking productivity',
                'payback_months': 24,
                'priority': 'High'
            })

        # Automated packing
        if order_volume_per_day > 2000:
            recommendations.append({
                'technology': 'Automated packing stations',
                'investment': '$150K - $400K',
                'expected_benefit': '50% packing labor reduction',
                'payback_months': 15,
                'priority': 'High' if order_volume_per_day > 5000 else 'Medium'
            })

        if not recommendations:
            recommendations.append({
                'technology': 'Manual operations sufficient',
                'investment': 'N/A',
                'expected_benefit': 'Focus on process optimization',
                'payback_months': 0,
                'priority': 'N/A'
            })

        return pd.DataFrame(recommendations)

# Example
sku_velocity = pd.DataFrame({
    'sku': [f'SKU{i:04d}' for i in range(1, 201)],
    'daily_units': np.random.lognormal(3, 1.5, 200)
})

warehouse_layout = {}  # Simplified

optimizer = WarehouseEfficiencyOptimizer(warehouse_layou

…

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [kishorkukreja](https://github.com/kishorkukreja)
- **Source:** [kishorkukreja/awesome-supply-chain](https://github.com/kishorkukreja/awesome-supply-chain)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-kishorkukreja-awesome-supply-chain-ecommerce-fulfillment
- Seller: https://agentstack.voostack.com/s/kishorkukreja
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
