Business Process Programming Concepts

The following topics describe the business process objects provided in Commerce Server 2000.

OrderGroup, OrderForm, and OrderGroupManager Objects

The OrderGroup object is used in Commerce Server 2000 to store, access, and compute basket and order information for a site. The OrderGroupManager object works in conjunction with the OrderGroup object, providing search and other management operations for orders.

OrderGroup Structure

OrderGroup and Component Objects

OrderForm
Object

LineItem
Dictionary

One to One
One to Many

Addresses
Dictionary

OrderGroup
Object

An OrderGroup object describes order information. It groups order forms, and provides aggregate operations and aggregate totals. The OrderGroup object links to one or more OrderForm objects, and one or more Address dictionaries. The OrderForm object specifies header information for an order such as the shipping total, the tax total, and other data required to process the order. The OrderForm object references one or more Item dictionaries, which describe the specific products to be purchased. The Addresses dictionary specifies billing and shipping address information for purchase orders. Each OrderForm object typically specifies a billing_address_id value, and each line item specifies a shipping_address_id value.

The OrderGroup object often contains just one OrderForm object, but when you want your users to purchase items from different suppliers, the multiple OrderForm object feature of the OrderGroup object enables you to retain distinctions between suppliers while allowing a unified shopping experience to the user.

This following objects commonly occur within the OrderGroup object:

  • Address Dictionaries. These dictionaries specify billing and shipping information for purchase orders.

  • OrderForm Objects. These objects specify the header information for an order form. An OrderForm object contains a SimpleList object called Items that contains the Item dictionaries holding line item information.

  • Items SimpleLists.The Items SimpleLists contain the Item dictionaries.

  • Item Dictionaries. These dictionaries specify the contents of the line items in an order form. An OrderForm object, representing the information used to process the order form, references zero or more Item dictionaries through the Items list.

OrderStatus Codes

The OrderGroup object represents a purchasing unit, and has a specific status. This status is stored in OrderGroup.value("order_status_code"), indicating whether the OrderGroup object represents a Basket (1), a Saved Order or Template(2), a New Order (4), and so on. New custom status codes can be created in Commerce Server Business Desk. They can indicate such OrderGroup object status values as Approved, Cancelled, and so on. The status codes for these values must be set to numbers that are powers of 2 (for example: 8, 16, 32). The following Order Status codes are defined:

  • Basket Status. The Basket status indicates an OrderGroup object that is in the process of being assembled and reviewed before the order is submitted. This status code is 1.

  • Template Status (Saved Order Status). The purpose of the Template status is to facilitate repeat purchases, such as in a grocery store site where the same items are ordered week after week. This status is equivalent to the Saved Order status. This status code is 2.

  • New Order Status. The New Order status indicates an order that has been submitted for further processing (usually by the user clicking the Submit Order button). This status code is 4.

Database Persistence

If the OrderGroup object has an Order Status code of Basket or Template, the entire structure is persisted in the BasketGroup table; persistence in one table enhances performance. If the OrderGroup object has an Order Status code other than Basket or Template, it is persisted in the OrderGroup, OrderFormHeader, OrderFormLineItems, and OrderGroupAddresses tables that are used to store OrderGroups, OrderForms, LineItems and Addresses, respectively. This multiple-table persistence provides the OrderGroupManager object with richer search capabilities.

The OrderGroup object uses the marshaled_data database column to persist key/value pairs that have keys that do not correspond to database column names.

No dictionary entry that has a key name that begins with the value of the SavePrefix property will be saved to the database.

Many pipeline keys are prefixed by the underscore character (_), which, by default, means they will not be persisted to the database. Occasionally, you may want to take snapshots of these keys, and by convention, the prefix "saved_" is used in this situation. By using the "saved_" prefix the pipeline keys can be referred to later and can be searched via SQL statements or the OrderGroupManager object. Copied keys should not necessarily be trusted as being up-to-date. Also, copied keys should not be used by pipeline components directly.


All rights reserved.