ShippingMethodRouter

Use the ShippingMethodRouter pipeline component as part of the multiple-shipment shipping architecture to look up and run the components to process the shipments and calculate the shipping total for the whole order.

Note

Shipping components that are designed to be run by the ShippingMethodRouter pipeline component should never be put directly in a pipeline.

Intended use: Order Processing pipeline, Shipping stage.

Configuration Values

None.

Values Read

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

Key

Dictionary

Description

shipments

Order

A SimpleList object of dictionaries, one shipment per dictionary.

shipments._cy_shipping_total

Order

The shipping totals for each shipment.

CacheManager

Context

A CacheManager Object that is used for retrieving the cached set of discounts eligible for application.

Values Written

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

Key

Description

_cy_shipping_total

The total shipping charges for all shipments in the order.

Remarks

The shipping pipeline components (other than the Splitter pipeline component) are run by the ShippingMethodRouter pipeline component.

The ShippingMethodRouter pipeline component steps through the list of shipping methods. If there are shipments that use a given method, the ShippingMethodRouter pipeline component passes the shipments to the shipping component, and runs the component. The individual shipping components calculate the total shipping charges for the shipments passed to them. When all the shipments have been processed, the ShippingMethodRouter pipeline component calculates the total of all the shipping charges.

The ShippingMethodRouter pipeline component instantiates only the components that it will use.

See Also

Other Resources

Shipping Objects

What Is the Multiple-shipment Shipping Architecture?

ShippingDiscountAdjust

StepwiseShipping