Sunday, 20 March 2016

Order Management Subsystem in Websphere Commerce


www.tattvamasigroup.com

https://www.youtube.com/channel/UC4Eu5FMElRqUVZX7g8QV3iA/playlists

HOME

1.Orders
A typical order includes one or more products, billing and shipping addresses, payment details, and the total cost including shipping charges and taxes.

2.Order Management

The Order Management subsystem is a component of the WebSphere Commerce Server that provides shopping carts, order capture, order fulfillment, inventory, and payment function support.

Order Management is broadly divided into

1)Order Capture
2)Order processing
3)Inventory Processing
4)Payment Processing

2.1. Order Capture

Order capture provides functionality such as sales quotes and shopping carts and order submission. There are a number of ways to create shopcarts and submit orders, as described in the order mechanisms section.

2.2.Order processing
Order processing is responsible for the overall coordination of inventory allocation, payment processing, releasing the order to fulfillment and tracking order status.
2.3.Inventory processing
WebSphere Commerce supports four inventory systems: Available to promise (ATP), and non-ATP, No inventory, and external inventory. The interface to inventory is encapsulated by a single inventory task command, which in turn invokes either ATP or non-ATP task commands.
2.4.Payment processing
WebSphere Commerce Payments supports the use of payment plug-ins for offline or online payment processing.In addition, the subsystem deals with order management capabilities like

1)quick order or buy
2)scheduled orders
3)multiple pending orders
4)reorders
5)order splits or backorders
6)future orders

3.Inventory Allocation

WebSphere Commerce supports five inventory systems: Available to promise (ATP), non-ATP, no inventory, external inventory, and DOM inventory. The interface to inventory is encapsulated by a single inventory task command, which in turn invokes the appropriate task commands.

The five inventory systems apply to the following situations:
3.1.ATP inventory

Using the ATP inventory model, you can allocate stock from existing inventory or backorder from expected inventory. You can also obtain an estimated availability time for each order item after it is added into the shopping cart. The ATP also supports allocating stocks for future order processing.

3.2.Non-ATP inventory
The non-ATP inventory model supports inventory operations that are only based on existing on-hand inventory.

3.3.No inventory
The no inventory model assumes that all products have infinite quantities. When the products in a store are virtual products, digital downloadable products, or electronic assets, such as downloadable images or music, you can use this model.

The no inventory model has three typical characteristics that differentiate it from the other inventory models:
1.All products have unlimited available quantities. Any check of inventory always returns a positive result.
2.Since all products have infinite available quantities, all order items are successfully allocated after an 'allocate inventory' operation. Specifically, the INVENTORYSTATUS column of the ORDERITEMS table is always set to 'ALLC'.
3.The No inventory system does not support RTF (Release to Fulfillment), Pick batch, and Ship Confirmation. Order management functions can be supported by custom integration with an existing order management system.

3.4.External Inventory
External inventory is used to integrate WebSphere Commerce with external inventory systems. External inventory is the legacy inventory implementation model where WebSphere Commerce directly consumes the inventory information from an external system.

3.5.DOM inventory system

DOM inventory is used for WebSphere Commerce distributed order management integration. For the DOM inventory system,WebSphere Commerce calls outbound services to allocate inventory externally. Integration with Sterling Order Management is based on the DOM inventory model. The DOM inventory system differs from the external inventory model in the following ways:
1)The DOM inventory model supports the local inventory cache in WebSphere Commerce. The external inventory model does not support the use of the local inventory cache.
2)The DOM inventory model uses the new logical schema and outbound service interfaces. The external inventory model uses the legacy inventory outbound service interfaces.

4.Calculation codes for orders

Calculation codes represent ways of determining monetary amounts associated with OrderItems. The CalculationCode object and its associated CalculationMethod objects define how to calculate amounts such as price adjustments (coupons and discounts), shipping charges, and taxes.

