b2c-site-import-export

Import and export Salesforce B2C Commerce site archives via the b2c CLI.

51|16|Updated Oct 31, 2025
One-click install
npx skills add https://github.com/SalesforceCommerceCloud/b2c-developer-tooling --skill b2c-site-import-export
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: b2c-site-import-export
Source: https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/tree/main/skills/b2c-cli/skills/b2c-site-import-export
Command: npx skills add https://github.com/SalesforceCommerceCloud/b2c-developer-tooling --skill b2c-site-import-export

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps teams manage Salesforce B2C Commerce site archives by providing a CLI-driven workflow for importing and exporting site data, including metadata XML patterns, and structuring the archive for easy version control.

Core Features & Use Cases

  • Import Local Directory: Import a local directory as a site archive with b2c job import ./my-site-data --wait to wait for completion.
  • Import Remote Archive: Import an archive already on the instance (remote) using the --remote flag.
  • Export Site Data: Export site data using b2c job export with optional configuration.
  • Directory Structure Guidance: Follow the standard site-archive layout (sites/, meta/, catalogs/, pricebooks/, customobjects/, etc.) to organize data.

Quick Start

Install and set up the b2c CLI, then run a local import:

  • Run: b2c job import ./my-site-data --wait to import a local site archive.
  • Or export a site archive: b2c job export

Frequently Asked Questions about b2c-site-import-export

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I import a local directory as a Salesforce B2C Commerce site archive?

To import a local directory as a Salesforce B2C site archive, run the b2c job import command with your local path and use the --wait flag to pause execution until the import job completes successfully.

What is the standard directory structure for B2C site archives?

The standard B2C site archive directory structure organizes data into specific folders including sites/, meta/, catalogs/, pricebooks/, and customobjects/ to ensure metadata XML patterns and site preferences are correctly mapped during import and export operations.

Can I import a site archive that is already located on the remote B2C instance?

Yes, you can import a remote site archive already located on the B2C instance by executing the b2c job import command with the --remote flag, targeting the existing archive without needing a local upload.

How do I export site data using the b2c CLI?

You can export site data by running the b2c job export command, which packages site preferences, catalog assets, and metadata XML patterns into a structured archive suitable for version control.

Does the b2c CLI workflow support version control for site preferences and catalog data?

Yes, the b2c CLI workflow enforces the standard site-archive directory layout, structuring metadata XML patterns, site preferences, and catalog assets so they can be easily tracked and managed in version control systems.

What is the best way to manage Salesforce B2C site archives for automated deployments?

The best way to manage B2C site archives for automated deployments is using a CLI-driven workflow with the b2c CLI, executing job import and export commands while maintaining strict directory structure compliance for consistent metadata processing.