# Custom job steps: task and chunk modules

*B2C Commerce Developer Study Guide · Application Development · Last updated November 3, 2026 · https://www.certifyforce.com/study-guide/b2c-commerce-developer/application-development/custom-job-steps-task-and-chunk-modules*

How to build a custom job step type: register it in steptypes.json, choose a task-oriented or chunk-oriented CommonJS module, control the exit status, read step parameters, keep transactions and memory in check, and configure the job's schedule and resource locks in Business Manager.

- Certification: Salesforce B2C Commerce Developer
- Exam section: Application Development
- Study guide: https://www.certifyforce.com/study-guide/b2c-commerce-developer

**Official exam objective:**

> Given a business requirement to perform a scheduled task, develop jobs and code job scripts.

## What the exam expects

- Create a custom job step type: CommonJS module, `steptypes.json` in the cartridge root, cartridge on the path.
- Choose a task-oriented or chunk-oriented module and implement its required functions.
- Predict a step's status code, error flag and whether the job continues from what the module returns or throws.
- Read step parameters in code and set step type attributes such as `transactional` and `timeout-in-seconds`.
- Configure the job in Business Manager (schedule, flows, resource locks) and write job code that scales.

Key terms: **step type** (a reusable step definition registered by a steptypes file); **task-oriented module** (one function runs the whole step); **chunk-oriented module** (read, process and write items in chunks of a set size); **exit status** (the `dw.system.Status` code and error flag the framework records for a step); **job resource** (an object a job locks while it runs).

## Key facts

| Fact | Detail | Source |
|---|---|---|
| steptypes file location | Cartridge root; one per cartridge | [Create Custom Job Steps](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-custom-job-steps.html) |
| `@type-id` prefix | Must begin with `custom.` | [Create Custom Job Steps](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-custom-job-steps.html) |
| Duplicate `@type-id` on the path | The step isn't loaded | [Create Custom Job Steps](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-custom-job-steps.html) |
| Missing `function` | Module must export `execute` | [Create Custom Job Steps](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-custom-job-steps.html) |
| Chunk required functions | `read`, `process`, `write`; `chunk-size` required | [Create Custom Job Steps](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-custom-job-steps.html) |
| `process` returns nothing | Item is filtered from the write list | [Create Custom Job Steps](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-custom-job-steps.html) |
| Chunk exit status | Always OK or ERROR | [Create Custom Job Steps](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-custom-job-steps.html) |
| Error status with custom code | Code replaced with ERROR; job stops | [Create Custom Job Steps](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-custom-job-steps.html) |
| `transactional` default | `false` | [Create Custom Job Steps](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-custom-job-steps.html) |
| `timeout-in-seconds` | No default; setting one is recommended | [Create Custom Job Steps](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-custom-job-steps.html) |
| Read a parameter | `parameters.Name` or `stepExecution.getParameterValue('Name')` | [Class JobStepExecution](https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-script-api/dw.job.JobStepExecution.html) |
| Prevent concurrent changes | Add the changed objects on the job's Resources tab | [Create and Configure B2C Jobs](https://trailhead.salesforce.com/content/learn/modules/b2c-admin-create-and-manage-jobs/b2c-admin-create-and-configure-jobs) |
| ImportCatalog / ExportOrders context | Organization / Sites; ExportOrders takes at most 1000 orders per run | [Job Step ImportCatalog](https://salesforcecommercecloud.github.io/b2c-dev-doc/docs/current/jobstepapi/html/api/jobstep.ImportCatalog.html), [Job Step ExportOrders](https://salesforcecommercecloud.github.io/b2c-dev-doc/docs/current/jobstepapi/html/api/jobstep.ExportOrders.html) |

## Check yourself

- Why give a chunk module a `getTotalCount` function?
- When one cartridge's steptypes.json has a syntax error, what happens to other cartridges' step types?
- Which names can a `@type-id` never take, apart from duplicates?
- When should a recurring job's start date be set in the past?

## Sources

- [Create Custom Job Steps](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-custom-job-steps.html)
- [Steptypes.json Example](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-step-types-json-example.html)
- [Class JobStepExecution](https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-script-api/dw.job.JobStepExecution.html)
- [Create and Configure B2C Jobs](https://trailhead.salesforce.com/content/learn/modules/b2c-admin-create-and-manage-jobs/b2c-admin-create-and-configure-jobs)
- [Site Performance](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-site-performance.html)
- [Using Job Steps](https://help.salesforce.com/s/articleView?id=cc.b2c_working_with_job_steps.htm&type=5)
- [Job Step ImportCatalog](https://salesforcecommercecloud.github.io/b2c-dev-doc/docs/current/jobstepapi/html/api/jobstep.ImportCatalog.html)
- [Job Step ImportInventoryLists](https://salesforcecommercecloud.github.io/b2c-dev-doc/docs/current/jobstepapi/html/api/jobstep.ImportInventoryLists.html)
- [Job Step ExportOrders](https://salesforcecommercecloud.github.io/b2c-dev-doc/docs/current/jobstepapi/html/api/jobstep.ExportOrders.html)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 13 linked practice questions, and unlimited timed mock exams are included with the B2C Commerce Developer pack (USD $19): https://www.certifyforce.com/practice-exams
