Share via


Plan Pipeline

The Plan pipeline contains fourteen stages. These stages consist of components that verify the integrity of the OrderForm object. For example, if the items list in an OrderForm object contains no items, then the RequiredOrderCheck component in the Order Check stage generates an error.

The template for this pipeline is Plan.pct.

The Plan pipeline template consists of the following stages:

  • Product Info Stage

  • Merchant Information Stage

  • Shopper Information Stage

  • Order Initialization Stage

  • Order Check Stage

  • Item Price Stage

  • Item Adjust Price Stage

  • Order Adjust Price Stage

  • Order Subtotal Stage

  • Shipping Stage

  • Handling Stage

  • Tax Stage

  • Order Total Stage

  • Inventory Stage

Product Info Stage (Plan Pipeline)

The Product Info stage contains components that retrieve product information about items in the items list from the site database. If there is no information about an item, Product Info stage components mark the item for deletion by creating a delete key in the Item dictionary with a value of one (1).

After the Product Info stage components run, the RequiredProdInfo component in the stage goes through the items list, and deletes every item marked for deletion.

The components related to this stage are shown in the following table.

Component Description
QueryCatalogInfo Retrieves catalog information for every item in the order form. Uses the Commerce Server 2000 Product Catalog System. Marks missing items for deletion and adds basket errors if necessary.
QueryProdInfoADO Executes a database query, using Microsoft ActiveX Data Objects (ADO). This component differs from the QueryProdInfo component in that the query that it executes can take multiple parameters, and can reference a query in the QueryMap dictionary.
RequiredProdInfo Deletes any items marked for deletion and writes the appropriate error messages.

Merchant Information Stage (Plan Pipeline)

The Merchant Information stage can retrieve static merchant data and write the data to the OrderForm object. Commerce Server 2000 includes no component for this stage (other than the Scriptor component). However, you can add your own custom component to process merchant information. For more information see, Building Pipeline Components.

Shopper Information Stage (Plan Pipeline)

The Shopper Information stage contains the DefaultShopperInfo component, which adds shopper information to the OrderForm object.

The components related to this stage are shown in the following table.

Component Description
DefaultShopperInfo Copies information from the Shopper dictionary in the Context dictionary to the OrderForm object.

Order Initialization Stage (Plan Pipeline)

The Order Initialization stage sets initial order information on the OrderForm object and verifies that the OrderForm object contains an order ID.

The components related to this stage are shown in the following table.

Component Description
RequiredOrderInitCy, RequiredOrderInit Initializes the payment authorization code, order ID, totals, and subtotals prior to processing the order.

Order Check Stage (Plan Pipeline)

The Order Check stage verifies that the order can be processed.

The components related to this stage are shown in the following table.

Component Description
RequiredOrderCheck Ensures that there is at least one item in the OrderForm object.

Item Price Stage (Plan Pipeline)

The Item Price stage contains components that set the _iadjust_regularprice key for each item in the items list and components that verify that this value has been set. If this value cannot be set, an error occurs.

This initialization ensures that the _iadjust_regularprice key contains the most current price information for the given item.

The components related to this stage are shown in the following table.

Component Description
DefaultItemPriceCy, DefaultItemPrice For each item in the items list, sets the _iadjust_regularprice key to the value stored in the _product_list_price key.
RequiredItemPriceCy, RequiredItemPrice Ensures that _iadjust_regularprice key is set for each item in the items list.

Item Adjust Price Stage (Plan Pipeline)

The Item Adjust Price stage contains components to initialize the value of the _iadjust_currentprice key. When the stage is complete, the _iadjust_currentprice key contains the current price of the item, adjusted for sales or promotions.

If no sale or promotion component is included in this stage, the key is set to the value stored in the _iadjust_regularprice key.

Once the item._iadjust_currentprice key is set for an item, the item cannot be adjusted a second time. For example, if a stage includes both an ItemPromo and a SaleAdjust component, and an item on the order qualifies for both the promotion and the sale adjustment, the _iadjust_currentprice key of the item is set by the component executed first within the stage. This generalization applies for any combination of Item Price Adjust stage components that you include in your pipeline.

Ee798933.note(en-US,CS.10).gif Note

  • Do not use this stage to calculate discounts in new pipelines. Use the OrderDiscount component in the Order Adjust Price stage of the Plan pipeline. The OrderDiscount component uses the Commerce Server 2000 Targeting System to apply item and order discounts.

The components related to this stage are shown in the following table.

Component Description
ItemPromo Adjusts the value of the _iadjust_currentprice key, based on promotions.
SaleAdjust Determines whether an item is on sale. If it is, the SaleAdjust component sets the _iadjust_currentprice key of the item to the value stored in the _product_sale_price key.
RequiredItemAdjustPriceCy, RequiredItemAdjustPrice Verifies that the _iadjust_currentprice key exists and has a value.

Order Adjust Price Stage (Plan Pipeline)

The Order Adjust Price stage contains components that set the adjusted price of each item.

The item._oadjust_adjustedprice key contains the total cost of a given item. For example, if a user purchases three items costing $5.00 each, and none of the items are discounted, the total for the item is $15.00. If two of the items are sold at the regular price, but the third is sold at half price (because of a discount), the adjusted price is $12.50.

