Order Synchronization Issues
This guide covers common issues specific to order synchronization between Magento and PlentyONE.
Order Export Issues (Magento → PlentyONE)
Issue: Order Export Fails with "Customer Not Found"
Symptoms:
Error: Cannot export order #000000123
Customer with ID 456 not found in PlentyONE
Cause: Customer doesn't exist in PlentyONE yet.
Solution:
# 1. Export customer first
bin/magento plenty:customer:export --id=456 --verbose
# 2. Verify customer export succeeded
mysql> SELECT * FROM softcommerce_plenty_customer_relation WHERE magento_customer_id = 456;
# 3. Retry order export
bin/magento plenty:order:export -i 123 --verbose
Prevention:
- Enable automatic customer export on order creation
- Configure customer export profile to run before order export in cron schedule
Issue: "Payment Method Not Mapped"
Symptoms:
Error: Payment method 'checkmo' is not mapped to PlentyONE payment method
Cannot create payment record
Cause: Payment method mapping not configured in profile.
Solution:
-
Check current mappings:
# View profile configuration
bin/magento profile:export:config --profile=order_export -
Configure mapping via Admin:
- Navigate to SoftCommerce → Profiles → Manage Profiles
- Select your Order Export profile
- Go to Configuration → Payment Method Mapping
- Map each Magento payment method to PlentyONE payment method
-
Common payment method mappings:
Magento Method PlentyONE Method ID checkmo 1 (Invoice) cashondelivery 2 (Cash on Delivery) paypal_express 4 (PayPal) stripe_payments 6 (Credit Card) banktransfer 5 (Bank Transfer)
Issue: "Shipping Method Not Mapped"
Symptoms:
Error: Shipping method 'flatrate_flatrate' is not mapped
Order export failed
Solution:
-
Configure shipping mapping:
- SoftCommerce → Profiles → Manage Profiles → [Order Export Profile]
- Configuration → Shipping Method Mapping
- Map Magento shipping methods to PlentyONE shipping profiles
-
Get PlentyONE shipping profile IDs:
# Collect shipping profiles from PlentyONE
bin/magento plenty:setup:collect --type=shipping --verbose
# View collected shipping profiles
mysql> SELECT * FROM softcommerce_plenty_config_shipping_profile; -
Example mappings:
Magento Method PlentyONE Shipping Profile flatrate_flatrate 1 (Standard Shipping) tablerate_bestway 2 (Express Shipping) freeshipping_freeshipping 3 (Free Shipping)
Issue: "Address Validation Failed"
Symptoms:
Error: Invalid address data
Required field 'address.countryId' is missing or invalid
Common Causes:
- Missing country code
- Invalid postal code format
- Missing required address fields (street, city, postcode)
Solution:
-
Validate order address in Magento:
# Check order address completeness
mysql> SELECT * FROM sales_order_address WHERE parent_id = 123; -
Required address fields:
- First name & Last name
- Street address (line 1 minimum)
- City
- Postcode/ZIP
- Country code (ISO 2-letter)
- Telephone
-
Fix missing data:
# Update order address in Magento first
# Then retry export
bin/magento plenty:order:export -i 123 --verbose
Issue: Order Items Missing in PlentyONE
Symptoms:
- Order created in PlentyONE but has no items
- Order total is 0.00
- "Order items not found" error
Cause: Products not exported to PlentyONE yet.
Solution:
# 1. Get product SKUs from order
mysql> SELECT sku FROM sales_order_item WHERE order_id = 123;
# 2. Export each product
bin/magento plenty:item:collect --sku=PRODUCT-SKU
bin/magento plenty:item:export --sku=PRODUCT-SKU --verbose
# 3. Verify product mapping exists
mysql> SELECT * FROM softcommerce_plenty_item_relation WHERE sku = 'PRODUCT-SKU';
# 4. Retry order export
bin/magento plenty:order:export -i 123 --verbose
Issue: Duplicate Orders Created
Symptoms:
- Same order appears multiple times in PlentyONE
- Different PlentyONE order IDs for same Magento order
- Order relation mapping missing
Cause: Order mapping relation not created or cleared.
Solution:
# 1. Check if mapping exists
mysql> SELECT * FROM softcommerce_plenty_order_relation WHERE magento_order_id = 123;
# 2. If multiple PlentyONE orders exist, delete duplicates
bin/magento plenty:order:delete --id=<duplicate_plenty_order_id> --verbose
# 3. Recreate order mapping
bin/magento plenty:order:map
# 4. Verify mapping
mysql> SELECT * FROM softcommerce_plenty_order_relation WHERE magento_order_id = 123;
Issue: "Referrer Not Found"
Symptoms:
Error: Order referrer 'magento' not found
Cannot create order
Cause: Magento referrer not created in PlentyONE.
Solution:
# Create Magento referrer
bin/magento plenty:setup:create --type=referrer --verbose
# Verify referrer created
mysql> SELECT * FROM softcommerce_plenty_config_referrer WHERE name = 'magento';
# Configure profile to use referrer
# SoftCommerce → Profiles → Manage Profiles → [Order Export Profile]
# Configuration → Order Configuration → Order Referrer: magento
Issue: Order Export Extremely Slow
Symptoms:
- Single order export takes > 30 seconds
- Bulk export times out
- Memory exhaustion on large orders
Causes:
- Large number of order items
- Complex product configurations
- API rate limiting
- Insufficient PHP memory
Solutions:
-
Increase PHP memory and timeout:
php -d memory_limit=2G -d max_execution_time=300 bin/magento plenty:order:export --status=processing
-
Use queue-based processing:
# Enable queue processing
bin/magento queue:consumers:start plentyOrderExportConsumer --max-messages=100 -
Process in smaller batches:
# Export orders by date range
bin/magento plenty:order:export --date="2025-01-13"
# Export specific orders
bin/magento plenty:order:export -i 123,124,125 -
Optimize profile settings:
- Reduce batch size in profile configuration
- Enable gzip compression for API requests
- Increase API timeout setting
Order Import Issues (PlentyONE → Magento)
Issue: Order Status Not Updating
Symptoms:
- Order status changed in PlentyONE but not reflected in Magento
- Status import runs without errors but no changes applied
- Old status persists in Magento
Causes:
- Status mapping not configured
- Order already in target status
- Order not collected from PlentyONE
- Status transition not allowed by Magento
Solutions:
-
Verify order is collected:
# Check if order exists in collection table
mysql> SELECT * FROM softcommerce_plenty_order WHERE magento_order_id = 123;
# If not, collect it
bin/magento plenty:order:collect --date-updated="$(date +%Y-%m-%d)" --verbose -
Check status mapping:
- SoftCommerce → Profiles → Manage Profiles → [Order Import Profile]
- Configuration → Status Mapping
- Ensure PlentyONE statuses are mapped to Magento statuses
-
Verify status transition is valid:
# Check current order status
mysql> SELECT status, state FROM sales_order WHERE entity_id = 123;
# Some transitions are not allowed:
# - complete → processing (can't revert)
# - closed → pending (can't reopen) -
Force status update:
# Re-collect and import
bin/magento plenty:order:collect --id=<plenty_order_id> --verbose
bin/magento plenty:order:import --verbose -
Check import logs:
tail -f var/log/plenty_order.log | grep "status"
Issue: "Order Not Found in Magento"
Symptoms:
Error: Cannot update order
Magento order with increment ID 000000123 not found
Cause: Trying to import order that wasn't exported from Magento.
Solution:
This is expected behavior. Order import only updates existing Magento orders. It doesn't create new orders from PlentyONE.
Workflow:
- Order created in Magento
- Order exported to PlentyONE
- Order status updated in PlentyONE
- Status imported back to Magento
If you need to create orders in Magento from PlentyONE, this requires custom development.
Issue: Tracking Information Not Syncing
Symptoms:
- Shipment created in PlentyONE
- Tracking number not appearing in Magento
- Customer not receiving tracking emails
Solution:
-
Ensure tracking sync is enabled:
- SoftCommerce → Profiles → Manage Profiles → [Order Import Profile]
- Configuration → Order Configuration
- Enable Sync Tracking Information
-
Collect shipments:
# Collect order updates including shipments
bin/magento plenty:order:collect --date-updated="$(date +%Y-%m-%d)" --verbose
# Import updates
bin/magento plenty:order:import --verbose -
Verify tracking in Magento:
mysql> SELECT * FROM sales_shipment_track WHERE parent_id IN (
SELECT entity_id FROM sales_shipment WHERE order_id = 123
); -
Check carrier mapping:
- Ensure PlentyONE carrier codes are mapped to Magento carriers
- Configure carrier mapping in profile configuration
Issue: Invoice Not Created
Symptoms:
- Invoice created in PlentyONE
- Invoice not synced to Magento
- Payment status not updated
Cause: Invoice sync not enabled or invoice already exists.
Solutions:
-
Enable invoice sync:
- SoftCommerce → Profiles → Manage Profiles → [Order Import Profile]
- Configuration → Order Configuration
- Enable Sync Invoices
-
Check if invoice already exists:
mysql> SELECT * FROM sales_invoice WHERE order_id = 123;
-
Force invoice sync:
bin/magento plenty:order:collect --id=<plenty_order_id> --verbose
bin/magento plenty:order:import --verbose
Order Data Integrity Issues
Issue: Order Totals Mismatch
Symptoms:
- Order total in PlentyONE differs from Magento
- Tax calculations don't match
- Shipping costs different
Causes:
- Currency conversion issues
- Tax calculation differences
- Discount application order
- Rounding differences
Solutions:
-
Verify tax configuration:
- Ensure tax rules match between systems
- Check tax calculation method (gross vs net)
- Verify tax rates for customer location
-
Check discount application:
# View order totals breakdown
mysql> SELECT * FROM sales_order WHERE entity_id = 123;
mysql> SELECT * FROM sales_order_item WHERE order_id = 123; -
Review currency settings:
- Ensure correct currency is configured in profile
- Check exchange rates if multi-currency
Issue: Guest Order Export Fails
Symptoms:
Error: Cannot export guest order
Contact creation failed: Email already exists
Cause: Guest email matches existing PlentyONE contact.
Solution:
-
Configure guest order handling:
- SoftCommerce → Profiles → Manage Profiles → [Order Export Profile]
- Configuration → Customer Configuration
- Set Guest Order Handling to one of:
- Create new contact with unique email
- Use default guest contact
- Link to existing contact by email
-
Export with verbose logging:
bin/magento plenty:order:export -i 123 --verbose
Issue: Multi-Address Orders Not Supported
Symptoms:
Error: Multi-shipping orders are not supported
Cannot export order with multiple shipping addresses
Cause: PlentyONE doesn't support multiple shipping addresses per order.
Solution:
Magento multi-address orders are split into separate orders. Each resulting order can be exported:
# Export each split order separately
bin/magento plenty:order:export -i 123 --verbose
bin/magento plenty:order:export -i 124 --verbose
Performance and Queue Issues
Issue: Order Export Queue Stuck
Symptoms:
- Orders queued but not processing
- Queue messages in "in_progress" state for hours
- No progress in queue processing
Solutions:
-
Check queue consumers:
# List all consumers
bin/magento queue:consumers:list
# Check if order export consumer is running
ps aux | grep plentyOrderExportConsumer -
Restart consumers:
# Stop existing consumers
pkill -f plentyOrderExportConsumer
# Start fresh consumer
bin/magento queue:consumers:start plentyOrderExportConsumer --max-messages=1000 & -
Clear stuck messages:
-- Reset stuck messages (older than 1 hour)
UPDATE queue_message
SET status = 'new'
WHERE topic_name = 'plenty.order.export'
AND status = 'in_progress'
AND updated_at < DATE_SUB(NOW(), INTERVAL 1 HOUR); -
Use supervisor for automatic restarts:
[program:magento_plenty_order_export]
command=/usr/bin/php /var/www/magento/bin/magento queue:consumers:start plentyOrderExportConsumer
autostart=true
autorestart=true
Issue: High Memory Usage During Order Sync
Symptoms:
- PHP memory exhausted errors
- Server slowdown during order sync
- Cron jobs killed by system
Solutions:
-
Increase PHP memory limit:
; php.ini
memory_limit = 2G -
Process smaller batches:
# Instead of all orders
bin/magento plenty:order:export --date="$(date +%Y-%m-%d)"
# Split by status
bin/magento plenty:order:export --status=processing
bin/magento plenty:order:export --status=pending -
Use queue for async processing:
- Reduces memory footprint per execution
- Allows parallel processing
Debugging Order Sync
Enable Order Debug Logging
# Enable debug mode
bin/magento config:set plenty/log_config/is_active_debug 1
bin/magento config:set plenty/log_config/log_level debug
bin/magento cache:flush
View Order Sync Logs
# All order operations
tail -f var/log/plenty_order.log
# Order errors only
tail -f var/log/plenty_order_error.log
# Filter by order increment ID
tail -f var/log/plenty_order.log | grep "000000123"
# API calls for orders
tail -f var/log/plenty_api.log | grep "/rest/orders"
Database Inspection
-- Check order mapping
SELECT * FROM softcommerce_plenty_order_relation
WHERE magento_order_id = 123;
-- Check collected order data
SELECT * FROM softcommerce_plenty_order
WHERE magento_order_id = 123;
-- Check order export queue
SELECT * FROM queue_message
WHERE topic_name = 'plenty.order.export'
AND body LIKE '%123%';
-- View profile execution history
SELECT * FROM softcommerce_profile_history
WHERE profile_id IN (
SELECT entity_id FROM softcommerce_profile
WHERE type_id LIKE '%order%'
)
ORDER BY created_at DESC
LIMIT 10;
Test Single Order Export
# Test with maximum verbosity
bin/magento plenty:order:export -i 123 --verbose
# Check each step:
# 1. Order loading
# 2. Customer export/check
# 3. Address validation
# 4. Order items mapping
# 5. Payment creation
# 6. Order creation
# 7. Relation storage
Prevention Best Practices
-
Always export customers before orders:
- Set up customer export profile
- Schedule it to run before order export
-
Complete mapping configuration:
- Payment methods
- Shipping methods
- Order statuses
- Carriers
-
Test with single orders first:
bin/magento plenty:order:export -i 123 --verbose
-
Monitor order sync regularly:
# Daily check for failed exports
bin/magento plenty:profile:history --status=error -
Keep products synced:
- Ensure products are exported before orders
- Run product sync more frequently than order sync
-
Use queue for real-time exports:
- Configure event-based order export
- Ensure queue consumers are always running
Getting Help
If order sync issues persist:
-
Collect information:
# Order details
mysql> SELECT * FROM sales_order WHERE entity_id = 123;
# Order logs
tail -n 500 var/log/plenty_order.log > order-logs.txt
# Profile configuration
bin/magento profile:export:config --profile=order_export > order-profile.json -
Document the issue:
- Order increment ID
- Error messages
- Steps to reproduce
- Profile configuration
-
Contact support with:
- Order details (sanitized)
- Log excerpts
- Profile configuration
- System check output
Related Documentation
- Order Synchronization Testing - Test order sync
- API Errors - API error reference
- Common Issues - General troubleshooting
- Profile Issues - Profile execution problems
Pro Tip: Set up automated monitoring for order sync failures. Configure email notifications or webhooks to alert you immediately when order exports fail, allowing quick resolution before it affects customers.