Share via


Purchase Pipeline

The Purchase pipeline consists of three stages. These stages use components that accept the final purchase of an order form, write an order to database storage and, optionally, finalize a receipt and write the contents of the OrderForm object to the receipt database.

The Purchase pipeline can be run after you have run an OrderForm object successfully through the Plan pipeline, and have confirmed that the user wants to finalize a purchase.

Because Purchase pipeline components write to a database, a Purchase pipeline is often a transacted pipeline.

The template for this pipeline is Purchase.pct.

The Purchase pipeline template consists of the following stages:

  • Purchase Check Stage

  • Payment Stage

  • Accept Stage

Purchase Check Stage (Purchase Pipeline)

The Purchase Check stage is typically used to verify that the address and credit card information the user provides meets certain criteria.

In the Purchase.pct template, this stage contains no components by default.

This pipeline configuration contains two Scriptor components:

  • Validate Bill_to. Verifies that each of the bill_to_* fields on the order form contain data. If not, the script gets the appropriate message from the MessageManager object, adds the error text to the error list, and returns a return value of two (2) indicating that an error occurred.

  • Validate CC Info. Verifies that each of the credit card fields on the order form contain data, and that the credit card type is one of a list of acceptable values. If not, the script gets the appropriate message from the MessageManager object and adds the error text to the error list, and returns a return value of two (2) indicating that an error occurred.

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

Component Description
ValidateCCNumber Performs a standard checksum test on the credit card number and checks the expiration date.

Payment Stage (Purchase Pipeline)

The Payment stage is used to approve credit card payments. It sets the order._payment_auth_code key upon credit card approval. This stage always ensures that the _payment_auth_code key is set. Otherwise, it generates a pur_bad_payment error.

If a credit card is not approved, this stage sets the _payment_auth_code key to DENIED and returns error level 2.

The details of the payment components vary depending on the third-party payment processing system used.

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

Component Description
DefaultPayment Assigns an initial value to the _payment_auth_code key.
RequiredPayment Ensures that the value of the _payment_auth_code key is not NULL.

Accept Stage (Purchase Pipeline)

The Accept stage handles the completed order, including initiating order tracking, generating purchase orders, and inventory.

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

Component Description
ExecuteProcess Executes an application on the server with the specified arguments.
MakePO Generates a purchase order, based on a template file.
POtoFile Sends a purchase order (typically the result of the MakePO component) to a file.
SaveReceipt Writes the contents of the OrderForm object to the receipt storage.
SendSMTP Sends an e-mail message to the specified address.
SQLItemADO Runs the specified SQL command for each item in the order with the given fields from the order and item as arguments. This component uses Microsoft ActiveX Data Objects (ADO), and can be included in a transacted pipeline.
SQLOrderADO Runs the specified SQL command once per order, with the given fields from the order as arguments. This component uses Microsoft ActiveX Data Objects (ADO), and can be included in a transacted pipeline.

See Also

Product Pipeline

Plan Pipeline


All rights reserved.