The OrderCalculate and OrderPrepare commands determine which kinds of calculations should be performed by inspecting the STENCALUSG table. OrderCalculate will accept the `calculationUsageId' parameter, which will determine the kinds of charges calculated in OrderCalculate. (You can define additional kinds of calculations to be performed, and provide or extend the business logic associated with each kind of calculation.)

The default CalculationMethod objects determine which CalculationCode objects apply to the items in an Order by searching for attachment relationships in the CATENCALCD, CATGPCALCD, ORDCALCD, and ORDICALCD tables. They calculate their amounts and, in addition to quantitative attributes of the product such as weight, quantity, and price, they take into account the following attributes:

1)Calculation code
2)Member group membership
3)calculation scales
4)Start and end dates
5)Sequence in which calculations should be performed

5.Fulfillment centers
Stores use fulfillment centers as both inventory warehouses and shipping and receiving centers. One store can have one or many fulfillment centers.
WebSphere Commerce can designate a fulfillment center as being `Drop Ship'. This involves requesting a fulfiller to ship the items directly to the customer rather than from the seller's own fulfillment center. A fulfillment center requests a pick batch (a group of releases that are managed as a unit) for a specified fulfillment center and store. The default behavior is to group up to 25 releases in the pick batch. But even when fewer than 25 releases are present in the database, a pick batch will be created for those releases.
From a WebSphere Commerce Server perspective, a FulfillmentCenter object is separate from the Store object. It manages product inventory and shipping. To ship an order, the fulfillment center relies on a ShippingMode object that is specified by the customer. The ShippingMode object indicates the shipping carrier and method of shipping for fulfilling the customer's order.
In a fulfillment center, the ShippingArrangement object indicates that a Store object has arranged with a FulfillmentCenter object to ship products using a certain ShippingMode, within a certain time range. For example: a store has an arrangement with its fulfillment center to ship an order within 24 hours if the customer selects an express shipping option.

6.Pricing and offers
Offers present different prices for the same product or SKU to different customers. In WebSphere Commerce, an offer is also known as a trading position. An offer represents the price of a catalog entry and criteria that the customer must satisfy in order to pay that price.
The Offer object has a quantity range attribute that specifies the minimum or maximum quantity that can be sold in an order under the available offer. The Offer object also indicates a date range and the member groups of the trading position container (price list).
An Offer object is part of a TradingPositionContainer (PriceList), which is owned by a member. A TradingPositionContainer contains TradingPositions. It can be made available to all customers, or only to customers in certain groups by using the trading agreements or contracts. There are three kinds of price lists:

S:Standard price list which contains the base prices for the products in the store catalog.

C:Custom price list which specifies the list of products and their customized prices.

E:Custom price list which specifies the list of products and their customized prices, but improves performance during maintenance.

7. WCS Order flow Process

7.1.Add To Cart

User is browsing the site as anonymous, guest or authenticated user and adds an item from browse pages to cart

You can call the OOB non AJAX version "/OrderChangeServiceItemAdd" which is mapped as follows in struts-config

<action parameter="com.ibm.commerce.orderitems.commands.OrderItemAddCmd" path="/OrderChangeServiceItemAdd" type="com.ibm.commerce.struts.BaseAction">
</action>
If you want to use AJAX version use "/AjaxOrderChangeServiceItemAdd" command

<action parameter="order.addOrderItem" path="/AjaxOrderChangeServiceItemAdd" type="com.ibm.commerce.struts.AjaxComponentServiceAction">
</action>
Refer following link for various AJAX actions supported by this Fascade
http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/topic/com.ibm.commerce.madisons-starterstore.doc/refs/rsmmadisonorderservices.htm

Both AJAX and non AJAX finally make use of following implementation This uses following OOB controller command
com.ibm.commerce.orderitems.commands.OrderItemAddCmdImpl
 - Extends com.ibm.commerce.orderitems.commands.OrderItemBaseCmdImpl


Any customization would require extension of OOB OrderItemAddCmdImpl

User clicks on add to cart it calls the OrderFacadeClient addOrderItem() method From there OrderItemAddCmd will be invoked. OrderItemAddCmd will in turn call the OrderCalculate and from there OrderItemDisplayCmd is invoked. OrderItemDisplayCmd will call the OrderItemDisplayView which will display the shopping cart with the newly added item.

7.2.View Cart

User clicks on View Cart Page

At this step you want to display guest the cart content with list of order items with pending order status

You can use following OOB Struts action url "/OrderItemDisplay"
<action
    parameter="com.ibm.commerce.orderitems.commands.OrderItemDisplayCmd"
    path="/OrderItemDisplay" type="com.ibm.commerce.struts.BaseAction">
    <set-property property="https" value="0:1"/>
    <set-property property="authenticate" value="0:0"/>
