Splitter

The Splitter pipeline component divides an order into groups based on a list of item keys. For example, you can use the Splitter pipeline component in the Accept stage to divide orders by catalog and vendor. You can use the Splitter pipeline component in the Shipping stage to divide an order into shipments by shipping methods and addresses.

Intended use: Order Processing pipeline, any stage.

Configuration Values

You can determine how the Splitter pipeline component divides orders by setting component properties. Use the following boxes on the OrderSplitter tab of the Component Properties dialog box to provide this information.

Box

Description

Output Structure

The name of the SimpleList object that points to the resulting dictionaries. The Splitter pipeline component creates one dictionary for each set of distinguisher values.

Input Distinguishers

A space-separated list of line item attributes (keys) to use to split the order. The defaults are the shipping_method_id and shipping_address_id keys, the distinguishers for splitting orders into multiple shipments.

Values Read

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

Key

Dictionary

Description

CacheManager

Context

A reference to a CacheManager object. If supplied, the Splitter pipeline component will automatically look up the shipping method name and write it to the output structure if shipping_method_idis a distinguisher.

ShipmentDistinguishers

Context

Optional. An array of strings that contains the line item attributes (keys) to use to split shipments. The defaults are the shipping_method_id and shipping_address_id keys. This key is used only if no values are specified in the Input Distinguishers box. For example, Dict("ShipmentDistinguishers") = "quantity shipping_address_id name shipping_method_id ...".

Values Written

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

Key

Description

<dynamic>

(Optional) The name of the SimpleList object that points to the resulting dictionaries. The Splitter pipeline component creates one dictionary for each set of distinguisher values. The default key order.shipments key is used only if no other key is specified in the Output Structure box.

Remarks

For information about how to set up the Splitter pipeline component to divide orders into multiple shipments, see Using the Splitter Component to Create Multiple Shipments.

With the Splitter pipeline component, you can split an order any way that you want. For example, assume that you have four line items, numbered zero (0) through three (3) with the following attributes:

shipping_method_id

shipping_address_id

shipping_date

catalog

vendor

A

Home

ASAP

A

A

A

Home

ASAP

A

A

B

Work

ASAP

B

B

A

Work

3/1

C

B

If you split by shipping_method_id and shipping_address_id, to an output structure called Shipments, you will get a SimpleList object of dictionaries on your order form that is named "Shipments" with the following entries:

shipping_method_id

shipping_address_id

ItemIndexes

A

Home

0,1

B

Work

2

A

Work

3

If you split by vendor, to an output structure called Vendors, you will get a SimpleList object of dictionaries on your order form that is named "Vendors" with the following entries:

Vendor

ItemIndexes

A

0,1

B

2,3

Note

The value that you provide for the Output Structure configuration setting must have a runtime object mapped to it in the OrderPipelineMappings.xml file.

See Also

Other Resources

How to Modify the OrderPipelineMappings.xml File

Shipping Objects

ShippingDiscountAdjust

ShippingMethodRouter

StepwiseShipping

Pipeline Component Reference