# `PhoenixKit.Modules.Shop.Import.ShopifyCSV`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v1.7.71/lib/modules/shop/import/shopify_csv.ex#L1)

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_uuid)
    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_uuid: category.uuid)

# `import`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v1.7.71/lib/modules/shop/import/shopify_csv.ex#L56)

Import products from Shopify CSV file.

## Options

- `:dry_run` - If true, don't create products, just return what would be created
- `:category_uuid` - 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)

# `preview`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v1.7.71/lib/modules/shop/import/shopify_csv.ex#L160)

Quick dry run - just parse and filter, show what would be imported.

# `validate`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v1.7.71/lib/modules/shop/import/shopify_csv.ex#L194)

Validates CSV file without importing.

Returns validation report with headers, row count, and any warnings.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
