The OrderFulfiller is the interface to the fulfillment system through which all other systems communicate. Messages intended for any object within fulfillment are sent to the OrderFulfiller first. The OrderFulfiller calls the appropriate fulfillment pipeline, which forwards the message to the appropriate place. This section describes the functionality of the OrderFulfiller.

There is only one instance of the OrderFulfiller. Order fulfillment begins when the OrderFulfiller receives the SubmitOrder message containing an order. Three things happen when the OrderFulfiller receives the SubmitOrder message:

After sending the FulfillOrderFragment messages, OrderFulfiller relinquishes control of the order until the fulfiller has performed all necessary functions. The OrderFulfiller listens for all ModifyOrderNotification messages for events notifying it that the fulfiller is finished.

The following situations describe how the OrderFulfiller regains control of an order:

  • If the shipping group’s state is set to PENDING_MERCHANT_ACTION, the OrderFulfiller will set the order’s state to PENDING_MERCHANT_ACTION. The customer service representative or someone representing the merchant must change this state back to PROCESSING. The system should then be notified (through a ShippingGroupUpdate) message to reprocess each shipping group.

  • The shipping group’s state is set to NO_PENDING_ACTION after that shipping group is shipped to the customer. The OrderFulfiller checks if the order can be settled and cost of the order can be charged to the customer. This is done with a method in OrderFulfillmentTools called isOrderSetttleable. ATG Commerce allows orders to be settled at one of two points: after the first shipping group has shipped, or after all the shipping groups have shipped. This behavior can be configured through a property in the OrderFulfiller:


    The default value of this property is false. If the order can be settled, then the following method is called:

    protected void settleOrder(Order pOrder, List
          pModificationList) throws PaymentException

    This method uses the PaymentManager to debit each PaymentGroup in the order.

    After determining settlement, the OrderFulfiller uses the isOrderFinished method in OrderFulfillmentTools to determine if the order is complete. OrderFulfillmentTools.isOrderFinished returns true if all the shipping groups are in a NO_PENDING_ACTION state and all the PaymentGroups are in a SETTLED state. If the order is finished, the OrderFulfiller calls the following method:

    protected void finishOrder(Order pOrder, List

This sets the order into a NO_PENDING_ACTION state, indicating that all processing on this order is complete.

loading table of contents...