</action>
Review following link for more details on optional and mandatory input parameters for this URL
http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/topic/com.ibm.commerce.developer.doc/refs/rosorderitemdisplay.htm

This action internally makes use of following OOB controller command    
com.ibm.commerce.orderitems.commands.OrderItemDisplayCmdImpl
Control the various calculations that needs to be performed before you display the Cart Page
E.g by passing following in URL calculationUsageId=-1&calculationUsageId=-2&calculationUsageId=-7 you are triggering calculation of Tax, discount, Shipping


Any customization would require extension of OOB OrderItemDisplayCmdImpl

7.3.Update Cart Item
User changes quantity and  clicks on update button it will call the  OrderFacadeClient updateOrderItem() method.From there OrderItemUpdateCmd will be invoked. OrderItemUpdateCmd will in turn call the OrderCalculate and then OrderItemDisplayCmd is invoked. OrderItemDisplayCmd will call the OrderItemDisplayView which will display the modified shopping cart.

7.4.Delete Cart Item
User clicks on delete control will go to OrderFacadeClient updateOrderItem() method .From there OrderItemUpdateCmd will be invoked. OrderItemUpdateCmd will inturn call the OrderCalculate and from there OrderItemDisplayCmd is invoked. The OrderItemDisplayCmd will call the OrderItemDisplayView which will display the modified shopping cart.

7.5.Checkout

User clicks on checkout and is navigated to shipping page

        <action
            parameter="com.ibm.commerce.orderitems.commands.OrderItemUpdateCmd"
            path="/OrderItemUpdate" type="com.ibm.commerce.struts.BaseAction">
            <set-property property="https" value="0:1"/>
            <set-property property="authenticate" value="0:0"/>
        </action>
   
http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/topic/com.ibm.commerce.developer.doc/refs/rosorderitemupdate.htm


This action used following OOB command com.ibm.commerce.orderitems.commands.OrderItemUpdateCmdImpl
User clicks on checkout it will call OrderFacadeClient updateOrderItem() method.From there  OrderItemUpdateCmd will be invoked. OrderItemUpdateCmd will in turn call the OrderCalculate and then forward to  the OrderShippingBillingView.

7.6.Enter Shipping\Billing Address
User enters shipping address and submit then control will go to OrderFacadeClient updateOrderShippingInfo() method. From there OrderItemUpdate command is called.OrderItemUpdate will call the OrderCalculate and will forward to OrderShippingBillingView.

7.7.Enter Payment Information

User navigates to payments page

This flow typically includes adding single/multiple payment information to an order, once the payment information is submitted
we can use following command for processing before forwarding user to review order screen

The OOB /OrderProcess should be used for this purpose,
it is implemented by following OOB command com.ibm.commerce.order.commands.OrderPrepareCmdImpl

Pass appropriate payment parameters to add the payment information entered to an Order.

http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/topic/com.ibm.commerce.developer.doc/refs/rosorderprocess.

User Enters Payment information and press confirm order ,the client calls the order facade client method prepareOrder().This is followed by OrderFacdeClient addPaymentInstruction() method that invokes PIAddCmd and then forward to OrderSummaryView.If user updates the payment information OrderFacdeClient updatePaymentInstruction() method is called which inturn will call the PIEditCmd and will forward to OrderSummaryView. If user remove the payment information orderFacdeClient removePaymentInstruction() method is called which in turn will call the PIRemoveCmd and will forward to OrderSummaryView.

7.8.Place\Submit Order

User navigates to review order page and submits order
The OOB /OrderProcess should be used for final Order submission, as mentioned in previous step this URL
implements OOB com.ibm.commerce.order.commands.OrderProcessCmdImpl command.

 Order Submission and post processing

Once an Order is submitted OrderProcessCmdImpl Calls RaiseOrderEventCmd to raise ORDER_SUBMISSION_EVENT
com.ibm.commerce.order.event.RaiseOrderSubmitEventCmd

any customization to this command would require extension of
com.ibm.commerce.order.event.RaiseOrderSubmitEventCmdImpl command which is the default implementation.

com.ibm.commerce.order.event.ProcessOrderSubmitEventCmdImpl which is default implementation of OOB
com.ibm.commerce.order.event.ProcessOrderSubmitEventCmd listens to ORDER_SUBMISSION_EVENT and takes care
of transferring the order to the external system.


This is the appropriate command for customization If you need any customization in Order XML which is posted to external system

