The OrderFulfillerModificationHandler class extends the ModificationHandler interface. It is configured to handle the ModifyOrder and ModifyOrderNotification messages for the OrderFulfiller class. The OrderFulfiller class contains the ModificationHandler property, which deals with both ModifyOrder and ModifyOrderNotification messages. To change the handling behavior of ModifyOrder and ModifyOrderNotification messages, extend the OrderFulfillerModificationHandler class and change the ModificationHandler property of OrderFulfiller to point to the new class.
The default implementation deals with the following ModifyOrder modifications:
Remove an order by sending a
ModifyOrdermessage containing a Modification of type REMOVE. TheOrderFulfillerreceives this message. If the order and its shipping group are not in a NO_PENDING_ACTION state, thenModifyOrdermessages are sent to the various fulfillers handling the shipping groups. Every fulfiller who can cancel the shipping group responds by setting the state of the shipping group to PENDING_REMOVE. If all of the shipping group states are changed to PENDING_REMOVE, then the order state changes to REMOVED and all of the shipping group states can be changed to REMOVED. An order cannot be cancelled if any of its shipping groups have been shipped. If you attempt aGenericRemovemodification on an order that cannot be removed (for example, if one of the shipping groups in the order has shipped) then the order is set to PENDING_MERCHANT_ACTION.Notify the fulfillment system that a shipping group has shipped by sending a
ModifyOrdermessage with aGenericUpdatethat changes the state of the shipping group from PENDING_SHIPMENT to NO_PENDING_ACTION. TheOrderFulfillerwill receive this message and forward it to the responsible fulfiller. For more information, see the GenericUpdate Class section.
The default implementation deals with the following ModifyOrderNotification modifications:
Shipping group’s state changes to NO_PENDING_ACTION, PENDING_MERCHANT_ACTION, PENDING_REMOVE, or failure to change to PENDING_REMOVE.
When a customer updates a shipping group, the
OrderFulfillersends aModifyOrderNotificationmessage to the fulfiller responsible for this shipping group. This forces a reprocessing of the shipping group.
The Core Commerce default implementation settles payment on first or last shipment of the shipping groups. You can configure when to charge payment in the SettleOnFirstShipment property of the OrderFulfiller. By default, charging takes place after the shipment of the last shipping group. The settlement is for the total value of the order. If settlement occurs on first shipment and a shipping group that has not been shipped is cancelled, a credit must be issued for the items that were paid for but never shipped.
The extendible infrastructure allows all types of ModifyOrder messages and ModifyOrderNotifications depending on your business requirements.

