Back to Skills

b2c-site-import-export

verified

Using the B2C CLI for site archive import/export with metadata XML patterns

View on GitHub

Marketplace

b2c-developer-tooling

SalesforceCommerceCloud/b2c-developer-tooling

Plugin

b2c-cli

productivity

Repository

SalesforceCommerceCloud/b2c-developer-tooling
8stars

plugins/b2c-cli/skills/b2c-site-import-export/SKILL.md

Last Verified

January 20, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/main/plugins/b2c-cli/skills/b2c-site-import-export/SKILL.md -a claude-code --skill b2c-site-import-export

Installation paths:

Claude
.claude/skills/b2c-site-import-export/
Powered by add-skill CLI

Instructions

# Site Import/Export Skill

Use the `b2c` CLI plugin to import and export site archives on Salesforce B2C Commerce instances.

## Import Commands

### Import Local Directory

```bash
# Import a local directory as a site archive
b2c job import ./my-site-data

# Import and wait for completion
b2c job import ./my-site-data --wait

# Import a local zip file
b2c job import ./export.zip

# Keep the archive on the instance after import
b2c job import ./my-site-data --keep-archive

# Show job log if the import fails
b2c job import ./my-site-data --wait --show-log
```

### Import Remote Archive

```bash
# Import an archive that already exists on the instance (in Impex/src/instance/)
b2c job import existing-archive.zip --remote
```

## Export Commands

```bash
# Export site data
b2c job export

# Export with specific configuration
b2c job export --wait
```

## Common Workflows

### Adding a Custom Attribute to Products

1. Create the metadata XML file:

**meta/system-objecttype-extensions.xml:**
```xml
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.demandware.com/xml/impex/metadata/2006-10-31">
    <type-extension type-id="Product">
        <custom-attribute-definitions>
            <attribute-definition attribute-id="vendorSKU">
                <display-name xml:lang="x-default">Vendor SKU</display-name>
                <type>string</type>
                <mandatory-flag>false</mandatory-flag>
                <externally-managed-flag>true</externally-managed-flag>
            </attribute-definition>
        </custom-attribute-definitions>
        <group-definitions>
            <attribute-group group-id="CustomAttributes">
                <display-name xml:lang="x-default">Custom Attributes</display-name>
                <attribute attribute-id="vendorSKU"/>
            </attribute-group>
        </group-definitions>
    </type-extension>
</metadata>
```

2. Create the directory structure:
```
my-import/
└── meta/
    └── system-objecttype-extensions.xml

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
5946 chars