Skip to main content

Stock Import Profile

The Stock Import Profile synchronizes inventory levels from PlentyONE to Magento, updating stock quantities across single or multiple sources with full Multi-Source Inventory (MSI) support.

Overview

Profile Type ID: plenty_stock_import Direction: PlentyONE → Magento Purpose: Import real-time stock quantities from PlentyONE warehouses to Magento inventory

What Gets Imported

  • Stock Quantities: Available inventory levels
  • Stock Status: In Stock / Out of Stock
  • Warehouse Stock: Multi-warehouse inventory (MSI)
  • Reserved Quantities: Stock reservations
  • Backorder Settings: Backorder availability

Why Stock Import is Critical

  • Real-Time Inventory: Prevent overselling with accurate stock levels
  • Multi-Warehouse: Support complex warehouse structures
  • Stock Synchronization: Keep Magento in sync with PlentyONE master inventory
  • Automated Updates: Frequent updates without manual intervention
MSI Support

This profile fully supports Magento's Multi-Source Inventory (MSI). You can map multiple PlentyONE warehouses to different Magento stock sources.

Stock Configuration

Inventory Source Mapping

Field: source_mapping Type: Dynamic Rows Scope: Global

Map PlentyONE warehouses to Magento inventory sources.

Fields per Row:

  • PlentyONE Warehouse ID: Source warehouse in PlentyONE
  • Magento Source Code: Target inventory source in Magento
  • Priority: Source priority for stock allocation

Single Source Example (Legacy Inventory):

PlentyONE WarehouseMagento SourcePriority
0 (Main Warehouse)default1

Multi-Source Example (MSI):

PlentyONE WarehouseMagento SourcePriority
101 (Main Warehouse)main_warehouse1
102 (East Coast DC)east_dc2
103 (West Coast DC)west_dc3
104 (EU Warehouse)eu_warehouse4

Stock Calculation Mode

Field: stock_calculation_mode Type: Select Scope: Global

How to calculate available stock from PlentyONE.

Options:

ModeCalculationUse Case
Physical StockActual warehouse quantityStandard inventory
Available StockPhysical - Reserved - ShippedReal available qty
Virtual StockPhysical + Incoming - ReservedInclude incoming stock
Net StockPhysical - ReservedConservative approach

Recommended: Available Stock (prevents overselling)

Calculation Examples:

Physical Stock: 100
Reserved: 20
Incoming: 30
Shipped: 5

Physical Stock Mode: 100
Available Stock Mode: 100 - 20 - 5 = 75
Virtual Stock Mode: 100 + 30 - 20 = 110
Net Stock Mode: 100 - 20 = 80

Stock Status Management

Out of Stock Threshold

Field: out_of_stock_threshold Type: Number Default: 0 Scope: Global

Quantity below which product is marked "Out of Stock".

Examples:

  • 0 - Out of stock when qty = 0
  • 5 - Out of stock when qty < 5 (safety buffer)
  • 10 - Out of stock when qty < 10 (larger buffer)

Use Cases:

  • Standard: 0 (out of stock at zero)
  • Safety Buffer: 5-10 (prevent last-minute overselling)
  • Reserved Stock: 20+ (keep buffer for wholesale orders)

Manage Stock Status

Field: manage_stock_status Type: Checkbox Default: Yes

Automatically update "In Stock" / "Out of Stock" status.

Behavior:

  • Enabled: Auto-update stock status based on quantity
  • Disabled: Keep existing stock status

Backorder Configuration

Field: allow_backorders Type: Select Scope: Global

Configure backorder settings for products.

Options:

  • No Backorders - Don't allow backorders (default)
  • Allow Qty Below 0 - Allow backorders, show as "In Stock"
  • Allow Qty Below 0 and Notify - Allow backorders, show as "Out of Stock"

When to Allow Backorders:

  • ✅ Products with reliable restocking
  • ✅ Pre-order functionality
  • ✅ Made-to-order products
  • ❌ Fast-moving consumer goods
  • ❌ Seasonal/limited items

MSI (Multi-Source Inventory) Configuration

Enable MSI Mode

Field: enable_msi Type: Checkbox Default: Auto-detect Scope: Global

Enable Multi-Source Inventory support.

