ShippingMethodRouter
Use the ShippingMethodRouter 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 entire order.
Note
- Shipping components designed to be run by the ShippingMethodRouter component should never be placed directly in a pipeline.
Intended use: Order Processing pipeline, Shipping stage.
Configuration Values
None.
Values Read
The ShippingMethodRouter 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 individual shipment. |
CacheManager |
Context | A reference to a CacheManager object used to handle the shipping method data. |
Values Written
The ShippingMethodRouter component writes the following values to the Order dictionary.
Key | Description |
_cy_shipping_total |
The total shipping for all shipments in the order. |
Remarks
The shipping components (other than the Splitter component) are run by the ShippingMethodRouter component.
The component next steps through the list of shipping methods. If there are shipments using a given method, the ShippingMethodRouter, 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 it. When all of the shipments have been processed, the ShippingMethodRouter component calculates the total of all of the shipping charges.
The ShippingMethodRouter component instantiates only the components it will use.