Change delivery method
The Edit Delivery Method window is displayed with two tabs, one for Ship and
the other for Pickup. By default, the Edit Delivery Method window displays the tab corresponding to
the current delivery method of order line. Based on the output of the
getFulfillmentOptionsForLines
API, appropriate options are displayed in each of the
tabs. However, the store associate will not see the In-Store option as a delivery method. The
getItemAvailabilityForStore API is called to fetch the product
availability for the delivery methods.
- When the delivery method of an order line is changed from Pickup to Ship, the
modifyFulfillmentOptions
API is called to set theDeliveryMethod
attribute toSHP
and theCarrierServiceCode
attribute based on the selected carrier service option, if applicable. ThegetCarrierServiceOptionsForOrdering
API is called to retrieve the list of carrier services in the Ship tab. ThemodifyFulfillmentOptions
API also sets the shipping address for the order line, if the order does not already have a shipping address. - When the delivery method of a product is changed from Ship to Pickup, the
modifyFulfillmentOptions
API is called to set theDeliveryMethod
attribute toPICK
andShipNode
attribute to the selected store. The logic implemented to select or change a store is applicable. For more information, see Change pickup store.In these scenarios, the
modifyFulfillmentOptions
API is called in the pending changes mode provided there are no existing pending changes and the status of the order line is less than Scheduled. If the status of the order line isScheduled
or beyond and theAllow Modifications of Orders Beyond Scheduled Status
rule is enabled, the pending changes are committed; the order line is unscheduled upon confirmation by the user. Similarly, if a shipment has been created for the order line, the order line is removed from the shipment before the store associate can proceed to make any changes. ThegetCompleteOrderDetails
API is called to refresh the screen with the new delivery method. On click of Save, thechangeOrder
API is called to permanently apply the changes to the order.