Is it possible to use the Open Commerce API (OCAPI) or Script API to modify the status of orders in B2C Commerce when connected to Order Management?
No, it is not possible to use the Open Commerce API (OCAPI) or Script API to modify the order status in B2C Commerce when integrated with Salesforce Order Management.
Once B2C Commerce and Order Management are integrated, the standard status field on the order object is controlled by the Order Management integration package. This package is responsible for synchronizing order data between B2C Commerce and Order Management. When the integration package is active, the status field in B2C Commerce becomes read-only. Any attempt to modify this field via OCAPI will result in a "StatusTransitionNotPossibleException". Similarly, if you use the Script API, you will encounter the following error:
"Wrapped com.demandware.component.transaction.som_integration.IllegalOrderIntegrationStateException: Status of integrated orders cannot be changed."
When the integration between B2C Commerce and Order Management is disconnected, the integration package is effectively deactivated, and that allows the status field to become editable again in B2C Commerce since deactivating the integration disables the synchronization of data between the systems.
It's important to note that rolling back an integration can have significant implications, and it's recommended to consult with a Salesforce expert or Support representative before proceeding with any rollback plan.
000395053

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.