Skip to content

Import Data

PlatformProductsCustomersOrdersInventory
WooCommerce
Shopify
Magento
Medusa
Terminal window
rcommerce import platform <platform> \
--api-url <source-url> \
--api-key <key> \
--api-secret <secret> \
--entities products,customers,orders \
[--dry-run] \
[--overwrite]
  • --entities — comma-separated list: products, customers, orders
  • --dry-run — preview what would be imported without writing
  • --overwrite — update existing records (matched by SKU or email)
  • --batch-size — records per API request (default: 50)
Terminal window
rcommerce import platform woocommerce \
--api-url https://store.example.com \
--api-key ck_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
--api-secret cs_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
--entities products,customers,orders \
--overwrite

Requires WooCommerce REST API v3. Generate consumer key/secret in WooCommerce → Settings → Advanced → REST API.

  • Products: title, description, SKU, price, weight, dimensions, images, categories, variants
  • Customers: name, email, addresses, metadata
  • Orders: line items, status, shipping/billing addresses, payment status
  • Inventory: stock quantities per product/variant

WooCommerce bundle/party-pack products are expanded:

  • Parent line carries the bundle price (no inventory reservation)
  • Component lines at $0 reserve underlying product stock
Terminal window
rcommerce import platform shopify \
--api-url https://your-store.myshopify.com \
--api-key <access-token> \
--entities products,customers,orders \
--overwrite

After importing, verify:

Terminal window
# Check product count
rcommerce product list | wc -l
# Check customer count
rcommerce api-key create --name "check" --scopes "customers:read"
# Re-sync party pack inventory (if using bundles)
psql -d rcommerce -c "
UPDATE products pp
SET inventory_quantity = GREATEST(0, FLOOR(bp.inventory_quantity / 5.0)::integer)
FROM products bp
WHERE pp.slug LIKE '%-party-pack'
AND bp.sku = REPLACE(pp.sku, '-PP', '')
AND bp.is_active = true;
"