1. Salesforce B2C Commerce Developer Center
"Create Custom Job Steps": This official documentation specifies the contract for custom job steps. It states
"The script must return an instance of the dw.system.Status class. The second
optional string parameter of the Status class constructor is the custom status code." It provides an example: return new Status(Status.OK
"MYCUSTOMSTATUS");
which directly validates the pattern in option B.
2. Salesforce B2C Commerce API Documentation
dw.system.Status class: The documentation for the Status class shows the constructor Status(statusCode
statusMessage). This confirms that the correct way to create a status object with a custom message or code is by passing it as the second argument to the constructor. The statusMessage is then used by the job framework to look up the corresponding status-code in the steptype.json.