Share via


StepwiseShipping

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

The StepwiseShipping pipeline component is used in the multiple-shipment shipping architecture to calculate shipping costs for shipments. The StepwiseShipping pipeline component can handle charging for shipping by weight, by quantity, or by price.

Note

Do not insert the StepwiseShipping pipeline component directly into a pipeline; it is run by the ShippingMethodRouter pipeline component.

Configuration Values

The ShippingMethodRouter component sets the following value in the Configuration dictionary before executing the StepwiseShipping component.

Key

Description

Mode

The shipping calculation mode. The options are:

0 - Use subtotal to calculate shipping.

1 - Use quantity to calculate shipping.

2 - Use weight to calculate shipping.

Values Read

The StepwiseShipping pipeline component reads the following values from the indicated dictionaries.

Key

Dictionary

Description

shipments._cy_shipping_total

Order

The shipping charges for each individual shipment.

item.quantity

Order

The quantity of the item.

TransactionConfigConnectionString

Context

The data connection string to the database containing the shipping rates.

shipments_to_process

Context

A SimpleList object of the shipments to process. Each shipment is represented by a dictionary.

The StepwiseShipping component also reads the following values for each item in each Shipment dictionary in the shipments_to_process SimpleList object.

Key

Description

_product_weight

Optional. The weight of an individual item. Needed only if weight is used to calculate shipping.

Quantity

Optional. The quantity of an individual item. Needed only if quantity is used to calculate shipping.

_cy_oadjust_adjustedprice

Optional. The subtotal for an item. Needed only if the subtotal is used to calculate shipping.

Values Written

The StepwiseShipping pipeline component writes the following values to the Order dictionary.

Key

Description

shipments._cy_shipping_total

The shipping charges for each individual shipment.

Remarks

The StepwiseShipping pipeline component goes through the list of shipments. For each shipment, it retrieves the shipping rate from the shipping rate table, and calculates the shipping according to the mode specified.

When you add a shipping method by using the Customer and Orders Manager, you must specify a shipping calculation mode. The StepwiseShipping pipeline component uses the shipping calculation mode to determine how to calculate shipping costs. The following table identifies that shipping calculation modes that Commerce Server provides.

Shipping Calculation Mode

Description

0

Use subtotal to calculate shipping.

1

Use quantity to calculate shipping.

2

Use weight to calculate shipping.

If you use weight to calculate shipping, all items must have a weight or the StepwiseShipping pipeline returns an error.

See Also

Other Resources

ShippingDiscountAdjust

ShippingMethodRouter

Pipeline Component Reference