From salesforce-commerce
Builds and manages Salesforce B2C Commerce jobs: framework, script/pipeline/chunk steps, cron scheduling, context/parameters, import/export/reindex, Business Manager monitoring. For background processing.
How this skill is triggered — by the user, by Claude, or both
Slash command
/salesforce-commerce:sf-b2c-jobsThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
**ALWAYS fetch live documentation BEFORE writing any job code:**
ALWAYS fetch live documentation BEFORE writing any job code:
Why: Job APIs, execution contexts, and best practices evolve with each B2C Commerce release. Always verify current patterns.
The job framework provides scheduled background processing in B2C Commerce:
| Type | Description | Approach |
|---|---|---|
| System jobs | Built-in import/export/reindex/cleanup | Configured in Business Manager |
| Script module steps | Custom JavaScript (modern approach) | exports.execute = function(jobStepExecution) {} |
| Pipeline steps | Legacy pipeline-based steps | Maintenance mode; avoid for new work |
| Chunk steps | Large dataset processing | Read-process-write pattern with commit intervals |
| Step Type | Use Case | Key Characteristic |
|---|---|---|
| Script | General custom logic | Single execute() entry point; return Status |
| Pipeline | Legacy flows | Deprecated for new development |
| Chunk | Large dataset processing | Framework manages read/process/write lifecycle with batching |
0 0 2 * * ? Every day at 2:00 AM
0 */15 * * * ? Every 15 minutes
0 0 0 1 * ? First day of month at midnight
0 0 18 ? * MON-FRI Weekdays at 6:00 PM
Format: seconds minutes hours day-of-month month day-of-week
Every job step must return a dw.system.Status object:
| Status | Constant | Meaning |
|---|---|---|
| Success | Status.OK | Step completed successfully |
| Error | Status.ERROR | Step failed; may halt job depending on configuration |
There is no Status.WARN. For partial success, return Status.OK with a descriptive message (e.g., 'PARTIAL' status code with error count in the message).
// Pattern: Status return
var Status = require('dw/system/Status');
return new Status(Status.OK, 'COMPLETED', 'message');
// Fetch live docs for Status constructor
For large datasets, chunk-oriented processing follows this lifecycle:
The framework manages batching, transaction boundaries, and error recovery. Fetch live docs for the exact chunk step interface (read, process, write, afterStep methods).
Job step parameters are configured in Business Manager per job and accessed at runtime:
jobStepExecution.getParameterValue('ParamName') -- retrieve config valuesjobStepExecution.isDisabled() -- check if step is disabled| Category | Examples |
|---|---|
| Import | Catalog, inventory, pricing, customer data (XML/CSV) |
| Export | Orders, products, customers |
| Reindex | Search index rebuild, product availability updates |
| Cleanup | Session cleanup, log rotation, temp file removal |
sfcc-ci job:run --job-id <id> and sfcc-ci job:status --job-execution-id <id>dw/system/Logger for structured logging within job stepsTransaction.wrap() per batch, not per itemStatus messages with item counts and error summariesStatus.ERROR on failureStatus.OK with descriptive messagedw/system/Logger including item identifiers for debuggingTransaction.wrap() (per batch, not per item)products.close()) in finally blocks to prevent resource leaksFetch the B2C Commerce job framework reference, cron syntax guide, and sfcc-ci documentation for exact step interfaces, parameter configuration, and chunk processing patterns before implementing.
npx claudepluginhub orcaqubits/agentic-commerce-skills-plugins --plugin salesforce-commerceGuides creation of custom job steps for Salesforce B2C Commerce batch processing, including task-oriented and chunk-oriented patterns, steptypes.json definitions, and jobs.xml configuration for scheduled jobs.
Run and monitor jobs on B2C Commerce instances via the b2c CLI, including site archive import/export and search indexing. Activates when users mention triggering jobs, importing folders, or rebuilding indexes.
Guides SAP BTP Job Scheduling Service development, configuration, and operations including REST API for cron/recurring jobs, OAuth 2.0, multitenancy on Cloud Foundry and Kyma.