Canadian tax configuration
This tutorial demonstrates
how to load Canadian taxes into a WebSphere Commerce database and
test the taxes in the store using a modified JSP page. This is a sample
scenario you can follow the instructions and modify the rates to match
the current tax rates and settings. For more
information about changing the tax rates, see Updating the WebSphere Commerce tax configuration to match the current tax rate.
Before you begin
- Publish the consumer direct sample store.
- Download the zip file containing all the code related to this article and extract it to a temporary directory.
About this task
In this tutorial you will learn
how to perform the following steps:
- Add a JSP file to the consumer direct sample store
- Run the idresgen utility on the tax.xml file
- Run the massload utility on the resolved tax.xml file
- Complete a shopping flow for various jurisdictions following a tax matrix
Calculation Rule Assignments
The calculation
codes (in the CALCODE table) have been broken
up to represent the different Canadian tax categories: GST, PST, HST,
and QST. The significance of breaking up tax categories into isolated
calculation codes resolves complications resulting from having to
deal with multiple tax categories (GST, PST, HST and QST). This breakup
can be applied to any jurisdiction tax system such as the American
tax system where levels are distinguished by COUNTRY, TERRITORY, STATE,
CITY, LOCAL, SECONDARY STATE, SECONDARY LOCAL, and so on. Each jurisdiction
level may have their own isolated tax rate or exemption. The ship-to
address that qualifies for a particular order item resolves to a distinct
set of jurisdiction levels. For the example illustrated in this paper,
all Canadian tax rules have been defined by distinguished jurisdiction
level values. Four calculation codes created, each having a CALCODE.GROUPBY
value of 8 to allow for OrderItems with different shipping addresses
to be grouped separately. Each calculation code is then associated
with four tax categories. At a more fine-grained level, several calculation
rules are assigned for PST. The split for PST is as follows:
- Calculation rule for PST rate for Prince Edward Island jurisdiction
- Calculation rule for PST rate for Ontario jurisdiction
- Calculation rule for PST rate for Manitoba jurisdiction
- Calculation rule for PST rate for Saskatchewan jurisdiction
- Calculation rule for PST rate for British Columbia jurisdiction
The PST split allows for the calculation framework to represent the same Tax Category with different tax rates. See the testing matrix later in this document for a detailed breakdown.