Skip to main content

Marketplace Sync Issues

When to use this runbook

  • Stock levels drifting between Logidav and marketplaces
  • Orders missing from marketplace import
  • Product catalog out of sync
  • Price updates not propagating

Step 1: Identify the affected marketplace

MarketplaceConnectorKey commands
AmazonShoppingFeed / directmenzzo:erp:shopping-feed:sync:sales
Lengow MenzzoLengow V3 account 5622menzzo:lengow:sales --marketplace=5622
Lengow CotecosyLengow V3 account 6395menzzo:lengow:sales --marketplace=6395
MosaikasaLengow V3 account 17220menzzo:lengow:sales --marketplace=17220
CdiscountShoppingFeed / Lengowmenzzo:lengow:sales --marketplace=<account>
ManoManoShoppingFeed / Lengowmenzzo:lengow:sales --marketplace=<account>

Check which sync commands are failing:

# Check recent marketplace-related errors
grep -i "shopping.feed\|lengow\|amazon\|cdiscount\|manomano" var/logs/prod.log | tail -30

Step 2: Check sync command status

Verify the relevant cronjobs ran successfully:

# Check if the sync commands have run recently
ls -lt /var/log/logidav/ | grep -i "shopping\|lengow\|sync"

# Check for errors in the last run
grep -i "error\|exception" /var/log/logidav/<sync-command>.log | tail -20

Review the cronjob catalog for expected schedules.

Step 3: Diagnose stock drift

Compare Logidav stock quantities with marketplace inventory:

# Check current Logidav stock for a product
mysql -e "SELECT sku, qty, name FROM mz_product WHERE sku = '<sku>';"

# Check recent stock mutations
# ProductQtyLogService records all stock changes
mysql -e "SELECT * FROM product_qty_log WHERE product_id = <product_id> ORDER BY created_at DESC LIMIT 20;"
info

Stock drift usually happens when a sync command fails silently or when the marketplace API rejects an update without a clear error.

Step 4: Diagnose missing orders

Check the order import cursor/timestamp:

# Check the last imported order ID (cursor)
mysql -e "SELECT * FROM configuration WHERE path LIKE '%cursor%' OR path LIKE '%last_id%';"

Verify the marketplace API returns the expected orders:

  1. Check the marketplace seller portal for recent orders
  2. Compare with orders in Logidav
  3. Look for orders that exist on the marketplace but not in Logidav

Step 5: Recovery

Stock drift

Force a full stock sync via the dedicated command:

php bin/console app:publish-products-managestock-and-qty-to-queue

Missing orders

Re-run the import with an adjusted cursor:

# Adjust the cursor to re-import missed orders
# Be cautious: ensure the import is idempotent (upsert)
php bin/console menzzo:v2:sales --from-id=<last_known_good_id>

For Lengow V3, replay by account and import date instead of a Magento cursor:

php bin/console menzzo:lengow:sales --marketplace=5622 --importFrom=2026-05-01
php bin/console menzzo:lengow:sales --marketplace=6395 --importFrom=2026-05-01
php bin/console menzzo:lengow:sales --marketplace=17220 --importFrom=2026-05-01

When a Lengow sale is present but stuck, check whether it is status = holded or has lengow_error_message set. Those paths are maintained by src/ErpBundle/Services/Lengow/V3/LengowService.php, src/ErpBundle/Command/Lengow/V3/UpdateLengowStatusCommand.php, and src/ErpBundle/Command/Lengow/V3/LengowOrderIssueAlertCommand.php.

Catalog sync

Re-run the product sync command:

php bin/console menzzo:v2:products

Price updates

Re-run the price calculation and sync:

php bin/console menzzo:marketing:product:calculate-price

Common failure patterns

SymptomLikely causeResolution
Stock shows 0 on marketplace but available in LogidavSync command failed or was skippedForce stock sync
Orders appearing lateImport cursor stuck or API pagination issueReset cursor and re-import
Products missing from marketplaceCatalog sync error or product validation failureCheck product data, re-run sync
Prices not updatingPrice calculation cron not runningRun price calculation, then sync
Lengow order imported as holdedProduct resolution or sale creation failedCheck the cart merchant product id, especially Mosaikasa account 17220 where it must match mz_product.ean_bis
Lengow status mismatch alertLengow action status does not map to the local sale statusReview lengow_error_message, then rerun menzzo:lengow:update-status after fixing the underlying action
Old Auchan feed still appearsRetired V2 feed 113959 was left in cron or menu docsKeep /erp/lengow/v2/all/113959 and menzzo:lengow:v2:sales --feedId=113959 retired

See also