Auto-Detection: Automatically enabled if Magento MSI is active

Source Assignment

Field: source_assignment_mode Type: Select

How to assign stock to sources.

Options:

ModeBehaviorUse Case
Direct MappingOne warehouse → one sourceSimple 1:1 mapping
Split StockDistribute across sourcesLoad balancing
Priority BasedFill sources by priorityPreferred warehouse first
RegionalMap by region/localeGeographic distribution

Default Source

Field: default_source_code Type: Select Default: default

Fallback source when warehouse not mapped.

When Used:

  • Product stock from unmapped warehouse
  • New products without source assignment
  • Fallback for configuration errors

Source Priority

Control source selection priority for stock allocation.

Configuration:

Priority 1 (Highest): Main Warehouse
Priority 2: Regional DC
Priority 3: Drop Ship Supplier
Priority 4 (Lowest): Overflow Warehouse

Stock Allocation Logic:

  1. Check Priority 1 source for availability
  2. If insufficient, check Priority 2
  3. Continue until order fulfilled or out of stock

Product Stock Settings

Update Mode

Field: stock_update_mode Type: Select

How to update stock quantities.

Options:

  • Replace - Replace existing quantity (default)
  • Increment - Add to existing quantity
  • Decrement - Subtract from existing quantity
  • Sync - Intelligent sync (recommended)

Recommended: Replace for master stock sync

Product Identifier

Field: product_identifier Type: Select

How to identify products for stock update.

Options:

  • SKU - Match by SKU (recommended)
  • PlentyONE Item ID - Match by item ID
  • Variation Number - Match by variation number

Handle Missing Products

Field: missing_product_action Type: Select

Action when product not found in Magento.

Options:

  • Skip - Skip this product (safest)
  • Log Warning - Skip and log warning
  • Create Product - Create simple product
  • Fail Import - Stop entire import

Recommended: Log Warning for production

Stock Synchronization Strategy

Update Frequency

Schedule Recommendations:

FrequencyUse CaseRisk Level
Every 5 minutesHigh-traffic storesLow overselling risk
Every 15 minutesStandard storesBalanced
Every 30 minutesLow-traffic storesHigher risk
HourlyVery low volumeHighest risk

Real-Time Critical:

  • Limited stock items
  • Flash sales
  • High-demand products

Less Frequent OK:

  • High stock levels
  • Slow-moving inventory
  • B2B with large stock

Batch Processing

Field: process_batch_size Default: 100 Scope: Global

Number of products to process per batch.

Optimization:

  • Large Catalog (10,000+ SKUs): 500-1000
  • Medium Catalog (1,000-10,000 SKUs): 100-500
  • Small Catalog (< 1,000 SKUs): 50-100

Performance Considerations:

  • Larger batches = faster but more memory
  • Smaller batches = slower but more stable
  • Adjust based on server resources

Advanced Features

Stock Reservations

Field: handle_reservations Type: Checkbox Default: No

Process PlentyONE stock reservations in Magento.

How It Works:

  • PlentyONE marks stock as reserved
  • Stock import reduces Magento available qty
  • Prevents overselling reserved stock

When to Enable:

  • ✅ Multi-channel selling (eBay, Amazon via PlentyONE)
  • ✅ B2B with reservation system
  • ✅ Pre-order management

Bundle Product Stock

Field: bundle_stock_calculation Type: Select

How to calculate stock for bundle products.

Options:

  • Sum of Children - Sum child stock (default)
  • Minimum Child - Lowest child stock
  • Independent - Bundle has its own stock

Example - Minimum Child:

Bundle: Gift Set
- Item A: Qty 100
- Item B: Qty 50
- Item C: Qty 200

Bundle Stock: 50 (minimum)
Can create 50 gift sets

Configurable Product Stock

Field: configurable_stock_calculation Type: Select

How to calculate stock for configurable products.

Options:

  • Sum of Variants - Total all children
  • Automatic - Magento calculates from children
  • Independent - Parent has own stock

Recommended: Automatic (Magento manages)

CLI Commands

# Full stock import
bin/magento softcommerce:plenty:stock:import --profile-id=9

# Import for specific products
bin/magento softcommerce:plenty:stock:import --profile-id=9 --skus=SKU1,SKU2,SKU3