The components related to this stage are shown in the following table.

Component Description
DBOrderPromoADO Queries the database to determine a promotion amount.
OrderDiscount Applies scheduled discounts to the shopping basket.
RequiredOrderAdjustPriceCy, RequiredOrderAdjustPrice Checks the _oadjust_adjustedprice key member of each item in the items collection to ensure that it is set.

Order Subtotal Stage (Plan Pipeline)

The Order Subtotal stage calculates the subtotal for an order and stores the resulting value in the _oadjust_subtotal key of the OrderForm object. The _oadjust_subtotal key is the sum of the _oadjust_adjustedprice key for all items.

The components related to this stage are shown in the following table.

Component Description
DefaultOrderSubtotalCy, DefaultOrderSubtotal Calculates the subtotal for an order and stores the result in the order._oadjust_subtotal key.
RequiredOrderSubtotalCy, RequiredOrderSubtotal Checks the order._oadjust_subtotal key to ensure that it is not NULL.

Shipping Stage (Plan Pipeline)

This stage calculates the total shipping charge for the order and sets the order._shipping_total key accordingly. For information about how the components in this stage interact, see Shipping Objects.

The components related to this stage are shown in the following table.

Component Description
DefaultShippingCy, DefaultShipping Ensures the integrity of the OrderForm object by setting the order._shipping_total key to zero (0).
FixedShipping Sets the order._shipping_total key to a fixed amount.
LinearShipping Sets the order._shipping_total key by multiplying a rate by the sum of a specified value on the OrderForm object.
ShippingDiscountAdjust Applies shipping discounts to an order. The component uses the multiple-shipment shipping architecture.
ShippingMethodRouter Looks up and runs the components to process the shipments and calculates the shipping total for the entire order. The component uses the multiple-shipment shipping architecture.
Splitter Divides an order into groups based on a list of item keys. The component uses the multiple-shipment shipping architecture.
TableShippingADO Sets the order._shipping_total key to a value returned by a specified query. Uses Microsoft ActiveX Data Objects (ADO) to perform the query, and can be included in a transacted pipeline.
RequiredShippingCy, RequiredShipping Checks the OrderForm object to ensure that the order._shipping_total key has been set.

Handling Stage (Plan Pipeline)

If handling charges are not included in the shipping charge, this stage calculates the total handling charge for the order and sets the order._handling_total key accordingly.

Multiple components can be specified to allow for different handling charges depending on the handling component used. You can use the shipping components to calculate shipping and handling charges together. However, some tax systems require shipping and handling charges to be calculated and taxed separately.

This stage verifies that order._handling_total key is set. If not, it generates an error.

The components related to this stage are shown in the following table.

Component Description
DefaultHandlingCy, DefaultHandling Assigns zero (0) to the order._handling_total key.
FixedHandling Assigns a fixed amount to the order._handling_total key.
LinearHandling Calculates the handling by multiplying a rate by the sum of a specified item on the OrderForm object. Assigns the value to the order._handling_total key.
TableHandlingADO Calculates the handling based on the results of a database query and assigns the value to the order._handling_total key. Uses Microsoft ActiveX Data Objects (ADO) to perform the query and can be included in a transacted pipeline.
RequiredHandlingCy, RequiredHandling Checks the OrderForm object to ensure that the total handling (order._handling_total key) has been set.

Tax Stage (Plan Pipeline)

The tax stage computes the sales tax for each item in the order and the sum of tax for the entire order. The stage assigns values to the item._tax_total, order._tax_total, and order._tax_included keys accordingly. Multiple components can be specified to allow for different tax rates depending upon the destination country/region. For information about how these components interact, see Tax Objects.

The components related to this stage are shown in the following table.

Component Description
DefaultTaxCy, DefaultTax Sets the _tax_total and _tax_included keys on the OrderForm object to zero (0).
SampleRegionalTax Calculates taxes using the multiple shipment features of Commerce Server 2000.
SimpleCanadaTax Computes taxes for Canada, including GST (goods and services tax) and PST (provincial sales tax).
SimpleJapanTax Computes the taxes for the Japanese model.
SimpleUSTax Applies a given tax rate to any order sent to a specified state.
SimpleVATTax Computes a value-added tax (VAT) on the items.
RequiredTaxCy, RequiredTax Checks to ensure that the _tax_total and _tax_included keys in the OrderForm object do not have NULL values.

Order Total Stage (Plan Pipeline)

The Order Total stage sums the subtotal (less any discount), tax, shipping, and handling values and assigns the total to the order._total_total key.

The components related to this stage are shown in the following table.

Component Description
DefaultTotalCy, DefaultTotal Writes the total cost of the order to the _total_total key.
RequiredTotalCy, RequiredTotal Performs a _VERIFY_WITH check of the OrderForm object.

Inventory Stage (Plan Pipeline)

This stage verifies that every item ordered is in stock. For information about how the inventory components interact, see Inventory Objects.

The components related to this stage are shown in the following table.

Component Description
FlagInventory Flags items in the itemsSimpleList object that are out of stock.
LocalInventory Checks the OrderForm object to ensure that an item does not require more of a given SKU than is in stock.

See Also

Product Pipeline

Purchase Pipeline


All rights reserved.