Main orchestrator for Shopify CSV import.
Coordinates CSV parsing, validation, filtering, transformation, and product creation.
Usage
# Dry run - see what would be imported
ShopifyCSV.import("/path/to/products.csv", dry_run: true)
# Full import
ShopifyCSV.import("/path/to/products.csv")
# Import with custom config
config = Shop.get_import_config!(config_id)
ShopifyCSV.import("/path/to/products.csv", config: config)
# Import to specific category
category = Shop.get_category_by_slug("shelves")
ShopifyCSV.import("/path/to/products.csv", category_id: category.id)
Summary
Functions
Import products from Shopify CSV file.
Quick dry run - just parse and filter, show what would be imported.
Validates CSV file without importing.
Functions
Import products from Shopify CSV file.
Options
:dry_run- If true, don't create products, just return what would be created:category_id- Override category for all products:skip_existing- If true, skip products with existing slugs (default: true):update_existing- If true, update existing products instead of skipping (default: false):config- ImportConfig struct for filtering/categorization (nil = use defaults):validate- If true, validate CSV before import (default: true)
Note: When update_existing: true, skip_existing is ignored.
Returns
Summary map with:
:imported- count of newly created products:updated- count of updated existing products:skipped- count of skipped (existing or filtered out):errors- count of failed imports:dry_run- count of products in dry run:error_details- list of error tuples:validation_report- CSV validation report (if validate: true)
Quick dry run - just parse and filter, show what would be imported.
Validates CSV file without importing.
Returns validation report with headers, row count, and any warnings.