Tax information flow

The following describes the flow of tax information:

  1. The customer uses a browser to access the merchant's online store, browse the store catalog, view products on the product display pages, and add items to the shopping cart.
  2. If the customer has the option to view the tax at the beginning of the shopping experience, prior to adding the product to the shopping cart, the tax is calculated based on the customer's registration information or the merchant's location, and the tax is displayed on the product information page. This option depends on the specific merchant's store configuration.
  3. When the customer views the shopping cart page after adding one or more items to the shopping cart, a request is sent to the Web server which calls the OrderPrepareCmd controller command, implemented by OrderPrepareCmdImpl.
  4. The OrderPrepareCmd command calls the ApplyCalculationUsageCmd task command for the tax calculation usage. Its default implementation class, ApplyCalculationUsageCmdImpl, is overridden by the ApplyCalculationUsageTIKCmdImpl implementation class (part of the Tax Integration Interface), and does the following:
    • For each calculation code to be applied to the items in the order, it creates a TaxOrderCmd task command, which will instantiate the configured implementation, based on entries in the WebSphere Commerce CMDREG table. There is no default implementation.
    • For every order item in the shopping cart, it creates a TaxOrderItemCmd task command, which will instantiate the configured implementation, based on entries in the WebSphere Commerce CMDREG table. There is no default implementation. The TaxOrderCmd addOrderItem method adds each TaxOrderItemCmd command to the TaxOrderCmd command. During this process, the audit flag for each order item is set to off, by default.
    • Calls the TaxOrderCmd calculateTaxes method to calculate the tax.
    • Updates the ORDERITEMS table in WebSphere Commerce with the tax, using WebSphere Commerce's OrderItemAccessBean. The tax may be displayed on the shopping cart page to the customer.
    • Passes tax amounts to OrderPrepareCmd command to update the order tax total and subtotal.
  5. If the customer submits the items in the shopping cart for purchase, another request is sent to the Web server, but this time, to call the OrderProcess task command.
  6. The OrderProcess task command calls the TaxCalculationUsageTIKCmd task command for setting the audit flag. Its default implementation class, CalculationCmdImpl, is overridden by the TaxCalculationUsageTIKCmdImpl implementation class (part of the tax integration interface). The TaxCalculationUsageTIKCmd implementation class performs the same functions as ApplyCalculationUsageTIKCmdImpl except that for every order item, the audit flag is set to on.
  7. The tax is calculated and the OrderItemAccessBean updates the ORDERITEMS table. The tax may be displayed on the checkout page to the customer.

Feedback