WCS Ordering Process


In IBM WCS both cart and orders are managed in the same table for a user, a cart transitions through various states and this is used to identify the cart state.
For example a pending order would have orders.state as "P", while a submitted order will have ORDERS.state as "M"

Review following link for more information on Order state transition
http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/topic/com.ibm.commerce.developer.doc/refs/rosordstattran.htm

In general checkout flow supports both AJAX and non AJAX version of server side processing, review AJAX URL's defined in following OOB Struts configuration files for supported AJAX actions
/Stores.war/WEB-INF/struts-config-order-services.xml has all the AJAX versions of the command defined in it.

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

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

3. Shipping Page: 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

4. Payments Page: 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.htm


5. Review 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.

6. Submit Order: 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

Pituluik Media Blogger | Freelancer |Operations Manager | Marketing and Sales Manager | Lancer Evo 4 Community. Indonesian Bloggers Who Become Bloggers Because of Hobby. Feel free to connect with me on Social Media Instagram @alberandesko

0 Response to "WCS Ordering Process"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel