Change product variation
A customer may want to choose a different variation of a product that is already included in the order. In such situations, the user must be able to change the product variation conveniently.
Solution
The following section describes APIs, user exits, services, and other components.
When the user
chooses to change the product variation from the related tasks in
the Order Summary or Order Line Summary screen,
the order lines are displayed in the Add Products screen.
The getCompleteOrderDetails
API is called to retrieve
the complete details of the order, which includes the modification
permissions at the order level.
getCompleteOrderLineList
API
is called to retrieve the line level details and the modification
permissions at the line level.- For a confirmed order, if the
ADD_LINE
modification type is allowed at the order level and theCANCEL
modification type is allowed at the order line level, the user can change the product variation. - For a draft order, if the
ADD_LINE
modification type is allowed at the order level and theREMOVE
modification type is allowed at the order line level, the user can change the product variation.
In a confirmed order, the existing order line is canceled and a new order line is added. However, in a draft order, the existing order line is removed.
When the user selects a valid
combination of attributes and confirms the change, the getCompleteItemList
API
is called to retrieve the related products that are associated with
the variation product. If the variation product is a bundle parent,
the user can also view its components.
When the user changes the product variation of a bundle parent product, the components that belong to the bundle parent also change accordingly.
When the
user updates the changes, the modifyFulfullmentOptions
API
is called. This API internally calls the changeOrder
and validateItemForOrdering
APIs.
If there is a product validation error, the changeOrder
API
call rolls back.
Implementation
The following section describes the rules that you must configure.
- Changing the product variation is a permission-controlled task. For information about administering user group permissions, see the Administering user group permissions.
- Enable the following rules appropriately:
- The "Add Line" status modification rule at the order level and the "Cancel" status modification rule at the order line level for confirmed orders.
- The "Add Line" status modification rule at the order level and the "Remove" status modification rule at the order line level for draft orders.
For more information about status modification rules, see the Configuring Distributed Order Management.
End-user impact
Users can change the product variation to suit the customer's needs even after an order is confirmed.