How to Process Basket Punch-Outs

In a business-to-business scenario, one company's online store might create baskets for another company's online store. The act of processing a basket that was created by another source is called a "punch-out."

For example, imagine that MyCompany wants to enable its customers to purchase products from another company by using MyCompany's online store. In this example, MyCompany has an online purchasing system that employees use to purchase office supplies. An employee creates a basket and adds items such as pens and printer paper to the basket. When the employee checks out, the order for pens is filled internally, but the order for printer paper is sent to a supplier named PaperSupplier. PaperSupplier's online store runs Commerce Server Core Systems.

The following figure illustrates the communication that occurs during this scenario between the user, MyCompany's online purchasing system, PaperSupplier's Commerce Server Core Systems site, and PaperSupplier's back-end order fulfillment database. The steps that follow the figure describe each step of the communication.

  1. The user interacts with MyCompany's Web site to add items to a shopping cart.

  2. MyCompany's Web site displays the contents of the shopping cart to the user.

  3. The user clicks the Checkout button on MyCompany's Web site.

  4. MyCompany's site code sends the basket to PaperSupplier by calling the AcceptBasket Web service with a value of false.

  5. Optionally, PaperSupplier might request that MyCompany identify itself.

  6. If PaperSupplier requests that MyCompany identify itself, MyCompany returns its authentication credentials.

    Note

    We recommend that the Commerce Server Core Systems site authenticate that the caller of AcceptBasket is an authorized user. You can use any authentication mechanism that the sender and receiver agree on.

  7. PaperSupplier processes the basket checkout, but does not save the Basket because the AcceptBasket Web service was called with a value of false. PaperSupplier returns the Basket to MyCompany.

  8. MyCompany's Web site displays the final price to the user.

  9. The user confirms the purchase.

  10. MyCompany's site code sends the Basket to PaperSupplier by calling the AcceptBasket Web service with a value of true.

  11. Because the AcceptBasket Web service was called with a value of true, PaperSupplier stores the PurchaseOrder in its back-end database.

    Dd327815.alert_caution(en-us,CS.95).gifImportant Note:

    If the pipelines that you use when you process punch-outs are not run within a transaction and the pipeline components generate warnings, the pipeline will still complete its processing, but the PurchaseOrder will not be saved. We recommend that you make the pipelines that process orders transacted if you call the AcceptBasket Web service with a value of true. For more information about how to make a pipeline transacted, see How to Execute a Transacted Pipeline.

    Note

    If the AcceptBasket Web service receives incorrectly formatted XML, certain pipeline components will return an error level 2, and other pipeline components will return an error level 3. If a pipeline component that is running within a transaction returns an error level 2 or higher, the transaction will be rolled back. If a pipeline component that is running within a transaction returns an error level 3, the pipeline will additionally raise an exception.

  12. PaperSupplier returns the PurchaseOrder to MyCompany.

    Note

    A Basket that will be processed as a punch-out should contain items only from a single vendor. If you will send baskets to multiple vendors, create a separate basket for each vendor's items. If you create multiple baskets, make sure that you separate the payments by basket.

You can determine the format of the basket in the AcceptBasket Web service call by examining the Web Service Description Language (WSDL) that AcceptBasket returns.

See Also

Other Resources

How to Place an Order by Using XML

How to Execute a Transacted Pipeline

Working with Baskets