b2c-job
Salesforce B2C Commerce job execution and site archive import/export (IMPEX) Skill
When & Why to Use This Skill
This Claude skill provides a powerful interface for Salesforce B2C Commerce (SFCC) job execution and site archive management (IMPEX). By leveraging the b2c CLI, users can automate complex backend tasks such as running system jobs with custom parameters, importing/exporting site data, and monitoring execution logs. It is designed to streamline e-commerce operations, improve DevOps workflows, and ensure reliable data synchronization across Salesforce instances.
Use Cases
- Triggering Search Indexing: Run full product search index updates for specific storefronts using custom JSON request bodies to ensure product catalogs are up-to-date.
- Automated Site Imports: Upload and import local site data or zip archives to Salesforce instances, with options to wait for completion and view logs for debugging.
- Job Monitoring and Debugging: Search for recent job executions and track the status of long-running tasks with timeout support to ensure operational stability.
- Data Portability: Export site archives from a Salesforce B2C Commerce instance to facilitate backups, environment cloning, or data migration between instances.
| name | b2c-job |
|---|---|
| description | Using the b2c CLI for job execution and site archive import/export (IMPEX) |
B2C Job Skill
Use the b2c CLI plugin to run jobs and import/export site archives on Salesforce B2C Commerce instances.
Examples
Run a Job
# run a job and return immediately
b2c job run my-custom-job
# run a job and wait for completion
b2c job run my-custom-job --wait
# run a job with a timeout (in seconds)
b2c job run my-custom-job --wait --timeout 600
# run a job with parameters (standard jobs)
b2c job run my-custom-job -P "SiteScope={\"all_storefront_sites\":true}" -P OtherParam=value
# show job log if the job fails
b2c job run my-custom-job --wait --show-log
Run System Jobs with Custom Request Bodies
Some system jobs (like search indexing) use non-standard request schemas. Use --body to provide a raw JSON request body:
# run search index job for specific sites
b2c job run sfcc-search-index-product-full-update --wait --body '{"site_scope":["RefArch","SiteGenesis"]}'
# run search index job for a single site
b2c job run sfcc-search-index-product-full-update --wait --body '{"site_scope":["RefArch"]}'
Note: --body and -P are mutually exclusive.
Import Site Archives
The job import command automatically waits for the import job to complete before returning. It does not use the --wait option.
# import a local directory as a site archive
b2c job import ./my-site-data
# 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
# import an archive that already exists on the instance (in Impex/src/instance/)
b2c job import existing-archive.zip --remote
# show job log on failure
b2c job import ./my-site-data --show-log
Export Site Archives
# export site data using the job export command
b2c job export
Search Job Executions
# search for job executions
b2c job search
# search with JSON output
b2c job search --json
Wait for Job Completion
# wait for a specific job execution to complete
b2c job wait <execution-id>
More Commands
See b2c job --help for a full list of available commands and options in the job topic.