User clicks on place or submit order OrderFacadeClient processOrder() method will be called. This in turn will call the Order Process command and will forward to the OrderShippingBillingConfirmationView.

8.Complete Order Flow commands are listed below

8.1.OrderItemAddCmdImpl

public class OrderItemAddCmdImpl
extends OrderItemBaseCmdImpl
implements OrderItemAddCmd
Adds items or products to the list of items that are to be shipped.
This command accepts enumeration type of parameters. That is, it accepts parameterName_i=parameterValue.

For example, to add three catalog entries with id 15, 16, and 17 to the OrderItems, you can pass catEntryId_1=15&catEntryId_2=16&catEntryId_3=17 to the command. If you call the individual set method to pass the above parameters, you need to create a hashtable and add the following to the hashtable:

      hashtable.put(new Integer(1), new String("15"));
      hashtable.put(new Integer(2), new String("16"));
      hashtable.put(new Integer(3), new String("17"));


then passed the hashtable to the method setCatEntryId(Hashtable).

This command adds items or products to the shopping cart. OrderItemAddCmdImpl calls the below commands in this sequence.
1)ResolveSkuCmdImpl
2)OrderCreateCmd
3)ResolveOrderItemPriceCmd
4)UpdateShippingAddressCmd
5)ValidateTradingPaymentCmd
6)DoInventoryActionCmd(CheckInventory)
7)UpdateShipInfoCmdImpl
8)RaiseOrderEventCmdImpl
9)OrderCalculateCmd
10)ExtendedOrderItemProcessCmd

1)ResolveSkuCmdImpl
This command finds the type of catalog entry. If it is a package then PackageResolveSkuCmd is called. If it is a product then this command determines the attributes required to resolve the product to an orderable item. If attributes are missing then ErrorMissingAttributeErrorCmd or ErrorProductAttributeErrorCmd is called.

2)OrderCreateCmd
This order command is used to create an order container with no line items.

3)ResolveOrderItemPriceCmd
This command is used to resolve price for a group of order items from one order.This command calculates the best price for the input OrderItems. It calls GetContractUnitPriceCmd or GetContractSpecialPriceCmd task command to calculate the price. If GetContractUnitPriceCmd/GetContractSpecialPriceCmd is not available, it calls GetBaseUnitPriceCmd/GetBaseSpecialPriceCmd. If input trading agreements and/or offers are specified, they will be used providing they are valid. Otherwise, eligible trading agreements will be obtained.

4)UpdateShippingAddressCmd
This Order task command is used to update the shipping address for the passed order items

5)ValidateTradingPaymentCmd
ValidateTradingPaymentCmd is called  to validate that the payment method is compatible with the trading agreement

6)DoInventoryActionCmd(CheckInventory)
If doInventory = Y, call DoInventoryActionCmd to update the fulfillment centers and check for available inventory

7)UpdateShipInfoCmdImpl
Call UpdateShipInfoCmd to update the shipping instructions, shipping account number and shipping charge type

8)RaiseOrderEventCmdImpl
Call RaiseOrderEventCmd to raise ORDERITEM_CREATION_EVENT or ORDERITEM_UPDATE_EVENT

9)OrderCalculateCmd
If the flag calculateOrder is set then Call OrderCalculateCmd to do calculations that are based on the calUsageIds passed in

10)ExtendedOrderItemProcessCmd
Call ExtendOrderItemProcessCmd to execute any customization logic


8.2.OrderItemUpdateCmdImpl

public class OrderItemUpdateCmdImpl
extends OrderItemBaseCmdImpl
implements OrderItemUpdateCmd
Add products or items to the order list or update the products and items in the existing order list.
This command can do all that OrderItemAdd command can do. In addition, it can also update products and items in the existing order list.

This command accepts enumeration type of parameters. That is, it accepts parameterName_i=parameterValue.

For example, to add three catalog entries with id 15, 16, and 17 to the OrderItems, you can pass catEntryId_1=15&catEntryId_2=16&catEntryId_3=17 to the command. If you call the individual set method to pass the above parameters, you need to create a hashtable and add the following to the hashtable:

      hashtable.put(new Integer(1), new String("15"));
      hashtable.put(new Integer(2), new String("16"));
      hashtable.put(new Integer(3), new String("17"));

