- Home
- Skills
- Salesforcecommercecloud
- B2c Developer Tooling
- B2c Site Import Export
b2c-site-import-export_skill
- TypeScript
20
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill salesforcecommercecloud/b2c-developer-tooling --skill b2c-site-import-export- SKILL.md8.1 KB
Overview
This skill helps you import and export Salesforce B2C Commerce (Demandware) site archives and metadata using the b2c CLI. It explains directory layout, XML metadata patterns, and common commands for site preferences, custom attributes, custom object types, and content. Use it to prepare archives that the platform will accept and to automate imports/exports during development and deployment.
How this skill works
The skill inspects and describes the expected site archive directory structure and the XML schemas used by B2C Commerce (metadata, preferences, custom objects, catalogs, pricebooks, inventory). It documents b2c CLI job commands for importing local directories, zip archives, and remote archives, and shows options like --wait, --keep-archive, and --show-log. It also demonstrates metadata examples for type extensions, custom object definitions, and site preference values.
When to use it
- Adding or modifying custom attributes on system objects (products, customers)
- Defining or deploying custom object types and their instances
- Updating site preferences or site-specific library content
- Exporting site data for migration, backup, or inspection
- Automating imports as part of CI/CD or sandbox-to-staging workflows
Best practices
- Test imports on a sandbox before staging/production
- Use --wait to block until the import completes and capture status
- Use --show-log to surface errors when an import fails
- Keep metadata files version controlled and grouped by feature
- Organize archives by directory structure matching the platform schema (meta, sites, catalogs, customobjects, etc.)
Example use cases
- Add a vendorSKU custom attribute to Product via meta/system-objecttype-extensions.xml and import with b2c job import ./my-import --wait
- Create a site preference and set its value in sites/MySite/preferences.xml, then import the archive to apply it
- Define a custom object type (APIConfiguration) in meta/custom-objecttype-definitions.xml and import both type definition and customobjects/APIConfiguration.xml
- Export current site data for review using b2c job export --wait, then inspect catalogs/, pricebooks/, and services.xml
- Import an existing archive stored on the instance with b2c job import existing-archive.zip --remote
FAQ
No. If b2c is not installed globally use npx @salesforce/b2c-cli followed by the job command, for example npx @salesforce/b2c-cli job import ./my-site-data.
How can I debug a failed import?
Run the import with --wait --show-log to see server-side logs and errors. Also run b2c job search and b2c job wait <execution-id> to inspect execution details.
What directory structure must an archive use?
Follow the platform pattern: root files like services.xml, a meta/ folder for metadata XML, sites/{SiteID}/preferences and library, catalogs/{CatalogID}/catalog.xml, pricebooks/, customobjects/, and inventory-lists/.