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
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 Warehouse | Magento Source | Priority |
---|---|---|
0 (Main Warehouse) | default | 1 |
Multi-Source Example (MSI):
PlentyONE Warehouse | Magento Source | Priority |
---|---|---|
101 (Main Warehouse) | main_warehouse | 1 |
102 (East Coast DC) | east_dc | 2 |
103 (West Coast DC) | west_dc | 3 |
104 (EU Warehouse) | eu_warehouse | 4 |
Stock Calculation Mode
Field: stock_calculation_mode
Type: Select
Scope: Global
How to calculate available stock from PlentyONE.
Options:
Mode | Calculation | Use Case |
---|---|---|
Physical Stock | Actual warehouse quantity | Standard inventory |
Available Stock | Physical - Reserved - Shipped | Real available qty |
Virtual Stock | Physical + Incoming - Reserved | Include incoming stock |
Net Stock | Physical - Reserved | Conservative 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 = 05
- 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:
Mode | Behavior | Use Case |
---|---|---|
Direct Mapping | One warehouse → one source | Simple 1:1 mapping |
Split Stock | Distribute across sources | Load balancing |
Priority Based | Fill sources by priority | Preferred warehouse first |
Regional | Map by region/locale | Geographic 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:
- Check Priority 1 source for availability
- If insufficient, check Priority 2
- 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:
Frequency | Use Case | Risk Level |
---|---|---|
Every 5 minutes | High-traffic stores | Low overselling risk |
Every 15 minutes | Standard stores | Balanced |
Every 30 minutes | Low-traffic stores | Higher risk |
Hourly | Very low volume | Highest 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:
- Check Product Identifier: Verify SKU matching
- Review Source Mapping: Ensure warehouses are mapped
- Check MSI Settings: Verify MSI is enabled if using multi-source
- Verify Stock Calculation: Review calculation mode setting
- Check Logs: Review
var/log/softcommerce/plenty/stock.log
Wrong Stock Quantities
Solutions:
- Verify Calculation Mode: Check if using correct mode
- Check Reservations: Verify reservation handling
- Review Threshold: Check out-of-stock threshold
- Compare PlentyONE: Verify source data is correct
Products Show Out of Stock
Solutions:
- Check Stock Status Management: Ensure it's enabled
- Review Threshold: Verify out-of-stock threshold
- Check Source Priority: Verify stock allocated to correct source
- Verify Backorders: Check backorder settings
MSI Stock Not Distributing
Solutions:
- Enable MSI: Verify MSI mode is enabled
- Check Source Mapping: Ensure all warehouses mapped
- Review Source Assignment: Verify assignment mode
- Check Source Priority: Verify priority configuration
Best Practices
Initial Setup
- Import Products First: Ensure all products exist
- Configure MSI Sources: Set up all stock sources in Magento
- Map Warehouses: Create complete warehouse → source mapping
- Choose Calculation Mode: Select appropriate stock calculation
- Set Threshold: Configure out-of-stock threshold
- Test with Sample: Import stock for 10-20 products first
Production Operations
- Frequent Updates: Run every 5-15 minutes
- Monitor for Errors: Check logs regularly
- Verify Accuracy: Spot-check stock levels
- Adjust Batch Size: Optimize based on performance
- Handle Reservations: Enable if using multi-channel
Multi-Warehouse Strategy
- Priority Order: Assign logical priorities (main warehouse first)
- Regional Mapping: Map warehouses to regional sources
- Test Distribution: Verify stock distributes correctly
- Monitor Allocation: Check MSI algorithm performance
Performance Optimization
- Batch Size: Larger batches for faster imports
- Selective Updates: Only update changed products
- Schedule Wisely: Run during low-traffic periods for large updates
- Database Indexing: Ensure stock indexes are optimized
Overselling Prevention
- Conservative Calculation: Use "Available Stock" mode
- Safety Buffer: Set out-of-stock threshold > 0
- Frequent Updates: Import stock every 5-15 minutes
- Handle Reservations: Enable reservation handling
- Monitor Closely: Watch for overselling incidents
MSI Best Practices
Source Configuration
- Name Logically: Use clear source names (main_warehouse, east_dc)
- Set Priorities: Highest priority for main/preferred sources
- Regional Sources: Create sources per region for shipping optimization
- Backup Sources: Include overflow/backup sources
Stock Distribution
- Algorithm Choice: Use Magento's distance-based algorithm for regional
- Priority Algorithm: Use priority for preferred warehouses
- Test Allocation: Verify stock allocates as expected
- 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