Loading

Modifying the status of orders when B2C Commerce is integrated with Order Management

Publish Date: May 7, 2025
Description

 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?

Resolution

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.

Knowledge Article Number

000395053

 
Loading
Salesforce Help | Article