then passed the hashtable to the method setCatEntryId(Hashtable).
The command will execute each enumeration group one by one. But the order of execution is not guaranteed. So if you pass two orderItemId with the same number, the result is unpredictable.


When updating the order item with quantity = 0, this order item will be deleted. If you delete the same order item twice in one transaction, it will throw a remote exception.

OrderItemUpdateCmdImpl command updates order items in an existing Order.OrderItemUpdateCmdImpl   calls the following commands in sequence

1)DoInventoryActionCmd(Reserve Inventory)
2)AddOrderItemComponentsCmd
3)ResolveOrderItemPriceCmd
4)UpdateShippingAddressCmd
5)ValidateTradingPaymentCmd
6)DoInventoryActionCmd(Check Inventory)
7)updateShipInfoCmdImpl
8)RaiseOrderEventCmdImpl
9)OrderCalculateCmd
10)ExtendedOrderItemProcessCmd

1)DoInventoryActionCmd(Action : Reserve Inventory)
In ATP inventory systems it calls the command ReserveInventoryCmd. In Non-ATP inventory systems calls the UpdateInventoryCmd.

ReserveInventoryCmd
This command get the quantity available for the requested item, store, and fulfillment center.This command check to make sure that the quantity available is greater or equal to the quantity requested.If it is successful,obtain the ITEMFFMCTR row and increment the itemffmctr.qtyreserved by the requested quantity,then insert a new row into the INVRESERVE table.

UpdateInventoryCmd
UpdateInventory let you update inventory for items. There are two ways to update inventory.Set one or list of order items by calling setOrderItem method.Set one catalog entry by calling setCatEntryId, setQuantity and setStoreId methods. Method setQuantityMeasure is optional.

2)AddOrderItemComponentsCmd
This command creates the components that are associated with a composite order item. It derives the component list in one of two ways
1.    By making use of a  list of CatalogEntries that are passed in
2.    Get the list of components by finding all of the unassigned components through the given configuration id.

3)ResolveOrderItemPriceCmd
This command is called to calculate the best price and update order total.

4)UpdateShippingAddressCmd
This Order task command is used to update the shipping address for the order items passed in the request.

5)ValidateTradingPaymentCmd
ValidateTradingPaymentCmd is called to validate that the payment method is compatible with the trading agreement.
6)DoInventoryActionCmd(Check Inventory)

Check Inventory allows us to check inventory for items. There are two ways to check inventory.
1)      Set one or list of order items by calling setOrderItem method.
2)      Set one catalog entry by calling setCatEntryId, setQuantity and setStoreId methods. Method setQuantityMeasure is optional.

7)updateShipInfoCmdImpl
Call UpdateShipInfoCmd to update the shipping instructions, shipping account number and shipping charge type.

8)RaiseOrderEventCmdImpl
Call RaiseOrderEventCmd to raise ORDERITEM_CREATION_EVENT or ORDERITEM_UPDATE_EVENT.

9)OrderCalculateCmd
If the flag calculateOrder is set Call OrderCalculateCmd to do calculations that are based on the calUsageIds passed in.

10)ExtendedOrderItemProcessCmd
Call ExtendOrderItemProcessCmd to execute any customization logic.

8.3.OrderItemDeleteCmdImpl

public class OrderItemDeleteCmdImpl
extends OrderBaseCmdImpl
implements OrderItemDeleteCmd

This is the default implementation of the OrderItemDeleteCmd controller command.

This command delete order items based on orderItemId or catEntryId specified.OrderItemDeleteCmdImpl calls below commands in sequence.
1)DoInventoryActionCmd(ReserveInventory)
2)PrepareShipInfoCmd
3)ReolveOrderItemPriceCmd
4)OrderCalculateCmd

1)DoInventoryActionCmd(Action : Reserve Inventory)
In ATP inventory systems it calls the command reserveInventoryCmd. In Non-ATP inventory systems calls the updateInventoryCmd.
ReserveInventoryCmd
Get the quantity available for the requested item, store, and fulfillment center.Check to make sure that the quantity available is greater or equal to the quantity requested.If the above edit is successful,obtain the ITEMFFMCTR row and increment the itemffmctr.qtyreserved by the requested quantity,then insert a new row into the INVRESERVE table.
updateInventoryCmd
UpdateInventory let you update inventory for items. There are two ways to update inventory.Set one or list of order items by calling setOrderItem method.Set one catalog entry by calling setCatEntryId, setQuantity and setStoreId methods. Method setQuantityMeasure is optional.