# Import for specific warehouse
bin/magento softcommerce:plenty:stock:import --profile-id=9 --warehouse-id=101

# Force full refresh
bin/magento softcommerce:plenty:stock:import --profile-id=9 --force

# Import specific source
bin/magento softcommerce:plenty:stock:import --profile-id=9 --source=main_warehouse

# Dry run (test without updating)
bin/magento softcommerce:plenty:stock:import --profile-id=9 --dry-run

Troubleshooting

Stock Not Updating

Solutions:

  1. Check Product Identifier: Verify SKU matching
  2. Review Source Mapping: Ensure warehouses are mapped
  3. Check MSI Settings: Verify MSI is enabled if using multi-source
  4. Verify Stock Calculation: Review calculation mode setting
  5. Check Logs: Review var/log/softcommerce/plenty/stock.log

Wrong Stock Quantities

Solutions:

  1. Verify Calculation Mode: Check if using correct mode
  2. Check Reservations: Verify reservation handling
  3. Review Threshold: Check out-of-stock threshold
  4. Compare PlentyONE: Verify source data is correct

Products Show Out of Stock

Solutions:

  1. Check Stock Status Management: Ensure it's enabled
  2. Review Threshold: Verify out-of-stock threshold
  3. Check Source Priority: Verify stock allocated to correct source
  4. Verify Backorders: Check backorder settings

MSI Stock Not Distributing

Solutions:

  1. Enable MSI: Verify MSI mode is enabled
  2. Check Source Mapping: Ensure all warehouses mapped
  3. Review Source Assignment: Verify assignment mode
  4. Check Source Priority: Verify priority configuration

Best Practices

Initial Setup

  1. Import Products First: Ensure all products exist
  2. Configure MSI Sources: Set up all stock sources in Magento
  3. Map Warehouses: Create complete warehouse → source mapping
  4. Choose Calculation Mode: Select appropriate stock calculation
  5. Set Threshold: Configure out-of-stock threshold
  6. Test with Sample: Import stock for 10-20 products first

Production Operations

  1. Frequent Updates: Run every 5-15 minutes
  2. Monitor for Errors: Check logs regularly
  3. Verify Accuracy: Spot-check stock levels
  4. Adjust Batch Size: Optimize based on performance
  5. Handle Reservations: Enable if using multi-channel

Multi-Warehouse Strategy

  1. Priority Order: Assign logical priorities (main warehouse first)
  2. Regional Mapping: Map warehouses to regional sources
  3. Test Distribution: Verify stock distributes correctly
  4. Monitor Allocation: Check MSI algorithm performance

Performance Optimization

  1. Batch Size: Larger batches for faster imports
  2. Selective Updates: Only update changed products
  3. Schedule Wisely: Run during low-traffic periods for large updates
  4. Database Indexing: Ensure stock indexes are optimized

Overselling Prevention

  1. Conservative Calculation: Use "Available Stock" mode
  2. Safety Buffer: Set out-of-stock threshold > 0
  3. Frequent Updates: Import stock every 5-15 minutes
  4. Handle Reservations: Enable reservation handling
  5. Monitor Closely: Watch for overselling incidents

MSI Best Practices

Source Configuration

  1. Name Logically: Use clear source names (main_warehouse, east_dc)
  2. Set Priorities: Highest priority for main/preferred sources
  3. Regional Sources: Create sources per region for shipping optimization
  4. Backup Sources: Include overflow/backup sources

Stock Distribution

  1. Algorithm Choice: Use Magento's distance-based algorithm for regional
  2. Priority Algorithm: Use priority for preferred warehouses
  3. Test Allocation: Verify stock allocates as expected
  4. Monitor: Track which sources fulfill orders

Warehouse Strategy

Example: E-commerce with 3 Warehouses

PlentyONE:
- Warehouse 101: Main DC (CA)
- Warehouse 102: East DC (NY)
- Warehouse 103: EU Warehouse (DE)

Magento MSI:
- main_dc (Priority 1)
- east_dc (Priority 2)
- eu_warehouse (Priority 3)

Mapping:
101 → main_dc
102 → east_dc
103 → eu_warehouse

Result: Orders fulfilled from nearest/priority warehouse