Setting up a fixed shipping charge for a category based on jurisdictions

Technote (FAQ)


Question

How do I set up a fixed shipping charge for a category based on jurisdictions? For example, I want to charge $10 for Category A in Zone 1, $40 for Category A in Zone 2, $5 for Category B in Zone 1, and $20 for Category B in Zone 2.

Answer

Here is a sample requirement:

Product or Item Jurisdiction Shipping Charge Rule
Category A Zone1 $10
Category A Zone2 $40
Category B Zone1 $5
Category B Zone2 $20

In order to achieve this requirement, you will need to define two calculation codes--one for each category. The calculation codes are attached to different catalog groups in the CATGPCALCD table. Each calculation code is associated with two calculation rules and two calculation scales to satisfy the jurisdiction criteria for Zone 1 and Zone 2.

Here is an example for the combination needed for Category A.

In your store (storeent_id = 10001), you have one Category A (catgroup_id = 20001). The shipping charge is $10 US dollars fixed for Zone 1 (JURSTGROUP_ID = 80101) and $40 US dollars fixed for Zone 2 (JURSTGROUP_ID=80102). You want to use Regular Delivery Item shipping (shipmode_id = 10003).

The following assumes you already have the SHIPMODE table properly set up with the shipping mode information.

Ensure that you have the corresponding entries for Zone 1 and Zone 2 in the JURST, JURSTGROUP, and JURSTGPREL tables.

a. Insert an entry in the CALSCALE table:

CALSCALE_ID QTYUNIT_ID CODE DESCRIPTION STOREENT_ID CALUSAGE_ID SETCURR CALMETHOD
10001 C62 10001 'Regular Delivery-CategoryA for zone1' 10001 -2 'USD' -28

CALSCALE_ID QTYUNIT_ID CODE DESCRIPTION STOREENT_ID CALUSAGE_ID SETCURR CALMETHOD
10002 C62 10001 'Regular Delivery-CategoryA for zone2' 10001 -2 'USD' -28

In the entry, QTYUNIT_ID is C62 which is the default unit for the item. The CALMETHOD_ID -28 means that the range and rate are quantity-based. For instance, there is a $5 shipping charge per item.

For the CALSCALE table, add the corresponding description in CALSCALEDS table with appropriate language_id.


b. In the CALRANGE table:

CALRANGE_ID CALSCALE_ID CALMETHOD_ID RANGESTART CUMULATIVE FIELD1 FIELD2 FIELD3
20001 10001 -33 0.00000 0 NULL NULL NULL

CALRANGE_ID CALSCALE_ID CALMETHOD_ID RANGESTART CUMULATIVE FIELD1 FIELD2 FIELD3
20002 10002 -33 0.00000 0 NULL NULL NULL

In the entry, CALMETHOD_ID = -33 represents a fixed amount, such as a flat $5 charge.


c. In the CALRLOOKUP table:

CALRLOOKUP_ID SETCCURR CALRANGE_ID VALUE
30001 'USD' 20001 10

CALRLOOKUP_ID SETCCURR CALRANGE_ID VALUE
30002 'USD' 20002 40


d. In the CALCODE table:

CALCODE_ID CODE CALUSAGE_ID STOREENT_ID GROUPBY TXCDCLASS_ID PUBLISHED
50000 'Shipping Code for Category A' -2 10001 0 NULL 1
SEQUENCE COMBINATION LASTUPDATE CALMETHOD_ID CALMETHOD_ID_APP CALMETHOD_ID_QFY FIELD1
0 0 NULL -23 -24 -22 NULL
DESCRIPTION
NULL

CALMETHOD_ID = -22, -23, -24 are the default methods to calculate a shipping code.

Here you also need to enter the corresponding information for this CALCODE in CALCODEDSC for the appropriate language_id.


e. In the CALRULE table:

CALRULE_ID CALCODE_ID STARTDATE TAXCGRY_ID ENDDATE SEQUENCE COMBINATION CALMETHOD_ID
60000 50000 NULL NULL NULL 0.0 2 -27
CALMETHOD_ID_QFY FIELD1 FIELD2 FLAGS IDENTIFIER OPTCOUNTER
-26 NULL NULL 1 60000 NULL

CALRULE_ID CALCODE_ID STARTDATE TAXCGRY_ID ENDDATE SEQUENCE COMBINATION CALMETHOD_ID
60001 50000 NULL NULL NULL 0.0 2 -27
CALMETHOD_ID_QFY FIELD1 FIELD2 FLAGS IDENTIFIER OPTCOUNTER
-26 NULL NULL 1 60001 NULL

CALMETHOD_ID = -26, -27 are the default methods to calculate a shipping rule.

The CALRULE.FLAGS is equal to 1, which means that this calculation is specific to some fulfillment options defined in the SHPJCRULE table including SHIPMODE_ID, JURSTGROUP_ID, FFMCENTER_ID, etc.


f. In the CRULESCALE table:

CALSCALE_ID CALRULE_ID OPTCOUNTER
10001 60000 NULL

CALSCALE_ID CALRULE_ID OPTCOUNTER
10002 60001 NULL


g. In the SHPJCRULE table:

CALRULE_ID SHPJCRULE_ID FFMCENTER_ID JURSTGROUP_ID PRECEDENCE
60000 10001 NULL 80101 0.0

CALRULE_ID SHPJCRULE_ID FFMCENTER_ID JURSTGROUP_ID PRECEDENCE
60001 10002 NULL 80102 0.0

The above assumes you already have the JURST and JURSTGROUP tables configured properly.


h. In the CATGPCALCD table:

STORE_ID CATGPCALCD_ID TRADING_ID CATGROUP_ID CALCODE_ID OPTCOUNTER CALFLAGS
10001 70001 NULL 20001 50000 1 NULL

In this table, the catgroup_id 20001 (Category A) is mapped with the calcode_id 50000, assuming you already have Category A configured as catgroup_id = 20001.

These examples are based on the assumption that you are using the CALMETHOD table configuration provided with WebSphere Commerce, which contains all of the default calculation methods.

For additional information, refer to the following document that describes how to import XML files to load the data and achieve similar shipping configurations: Advanced shipping configuration with the WebSphere Commerce Calculation Framework.

Rate this page:

(0 users)Average rating

Document information


More support for:

WebSphere Commerce Enterprise
Shipping

Software version:

6.0, 7.0

Operating system(s):

AIX, IBM i, Linux, Solaris, Windows, i5/OS

Software edition:

Enterprise

Reference #:

1619061

Modified date:

2012-12-10

Translate my page

Machine Translation

Content navigation