2)PrepareShipInfoCmd
Perform a verification between the SHIPINFO table and the ORDERITEMS table and check for orphaned SHIPINFO records. Any orphaned records will be removed.

3)ReolveOrderItemPriceCmd
This command is used to resolve price for a group of order items from one order.This command calculates the best price for the input OrderItems.This command calls the GetContractUnitPriceCmd/GetContractSpecialPriceCmd task command to calculate the price.
If GetContractUnitPriceCmd/GetContractSpecialPriceCmd is not available, it calls the GetBaseUnitPriceCmd/GetBaseSpecialPriceCmd. If input trading agreements and/or offers are specified, they will be used providing they are valid. Otherwise, eligible trading agreements will be obtained.

4)OrderCalculateCmd
If the flag calculateOrder is set Call OrderCalculateCmd to do calculations that are based on the calUsageIds passed in.

8.4.OrderPrepareCmd (Controller Command)

public interface OrderPrepareCmd
extends ControllerCommand

This command prepares an order by determining prices, discounts, shipping charges, shipping adjustment, and taxes for an order. If an order reference number is not specified, all current pending orders will be prepared for the current customer at the given store. The default implementation of this command is OrderPrepareCmdImpl. The OrderPrepareCmd URL is mapped to this controller command.

Prepares an order by determining its prices, discounts, shipping charges, and taxes. If an order reference number is not specified, all current pending orders will be prepared for the current customer at the given store. The remerge, merge, check, allocate, backorder and reverse parameters are applicable only if ATP inventory is enabled (STORE Table INVENTORYSYSTEM column value -1).

OrderPrepareCmd  calls the following commands in sequence

1.PrepareOrderCmd(Task Command)
2.ValidateShippingAdjustmentCmd

PrepareOrderCmd(Task Command)
PrepareOrderCmd task command prepares an order by determine its prices, discounts, shipping charges, and taxes for an order. This command will also lock the order to indicate that it is ready for submission for the Order Process command. The lock can be reset either by expiry, by changing the Order during update or delete operations or by calling OrderUnlockCmd.The expiry period for a lock is stored in STORE table column QUOTEGOODFOR.
This command removes generated order item based on the prepare flags setting (PREPARE FLAG = 1 which means generated) in ORDERITEMS table. This command will also check if all order items are buyable and throw exceptions if they are not buyable. UpdateShippingAddressCmd is called to find the appropriate shipping address for all the order items and update them for each order item. For a dynamic kit ValidateDynamicKitConfigurationCmd is called to do validation. ResolveOrderItemPriceCmd is called to calculate the best price and update order total. DoInventoryActionCmd is called for inevntoy check and allocation .CalculateOrderCmd is called for calculation of charges.

ValidateShippingAdjustmentCmd
This Order task command is used to find any inconsistencies in the order's shipping adjustments. If new items have been added then the value returned from hasShoppingCartChanged() will be true else it will be false.

8.5.OrderProcessCmd (Controller Command)


public interface OrderProcessCmd
extends ControllerCommand
This Order controller command is used to submit an order. The order must have been locked by OrderPrepare. Once the OrderProcess command begins running, the order cannot be cancelled with OrderCancel.
The default implementation of this command is OrderProcessCmdImpl.

The OrderProcessCmd URL is mapped to this command.

This command submits an order for processing. The order must be locked by the Order Prepare command before calling this command.
OrderProcessCmd calls the following commands in the below sequence

1)PIAddCmd
This controller command is used to create a new payment method to an order.
2)ValidatePaymentMethodCmd
This command checks whether the payment method to be added comply with the Buy Online Pick In Store (BOPIS) rules.
3)ProcessOrderCmd
The ProcessOrderCmd task command makes the ProcessOrder server request.
4)RaiseOrdereventCmd
The RaiseOrderEventCmd task command is used to raise an order related event

ProcessOrderCmd (Task Command)

ProcessOrderCmd makes the ProcessOrder server request.ProcessOrderTaskCmd calls commands in sequence as shown below.

1)PreProcessOrderCmd
If Unified Business Flow is not enabled or is enabled and approval is needed then this command is called.
2)DoInventoryActionCmd(getATPParameter)
Call DoInventoryActionCmd to update inventory.
3)UpdateSependingLimitCmd
Call UpdateSpendingLimitCmd to check the trading agreement spending limit and validate the PO number.
4)PrimePaymentCmd
Call PrimePaymentCmd (EDP command) to guarantee that the customer has funds to pay for the order.
5)RaiseOrderSubmitEventCmd
Call RaiseOrderSubmitEventCmd to raise the order submit event.
6)PersisitOrdersWithMemberGroupIdsForCurrentUserCmd
PersistOrdersWithMemberGroupIdsForCurrentUserCmd (Marketing command) is called If OrdersMgpPersistListener is enabled in order to persist the orders_id with the member group id.
7)ExtOrderProcesCmd
ExtOrderProcessCmd command is called  to execute  any customization logic during order process flow.
8)TransferOrderCmd
This command confirms successful transfer of an order to an external system. This command is called to generate the outbound Order Create Message.
9)OrderMessagingCmd
This command generates the outbound Order Create Message "Report_NC_PurchaseOrder".

9.Tables Involved with Order Subsystem

9.1.ORDERS
Each row in this table represents an order in a store.

9.2.SUBORDERS
Each row of this table contains subtotals of amounts for all the OrderItems of an Order with the same shipping address.



9.3.ORDADJUST
Each row of this table represents an OrderAdjustment.

9.4.ORDIADJUST
Each row in this table represents an OrderItemAdjustment.

9.5.ORDADJTXEX
Each row of this table indicates that an OrderAdjustment is exempt from taxation of a particular TaxCategory. For example, an "after tax rebate" can be represented as a negative OrderAdjustment that is exempt from taxation of all TaxCategories.

9.6.ORDCALCD
Each row of this table indicates to the CalculationCodeCombineMethod that a CalculationCode is directly attached to all OrderItems in an Order. The order directCalculationCodeAttachment flag in ORDERITEMS.PREPAREFLAGS is 1.

9.7.ORDERITEMS
Each row of this table represents an order item in an order.

9.8.ORDPROMOCD
This table contains promotion codes captured for an order.
           
9.9.CPENDORDER
Each row of this table indicates that an order is marked as current for a customer in a store, if its status is "P" (Pending).

9.10.ORDPAYINFO
Each row in this table holds a name-value pair representing payment information for a particular Order. Values added to this table are encrypted when the "Instance/PDIEncrypt" configuration flag is "on".

9.11.ORDICALCD
Each row of this table indicates to the CalculationCodeCombineMethod that a CalculationCode is directly attached to an OrderItem. The attachment is not effective unless the directCalculationCodeAttachment flag in ORDERITEMS.PREPAREFLAGS is 1.

9.12.ORDTAX
Each row of this table represents the total of the tax amounts of a particular TaxCategory for all the OrderItems in an Order.

9.13.SUBORDTAX
Each row of this table specifies the tax amount of a particular TaxCategory for all the OrderItems with the same shipping address as the SubOrder.

9.14.ORDITAX
Each row of this table contains a tax amount of a particular TaxCategory, for an OrderItem. By default, WebSphere Commerce does not save any data in this table. However tax amounts are aggregated by TaxCategory in the SUBORDTAX and ORDTAX tables.

9.15.ORCOMMENT
The table stores the comments for an order entered by a customer service representative.

9.16.ORDERHIST
This table is used to save order snapshots in XML format.

9.17.ORDSTAT
This table contains information about the status of an order for an Order Status Update inbound message. Each row in the table contains information about a single order.

9.18.ORDUSERS

Contains information about users that worked with an order.


www.tattvamasigroup.com

https://www.youtube.com/channel/UC4Eu5FMElRqUVZX7g8QV3iA/playlists
























11 comments:

  1. Nicely described the concept of order management and processing.
    You can use Saas based online Order management system for centralizing all order and purchase management for your multiple online stores.
    Orderhive is the best software for order and inventory management.

    ReplyDelete
  2. great blog to get an understanding of the basic order flow in wcs.

    ReplyDelete
  3. A large portion of the web journals imagine themselves as most usable and refreshed websites with new data yet at some point truth may distinctive. I need to share a few actualities identified with this subject which will help individuals to improve their aptitudes. Freight Management Software

    ReplyDelete
  4. Great Job. You should have combined order status also with each step.

    ReplyDelete
  5. Great Post! Thanks for sharing such amazing information with us. Please keep sharing.
    B2B Logistics Services

    ReplyDelete