At g Comm Prog Guide

873
atg Version 2007.1 ATG Commerce Programming Guide ATG One Main Street Cambridge, MA 02142 www.atg.com

Transcript of At g Comm Prog Guide

atgVersion 2007.1 ATG Commerce Programming GuideATG One Main Street Cambridge, MA 02142 www.atg.com

ATG Commerce Programming Guide Document VersionDoc2007.1 COMMPROGv3 3/12/08

CopyrightCopyright 1998-2008 Art Technology Group, Inc. All rights reserved. This publication may not, in whole or in part, be copied, photocopied, translated, or reduced to any electronic medium or machine-readable form for commercial use without prior consent, in writing, from Art Technology Group, Inc. (ATG) ATG does authorize you to copy documents published by ATG on the World Wide Web for non-commercial uses within your organization only. In consideration of this authorization, you agree that any copy of these documents which you make shall retain all copyright and other proprietary notices contained herein.

TrademarksATG, Art Technology Group, and DYNAMO are registered trademarks of Art Technology Group, Inc. ATG Wisdom, ATG Dynamo Application Server, ATG Adaptive Scenario Engine, ATG Scenario Personalization, ATG Portal, ATG Commerce, ATG Content Administration, ATG Data Anywhere Architecture, ATG Search, ATG Response Management, ATG Merchandising, ATG Knowledge, ATG Self Service, ATG Commerce Assist, ATG Advisor, ATG Forum and ATG Business Control Center are trademarks of Art Technology Group, Inc. Microsoft, Windows and Word are the trademarks or registered trademarks of Microsoft Corporation in the United States and other countries. IBM, AIX, and MQ-Series are the trademarks or registered trademarks of IBM Corporation in the United States and other countries. Oracle is a registered trademark, and other Oracle product names, service names; slogans or logos referenced in this document are trademarks or registered trademarks of Oracle Corporation. Adobe Acrobat Reader is a registered trademark of Adobe. CORBA is a trademark of the OMG (Object Management Group). Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. Primus, and its respective logo, and Primus Knowledge Solutions, are trademarks, registered trademarks, or service marks of Primus. This product includes software developed by the Apache Software Foundation (http://www.apache.org/). EditLive Authoring Software Copyright 2004 Ephox Corporation. All rights reserved. Includes code licensed from RSA Security, Inc.. Some portions licensed from IBM are available at http://oss.software.ibm.com/icu4j/. Includes software developed by the Apache Software Foundation (http://www.apache.org/). Contains spell checking software from Wintertree Software Inc.. The Sentry Spell Checker Engine 2000 Wintertree Software Inc.. All other product names, service marks, and trademarks mentioned herein are trademarks of their respective owners. This publication may not, in whole or in part, be copied, photocopied, translated, or reduced to any electronic medium or machine-readable form for commercial use without prior consent, in writing, from Art Technology Group (ATG), Inc. ATG does authorize you to copy documents published by ATG on the World Wide Web for non-commercial uses within your organization only. In consideration of this authorization, you agree that any copy of these documents which you make shall retain all copyright and other proprietary notices contained herein.

No WarrantyThis documentation is provided as is without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. The contents of this publication could include technical inaccuracies or typographical errors. Changes are periodically added to the information herein; these changes will be incorporated in the new editions of the publication. ATG may make improvements and/or changes in the publication and/or product(s) described in the publication at any time without notice.

Limitation of LiabilityIn no event will ATG be liable for direct, indirect, special, incidental, economic, cover, or consequential damages arising out of the use of or inability to use this documentation even if advised of the possibility of such damages. Some states do not allow the exclusion or limitation of implied warranties or limitation of liability for incidental or consequential damages, so the above limitation or exclusion may not apply to you. ATG One Main Street Cambridge MA 02142 617.386.1000 phone 617.386.1111 fax www.atg.com

ATG Commerce Programming Guide

Contents

1

IntroductionCommerce Overview Product Catalog Purchasing and Fulfillment Services Inventory Management Pricing Services Targeted Promotions Merchandising Services Finding What You Need In This Guide

11 1 2 3 3 3 4 5 6

2

Configuring and Populating a Production DatabaseCreating Database Tables Creating Tables for Core ATG Commerce Creating Tables for ATG Consumer Commerce Creating Tables for ATG Business Commerce Using ATG Commerce with an Oracle Database Configuring Storage Parameters Configuring a Catalog for Oracle Full Text Searching Using ATG Commerce with an MSSQL Database Transferring Product Catalog and Price List Data Using Copy and Switch Configuring a Database Copy Performing a Database Copy Configuring a Database Switch Performing a Database Switch Transferring Demo Data Exporting the Demo Data from SOLID Importing the Demo Data to Your Database Destroying Database Tables for ATG Commerce Destroying Tables for Core ATG Commerce Destroying Tables for ATG Consumer Commerce Destroying Tables for ATG Business Commerce

99 10 11 11 13 13 14 15 17 18 23 24 26 27 27 28 28 28 29 30

3

Integrating Third-Party Software With ATG CommerceIntegrating Payflow Pro with ATG Commerce Setting up Payflow Pro Pre-Configuring the Integration

3333 34 34

iiiContents

ATG Commerce Programming Guide

Using ATG Commerce with Payflow Pro Integrating CyberSource with ATG Commerce Installing the CyberSource Distribution Initializing the CyberSource Integration Configuring ATG Commerce to Use CyberSource Moving the System to Production Designating Tax Status of Products Specifying Sales Origin and Shipment Location Information Calculating Taxes on the Item Level Specifying States and Provinces without Tax Obligations Integrating TAXWARE with ATG Commerce Before You Begin Integrating with TAXWARE TAXWARE Classes Configuring ATG Commerce to Use TAXWARE Using the SALES/USE and WORLDTAX Integration Customizing ATG Commerces TAXWARE Integration Customizing TaxWareCalculateTax Methods TaxResult and TaxRequest Fields VERAZIP Integration Customizing ATG Commerces VERAZIP Integration Customizing TaxWareVerifyZipInfo Methods

34 35 35 35 36 36 36 37 37 38 38 38 38 39 40 40 41 41 42 42 43

4

Using and Extending the Standard CatalogCatalog Repository Categories and Products Category Properties Product Properties Defining a Root Category Defining Relationships between Categories and Products Specifying Template Pages for Categories and Products Associating Products with SKUs Extending the Repository for Internationalization Extending the Category and Product Item Types SKU Items and SKU Links SKU Properties SKU Link Properties Using SKU Media Properties Using SKU Price Properties Using the SKU Fulfiller Property Creating SKU Bundles Extending the SKU Item Type Configurable SKUs Folders and Media Items Folder Properties Media Item Properties Using Media-External Properties Using Media-Internal Properties

4545 46 47 48 49 49 51 53 53 55 57 57 58 58 59 59 59 59 60 60 61 62 62 62

ivContents

ATG Commerce Programming Guide

63 63 64 66

Designing a Multi-Locale Product Catalog Designing the Catalog Repository Setting Up Multiple Product Catalogs Setting Up a Single Product Catalog

5

Using Custom CatalogsUsing ATG Commerce with Custom Catalogs Converting from Standard to Custom Catalogs The Custom Catalog Repository Defining Root Categories Catalog Properties Category Properties categoryInfo Properties Product Properties productInfo Properties SKU Properties SKUInfo Properties Custom Catalog Security Custom Catalog Navigation Looking Up Items in the Catalog Using the parentCategory Property Custom Catalog Searching Overview of Custom Catalog Searching Configuring the Custom Catalogs Search Form Handler Configuring Custom Catalog Search Types and Specifying Search Criteria Combining Custom Catalog Search Types Preconfigured Custom Catalog Search Components Processing and Displaying Custom Catalog Search Results Searching Custom Catalogs in Development Mode Using Search Form Handler with Internationalized Catalogs Running the Custom Catalog Maintenance System Batch Services Dynamic Services Assigning a Custom Catalog to a User

7171 72 75 75 75 77 81 82 85 86 87 88 88 88 89 89 90 91 92 95 96 97 98 98 99 99 106 107

6

ATG Commerce Profile ExtensionsProfile Repository Extensions Promotions Address Books Credit Card Collection Gift Lists and Wish List Other Features Profile Form Handler Extensions Profile Tools and Property Manager Extension

109109 109 110 110 110 111 111 111

vContents

7 Configuring Merchandising Services

ATG Commerce Programming Guide

113113 114 123 125 126 129 132 133 134 135 143 144 145 145 146 146 147 150

Setting Up Gift Lists and Wish Lists Gift List Form Handlers Gift List Servlet Beans Gift List Business Layer Classes Gift List Repository Purchase Process Extensions to Support Gift Lists Extending Gift List Functionality Disabling the Gift List Repository Setting Up Product Comparison Lists Understanding the Product Comparison System Extending the Product Comparison System Using TableInfo to Display a Product Comparison List Setting Up Gift Certificates and Coupons The Claimable Repository The ClaimableTools Component The ClaimableManager Component Setting Up Gift Certificates Setting Up Coupons

8

Using and Extending Pricing ServicesOverview of Pricing Services Common Terms in Pricing Services How Pricing Services Generate Prices Deciding Between Dynamic and Static Product Pricing Public Pricing Interfaces and Classes The Base Pricing Engine Pricing Interfaces Pricing Classes Price Holding Classes Pricing Engine Classes Pricing Calculator Classes Qualifier Class QualifiedItem Class PricingTools Class Other Classes The Pricing Servlet Beans Default Pricing Engines Default Item Pricing Engine Default Order Pricing Engine Default Tax Pricing Engine Default Shipping Pricing Engine Default Pricing Calculators Default Item Discount Calculator Default Item Discount Multiplier Calculator Default Order Discount Calculator

155156 157 158 159 160 160 162 165 165 171 173 184 189 189 191 194 195 195 196 196 197 198 198 199 200

viContents

ATG Commerce Programming Guide

201 202 203 203 204 204 205 205 207 208 208 209 211 211 211 211 212 212 219 219 220 225 225 227 227 228 229 229 230 232 233 233 235

Default Shipping Discount Calculator Default Qualifier Service Extending and Creating Pricing Engines Extending a Pricing Engine Replacing a Pricing Engine Creating a New Pricing Engine Extending and Creating Pricing Calculators Adding a New Pricing Calculator Extending Calculators Extending the Qualifier Class Adding a Helper Method for a New Calculator Adding New Criteria to the Filter Methods Replacing the Way a PMDL Rule Is Evaluated Replacing the Way the Qualifier Determines the Result Set Accessing FilteredCommerceItems Creating Promotions Types of Promotions Using PMDL Rules PromotionStatus Repository Items Using the Discount Rule Editor to Create PMDL Rules Examples of PMDL Rules Performance Issues Related to Promotion Delivery Using Price Lists Overview of Setting Up Price Lists Description of Volume Pricing Setting up Price List Functionality in ATG Consumer Commerce PriceListManager Price List Calculators Implementing Sale Prices using Price Lists Calculating Prices with a Specific Price List Using the CurrencyConversionFormatter to Convert Currency Price List Security Policy Converting a Product Catalog to Use Price Lists

9

Working With Purchase Process ObjectsThe Purchase Process Subsystems Base Commerce Classes and Interfaces Address Classes Business Layer Classes OrderTools Pipelines Order Repository Creating Commerce Objects Creating an Order Creating Multiple Orders Creating Commerce Items, Shipping Groups, and Payment Groups Adding an Item to an Order via a URL

237237 238 242 242 243 247 248 249 249 250 251 255

viiContents

ATG Commerce Programming Guide

Preventing Commerce Items from Being Added to Types of Shipping Groups257 Removing Commerce Objects from an Order 257 Using the SimpleOrderManager 258 Using Relationship Objects 258 Relationship Types 259 Commerce Item Relationships 263 Relationship Priority 263 Assigning Items to Shipping Groups 264 Assigning Costs to Payment Groups 265 Assigning an Orders Total Cost to Payment Groups 266 Assigning an Orders Component Costs to Payment Groups 267 Setting Handling Instructions 269 HandlingInstruction Objects 270 Adding Handling Instructions to a Shipping Group 270 ATG Commerce States 272 Purchase Process Class Diagrams 279 Order Interfaces Diagrams 279 Order Classes Diagram 290 Order Containment Diagram 303

10 Configuring Purchase Process ServicesLoading Orders Refreshing Orders Modifying Orders Understanding the CartModifierFormHandler Modifying the Current Order Repricing Orders Saving Orders Updating an Order with the OrderManager Canceling Orders Checking Out Orders Preparing a Simple Order for Checkout Preparing a Complex Order for Checkout Checking Out an Order Processing Payment of Orders Overview of the Payment Process Extending the Payment Operations of a Payment Method Extending the Payment Process to Support a New Payment Method Extending Order Validation to Support New Payment Methods Scheduling Recurring Orders Understanding the scheduledOrder Repository Item Submitting Scheduled Orders Creating, Modifying, and Deleting Scheduled Orders Setting Restrictions on Orders Understanding the Order Restriction Classes Implementing Order Restrictions Tracking the Shopping Process

309310 311 315 315 325 326 328 329 330 331 331 333 344 350 351 352 353 367 371 372 373 376 380 380 382 383

viiiContents

ATG Commerce Programming Guide

383 384 385 385 385 386 386 387 388

Shopping Process Stages Working with Shopping Process Stages Shopping Process Recorder Turning Off Recording of Shopping Process Tracking Troubleshooting Order Problems Handling Returned Items Working with ATG Commerce Form Handlers Managing Transactions in the ATG Commerce Form Handlers Extending the ATG Commerce Form Handlers

11 Customizing the Purchase Process ExternalsPurchase Process Event Messages Integrating with Purchase Process Services Purchase Process Integration Points Adding Credit Card Types to ATG Commerce Extending the Purchase Process Adding a Subclass with Primitive Data Type Properties Adding a Subclass with Object Data Type Properties Manipulating Extended Objects Merging Orders

389389 390 390 391 393 393 400 419 419

12 Processor Chains and the Pipeline ManagerPipeline Manager Overview Using the Pipeline Editor Accessing the Pipeline Editor Opening an Existing Pipeline Definition Creating a New Pipeline Definition Editing Existing Pipeline Definitions Printing a Pipeline Definition Activating Verbose Mode Pipeline Debugging Changing the Display Font of the Pipeline Editor Reinitializing the Pipeline Manager Running a Processor Chain Creating a Processor Pipeline Configuring a Pipeline Manager Creating Processors Pipeline Definition Files Creating and Editing Processor Chains Programmatically Extending the PipelineChain and PipelineResult Classes Pipelines and Transactions Processor Transaction Management Spanning Transactions over a Chain Subset Extending the Processor Pipeline Classes Adding a Commerce Processor Using XML Combination Executing Processor Chains from Processors within Other Chains

421421 422 423 423 424 426 427 427 428 429 429 429 430 431 431 431 436 439 442 442 443 443 444 445

ixContents

ATG Commerce Programming Guide

Commerce Processor Chains updateOrder Pipeline Chain loadOrder Pipeline Chain refreshOrder Pipeline Chain processOrder Pipeline Chain validateForCheckout Pipeline Chain validatePostApproval Pipeline Chain validatePaymentGroupsPostApproval Pipeline Chain validateNoApproval Pipeline Chain recalcPaymentGroupAmounts Pipeline Chain repriceOrder Pipeline Chain moveToConfirmation Pipeline Chain moveToPurchaseInfo Pipeline Chain validateShippingInfo Pipeline Chain sendScenarioEvent Pipeline Chain

445 446 448 449 452 455 458 459 459 460 460 460 461 461 462

13 Inventory FrameworkOverview of the Inventory System Using the Inventory System Inventory System Methods Inventory Classes InventoryManager InventoryException MissingInventoryItemException InventoryManager Implementations AbstractInventoryManagerImpl NoInventoryManager RepositoryInventoryManager CachingInventoryManager LocalizingInventoryManager Examples of Using the Inventory Manager Allocating Items for an Order Canceling or Removing an Item from an Order Displaying an Items Availability to a Customer Filling Partial Orders Preventing Inventory Deadlocks Handling Bundled SKUs in the Inventory Inventory Repository Inventory JMS Messages Configuring the SQL Repository Caching the Inventory Inventory Repository Administration Using the InventoryLookup Servlet Bean Building a New InventoryManager Configuring a New Inventory Manager

463464 464 465 467 467 469 470 470 470 470 470 474 476 476 477 478 479 479 479 480 483 484 485 485 486 487 489 490

xContents

ATG Commerce Programming Guide

491492 495 495 504 508 555 557 558 558 559 561 565 568 569 569 571 571 572 573 574

14 Configuring the Order Fulfillment FrameworkOverview of Fulfillment Process Running the Fulfillment Server Order Fulfillment Classes Fulfillment Pipelines Descriptions and Diagrams of Fulfillment Pipelines Using Locking in Fulfillment Using the OrderFulfiller Interface Using the Fulfiller Notifying the HardgoodFulfiller of a Shipment HardGoodFulfiller Examples Creating a New Fulfiller Configuring a New Fulfiller Order Fulfillment Events Fulfillment Server Fault Tolerance Fulfillment Message Redelivery Replacing the Default Fulfillment System Integrating the Order Fulfillment Framework with an External Shipping System Changing Payment Behavior in Fulfillment Server Using Scenarios in the Fulfillment Process Questions & Answers

15 Managing the Order Approval ProcessUnderstanding the Order Approval Process Modifying the Order Approval Process Servlet Beans and Form Handlers for Approving Orders ApprovalRequiredDroplet Servlet Bean ApprovedDroplet Servlet Bean ApprovalFormHandler Pipeline Chains in the Order Approval Process approveOrder checkRequiresApproval orderApproved orderRejected checkApprovalComplete checkApprovalCompleteError JMS Messages in the Order Approval Process

577577 582 582 582 583 583 583 584 586 587 588 589 591 592

16 Using Abandoned Order ServicesAn Overview of Abandoned Orders Abandonment States Order Repository Extensions Profile Repository Extensions The ConvertedOrderRepository Defining and Detecting Abandoned Orders Defining Abandoned and Lost Orders

595595 597 597 598 599 599 600

xiContents

Detecting Abandoned and Lost Orders Configuring AbandonedOrderService Configuring AbandonedOrderTools Scenario Events and Actions Scenario Events Scenario Actions Tracking Abandoned Orders of Transient Users AbandonedOrderEventListener TransientOrderRecorder Turning Off Transient Order Tracking Customizations and Extensions

ATG Commerce Programming Guide

600 602 604 608 609 612 615 615 616 616 616

17 Generating InvoicesOverview Invoices in Checkout Invoice Payment Enabling the InvoiceRequestProcessor Using the Invoice Manager Invoice Pipelines The Invoice Repository Invoice Repository Item DeliveryInfo Repository Item PaymentTerms Repository Item Sending Invoice JMS Messages

619619 620 621 621 621 622 623 623 624 625 625

18 Using Requisitions and ContractsRequisitions Contract Repository Items Using Contracts

627627 628 628

19 Preparing to Use Commerce ReportingSetting Up Commerce Reporting Environments Setting up the Merchandising Environment Setting Up the Production Environment Setting Up the Data Loading Environment Configuring a Parent Catalog Logging Data for Commerce Reporting Site Visit Data Logging Order Submit Data Logging Product Catalog Data Logging User Data Logging Segment Data Logging Data Logging Configuration Initial Data Logging for Catalogs, Users, and Segments JMS Message Information for Data Logging Loading Data for Commerce Reporting

631631 632 632 632 633 633 634 634 635 636 637 637 639 639 641

xiiContents

ATG Commerce Programming Guide

641 644 645 646

Data Loader Components Data Warehouse Loader Repository Handling Errors Pipeline Drivers and Processors

20 ATG Commerce Web ServicesOrder Management Web Services addCreditCardToOrder Web Service addItemToOrder Web Service addItemToShippingGroup Web Service addShippingAddressToOrder Web Service cancelOrder Web Service createOrder Web Service createOrderForUser Web Service createOrderFromXML Web Service getCurrentOrderId Web Service getDefaultPaymentGroupId Web Service getDefaultShippingGroupId Web Service getOrderAsXML Web Service getOrdersAsXML Web Service getOrderStatus Web Service moveItemBetweenShippingGroups Web Service removeCreditCardFromOrder Web Service removeItemFromOrder Web Service removeItemQuantityFromShippingGroup Web Service removePaymentGroupFromOrder Web Service removeShippingGroupFromOrder Web Service setItemQuantity Web Service setOrderAmountToPaymentGroup Web Service submitOrderWithReprice Web Service Order Management Web Services Example Pricing Web Services calculateOrderPrice Web Service calculateOrderPriceSummary Web Service calculateItemPriceSummary Web Service Pricing Web Services Example Promotion Web Services claimCoupon Web Service getPromotionsAsXML Web Service grantPromotion Web Service revokePromotion Web Service Promotion Web Services Example Inventory Web Services getInventory Web Service getInventoryStatus Web Service setStockLevels Web Service setStockLevel Web Service

657657 658 659 660 660 661 662 662 663 664 664 665 666 666 667 668 669 670 670 671 672 673 673 674 675 675 676 676 677 678 678 679 680 680 681 682 682 683 683 684 685

xiiiContents

ATG Commerce Programming Guide

Inventory Web Services Example Catalog Web Services catalogItemViewed Web Service getProductSkusXML Web Service getProductXMLByDescription Web Service getProductXMLById Web Service getProductXMLByRQL Web Service Catalog Web Services Example Profile Web Services getDefaultShippingAddress Web Service getDefaultBillingAddress Web Service getDefaultCreditCard Web Service setDefaultBillingAddress Web Service setDefaultCreditCard Web Service setDefaultShippingAddress Web Service Profile Web Services Example Commerce Web Services Security Using the Order Owner Security Policy

685 686 686 687 688 689 689 690 691 691 692 692 693 694 694 695 696 697

Appendix A: ATG Commerce and Session Backup Appendix B: ATG Commerce DatabasesCore ATG Commerce Functionality Tables Product Catalog Tables Commerce Users Tables Claimable Tables Shopping Cart Events Table Inventory Tables Order Tables Promotion Tables User Promotion Tables Gift List Tables Price List Tables Custom Catalog Tables Abandoned Order Services Tables Order Markers Table ATG Business Commerce Tables ATG Business Commerce Product Catalog Tables ATG Business Commerce Order Tables ATG Business Commerce Organizational Tables ATG Business Commerce User Profile Extensions ATG Business Commerce Invoice Tables ATG Business Commerce Contract Tables

699 701701 702 724 726 729 730 731 764 772 773 777 782 797 800 800 801 803 810 816 821 825

Appendix C: ATG Commerce MessagesBase ATG Commerce Messages

829829

xivContents

ATG Commerce Programming Guide

829 838 839

Fulfillment System Messages Abandoned Order Messages ATG Business Commerce Messages

Appendix D: ATG Commerce Scenario Recordersdcs dcs-analytics shoppingprocess

843843 844 846

Index

849

xvContents

ATG Commerce Programming Guide

xviContents

ATG Commerce Programming Guide

1 Introduction

Welcome to the ATG Commerce Programming Guide. The ATG Commerce application serves as the foundation for your online store. It contains everything you need to manage your product database, pricing, inventory, fulfillment, merchandising, targeted promotions, and customer relationships. ATG Commerce is available in two versions. ATG Consumer Commerce is used for developing standard business-to-consumer (B2C) online stores. ATG Business Commerce is used for sites oriented more toward business-to-business (B2B) uses. You will occasionally see the text ATG Business Commerce only or ATG Consumer Commerce only in this manual. This comprehensive guide covers ATG Business Commerce and ATG Consumer Commerce concepts for programmers. This chapter includes the following sections: Commerce Overview Finding What You Need In This Guide

Commerce OverviewThis chapter introduces you to the major features of ATG Commerce: Product Catalog Purchasing and Fulfillment Services Targeted Promotions Inventory Management Pricing Services Merchandising Services

Product CatalogThe product catalog is a collection of repository items (categories, products, media, etc.) that provides the organizational framework for your commerce site. ATG Commerce includes a standard catalog implementation, based on the ATG SQL Repository, that you can use or extend as necessary. You can create and edit all of your repository items through the ATG Control Center, which also allows you to create page templates to display these items.

11 - Introduction

ATG Commerce Programming Guide

Custom Catalogs. You can display different versions of your product catalog for different viewers. For example, if a corporate customer only wants its employees to order certain items from your store, you can confine them to viewing and ordering only those products. Configurable Commerce Items. This feature allows you to sell items with variable components, such as a computer that can be purchased with different hard drive capacities.

Purchasing and Fulfillment ServicesATG Commerce provides tools to handle pre-checkout order-processing tasks such as adding items to a shopping cart, ensuring items are shipped by the customers preferred method, and validating credit card information. The system is designed for flexibility and easy customization; you can create sites that support multiple shopping carts for a single user, multiple payment methods and shipping addresses. You can integrate with third-party authorization and settlement tools such as Payflow Pro, CyberSource, and TAXWARE. As soon as a customer submits an order, the fulfillment framework takes over processing. This system includes a collection of standard services which coordinate and execute the order fulfillment process. Like the purchase process, the fulfillment framework can be customized to meet the needs of your site. ATG Commerce also includes an HTML-based Fulfillment Administration page that you can use for: Viewing orders that are ready to be shipped. Notifying the fulfillment system that an order has been shipped to the customer. Notifying the fulfillment system that a shipping group has changed and needs to be reprocessed. Printing order information.

Cost Centers (ATG Business Commerce only). Cost Centers allow customers to track internal costs by designating parts of their organization as cost centers, enabling them to track costs by department and run related reports. Export an Order Via XML. New classes in ATG Commerce allow you to export customer orders in XML for easy integration with your other systems. Scheduled Orders (ATG Business Commerce only). Your customers can create template orders from a new or existing order, then create a schedule for the same order to be placed regularly during the time frame they specify. For example, a company could set up a scheduled order to buy certain supplies on a monthly basis for the next year, then stop so the company can review its needs and perhaps change the standard order. Order Approvals (ATG Business Commerce only). B2B applications often require that customers orders be reviewed by authorized persons who can approve or reject them. The approval process in ATG Business Commerce can identify customers for whom approvals are required, and check for the conditions that trigger an approval for an order, such as when an order limit is exceeded. After an approver has reviewed the order, if approved, the order proceeds through checkout. Invoicing (ATG Business Commerce Only). This new feature gives your customers the option of being invoiced for orders they place.

21 - Introduction

ATG Commerce Programming Guide

Requisitions (ATG Business Commerce only). Requisitions work with the order approval process, enabling your customers to attach requisition numbers to orders, then submit them for approval within their organization, improving your customers ability to track internal activities.

Inventory ManagementThe inventory framework facilitates inventory querying and inventory management for your site. It allows you to: Remove items from inventory. Notify the store of a customers intent to purchase an item that is not currently in stock (backorder) or has never been in stock (preorder). Make a specific number of items available for customers to purchase, backorder, or preorder. Determine and modify the number of items available for purchase, backorder, or preorder. Determine when a specific item will be in stock.

Inventory information is stored in the Inventory repository, which is separate from the product catalog. You can use the ATG Control Center to view, add and delete inventory items, and edit their property values. ATG Commerce also includes an HTML-based administration interface for the Inventory Manager. Administrators can use this interface to view the results of the inventory query operations, manipulate the various properties of each item, and notify the system of inventory updates.

Pricing ServicesATG Commerce pricing services revolve around pricing engines and pricing calculators. The pricing engine determines the correct pricing model for an order, individual item, shipping charge, or tax, based on a customers profile. The pricing calculator performs the actual price calculation based on information from the pricing engine. These services make it possible to generate prices dynamically under constantly changing business conditions. Price Lists. This feature allows you to target a specific set of prices to a specific group of customers. Price lists are managed through a single interface in the ACC. For example, price lists can be used to implement business-to-business pricing where each customer can have its own unique pricing for products based on contracts, RFQ and pre-negotiated prices. Contracts (ATG Business Commerce Only). Contracts tie together several important new features of ATG Business Commerce, allowing you to associate a particular catalog, price list(s), and payment terms with a specific organization.

Targeted PromotionsBusiness managers can use ATG Commerce promotions to highlight products and offer discounts as a way of encouraging customers to make purchases. Promotions typically fall into the following categories:

31 - Introduction

Specific amount off a particular product Specific amount off a whole order Percentage amount off a whole order Free product or free order

ATG Commerce Programming Guide

Percentage amount off a particular product

Specific amount or percentage off a product based on an attribute

Substitution (buy product A for the price of product B) Free shipping for a specific product

You can create promotions through a simple interface in the ATG Control Center.

Merchandising ServicesATG Commerce provides services for implementing a variety of merchandising features on your commerce site. Gift Lists and Wish Lists Gift lists allow customers to register for an event, such as a birthday or wedding, and create a list of products that other site visitors can view. Customers can create an unlimited number of gift lists for themselves. Part of the purchase process allows special handling instructions for gift purchases, such as address security, wrapping and shipping. Wish lists allow customers to save lists of products without actually placing the items in their shopping cart. A wish list is similar to a gift list, except that it is only accessible to the person who created it. Customers can access their wish lists and purchase items from it at any time. Comparison lists Comparison lists enable customers to select multiple product SKUs and compare them side-by-side. Gift Certificates and Coupons You can set up gift certificates as an item in your product catalog. When a customer purchases a gift certificate, it is delivered via e-mail to the recipient, who, in turn, can use it to pay for purchases on the site. Coupons are similar to gift certificates, except that they are a type of promotion (20% of an order over $100, for example) sent to specific customers. Customers redeem gift certificates and coupons entering a claim code during the checkout process. You can use the ATG Control Center to manage gift-list, coupon, and gift certificate repository items.

41 - Introduction

ATG Commerce Programming Guide

Finding What You NeedATG Commerce is a comprehensive product that provides the tools you need to create a commerce Web site thats customized to meet the particular needs of your business. Instructions for working with ATG Commerce live in a variety of books. Heres a key to finding the information you need:

Tasks Extending ATG Commerce programmatically by creating subclasses and modifying repositories. Integrating ATG Commerce with Payflow Pro, CyberSource, and TAXWARE. Communicating with ATG Commerce through Web Services. Building JSPs that use Commerce servlet beans. Working with the out-of the-box promotion, price list, abandon order, and cost center tools. Setting up scenarios and creating charts. Creating a catalog and populating it with categories, products and SKUs. Configuring the fulfillment and inventory tools provided out-the-box ATG Commerce. Developing a catalog and its categories, products, SKUs in a publishing environment that uses projects to manage the tasks you perform and maintains versions of the commerce assets you edit. Assembling applications that include ATG Commerce and reference application modules. Installing ATG Commerce databases in a production environment.

Audience Programmers

Instructions in this Guide Covered in several chapters in this guide.

Programmers

See the Integrating Third-Party Software With ATG Commerce chapter in this guide.

Page Developers

ATG Commerce Guide to Setting Up a Store ATG Commerce Guide to Setting Up a Store

Business Users

Business Users

ATG Commerce Guide to Setting Up a Store

Business Users

ATG Merchandising User Guide

Site Administrators

ATG Programming Guide

Site Administrators

See Configuring and Populating a Production Database in this guide. Users who also have ATG Merchandising should see the ATG Merchandising User Guide instead. ATG Merchandising User Guide

Installing database tables in support of ATG Merchandising

Site Administrators

51 - Introduction

Review database tables, session backup procedures, JMS messages, and recorders. Working with the Motorprise Business Commerce Reference Application. Working with the Pioneer Cycling Consumer Commerce Reference Application. Working with the ATG Commerce Sample Catalog. All All

ATG Commerce Programming Guide

Site Administrators

See the appendices in this guide.

ATG Business Commerce Reference Application Guide ATG Consumer Commerce Reference Application Guide

Page Developers, Programmers

ATG Commerce Guide to Setting Up a Store

In This GuideThis guide is divided into the following chapters: Configuring and Populating a Production Database Provides instructions on creating and configuring Commerce tables in a non-SOLID database. (Site Administrator) Integrating Third-Party Software With ATG Commerce Details how to integrate Payflow Pro, CyberSource, and TAXWARE with ATG Commerce. (Site Administrator) Using and Extending the Standard Catalog Explains how to set up a standard catalog and its content. (Programmer) Using Custom Catalogs Describes how to create, configure, and work with custom catalogs. (Programmer) ATG Commerce Profile Extensions Describes the extensions made to the Profile repository and form handlers by ATG Commerce. (Programmer) Configuring Merchandising Services Describes how to set up gift lists, wish lists, product comparisons, gift certificates, and coupons. (Programmer) Using and Extending Pricing Services Describes pricing services and provides instructions for extending them. (Programmer) Working With Purchase Process Objects Provides instructions for configuring the purchase process subsystem. (Programmer) Configuring Purchase Process Services Instructs you to configure how your site presents and processes orders. (Programmer) Customizing the Purchase Process Externals Explains how to customize the purchase process. (Programmer)

61 - Introduction

ATG Commerce Programming Guide

Processor Chains and the Pipeline Manager Explains how the Pipeline Manager works with pipelines. Also, describes Commerce pipelines. (Programmer) Inventory Framework Describes the parts of the Inventory framework that you can customize. (Programmer) Configuring the Order Fulfillment Framework Describes how to work with and extend the Order Fulfillment framework. (Programmer) Managing the Order Approval Process Details the handler methods, servlet beans, and pipelines used in the order approval process. (Programmers - Business Commerce only) Using Abandoned Order Services Provides instructions on detecting and tracking abandoned orders. (Programmer) Generating Invoices Describes how invoices are generated at checkout and the repository, components, and pipelines used in that process. (Programmers - Business Commerce only) Using Requisitions and Contracts Explains how to track orders by requisition ID and associate Commerce items to a contract. (Programmers - Business Commerce only) Logging Data for Commerce Reporting Describes how data is collected and logged for Commerce Reporting. (Programmer) Loading Data for Commerce Reporting Explains how logged data is processed and loaded into the Data Warehouse, to be used for Commerce Reporting. (Programmer) ATG Commerce Web Services Describes the Web Services that support Commerce features. (Programmer) Appendix A: ATG Commerce and Session Backup Describes the Commerce session backup strategy.(Programmer) Appendix B: ATG Commerce Databases Lists the Commerce database tables and their contents. (Programmer) Appendix C: ATG Commerce Messages Describes the JMS messages included with ATG Commerce. (Programmer) Appendix D: ATG Commerce Scenario Recorders Explains the recorder elements provided in support of Commerce scenarios. (Programmer)

71 - Introduction

ATG Commerce Programming Guide

81 - Introduction

ATG Commerce Programming Guide

2 Configuring and Populating a Production Database

The SOLID database included with the ATG platform is provided so that potential customers can sample the ATG products and determine whether they want to purchase it. Once you buy ATG Commerce, you will need to install a production-ready database before you can begin building your Web application. The following sections describe how to create and configure your production database: Creating Database Tables Using ATG Commerce with an Oracle Database Using ATG Commerce with an MSSQL Database Transferring Product Catalog and Price List Data Using Copy and Switch Transferring Demo Data Destroying Database Tables For ATG Commerce

The information in this chapter focuses specifically on ATG Commerce databases. For general information on production database configurations, requirements, and performance enhancements, refer to the ATG Installation and Configuration Guide. Note: If your product stack includes ATG Commerce, ATG Content Administration and ATG Merchandising, instructions for creating the database tables you need are in the Configuring a Production Database section in the ATG Merchandising User Guide. Do not configure your production database following the steps provided in this chapter.

Creating Database TablesWhen you want to run ATG Commerce on a database other than SOLID, you need to create and configure the database tables for the following products: 1. Create tables for ATG Adaptive Scenario Engine by following the instructions provided in the Configuring Databases and Database Access chapter of the ATG Installation and Configuration Guide. Create the ATG Commerce tables necessary for your product suite: All ATG Commerce users should see the Creating Tables for Core ATG Commerce section. Pioneer Cycling and Motorprise users can skip this step if they want to install tables for all products at once as described below.

2.

92 - Configuring and Populating a Production Database

ATG Commerce Programming Guide

ATG Consumer Commerce users should also see the Creating Tables for ATG Consumer Commerce section. ATG Business Commerce users should also see the Creating Tables for ATG Business Commerce section. Note that if you want to run Pioneer Cycling Reference Application or Motorprise Reference Application, you can skip all steps defined here and follow the instructions provided in their respective sections. See Creating Pioneer Cycling Reference Application Tables and Creating Motorprise Reference Application Tables respectively. For descriptions of core ATG Commerce, ATG Business Commerce, and ATG Consumer Commerce database tables, see Appendix B: ATG Commerce Databases. If you are using an Oracle or MSSQL database with ATG Commerce, see the sections provided in this chapter for configuring your database. See Using ATG Commerce with an Oracle Database and Using ATG Commerce with an MSSQL database respectively.

Creating Tables for Core ATG CommerceFirst, create the core ATG Commerce tables and then refer to the sections that follow for information on configuring the database tables that are specific to the version of ATG Commerce you are using. To create the database tables for core ATG Commerce, run the dcs_ddl.sql script from the following directory:

/DCS/sql/install/database-vendorThe dcs_ddl.sql script is derived from the subscripts listed in the table below. If necessary, you can run these subscripts individually from the following directory:

/DCS/sql/db_components/database-vendor

Script name

Purpose Configures the schema for the ATG Commerce Claimable repository Creates tables for ATG Commerce credit card profile extensions Creates a table for handling shopping cart events Creates tables for the ATG Commerce inventory system Creates tables for the ATG Commerce purchase process Defines the tables that contain order markers Creates tables for price lists Creates tables for the ATG Commerce product catalog Creates tables for ATG Commerce pricing promotions Defines views for reporting

claimable_ddl.sql commerce_user.sql dcs_mappers.sql inventory_ddl.sql order_ddl.sql order_markers_ddl.sql priceLists_ddl.sql product_catalog_ddl.sql promotion_ddl.sql reporting_views.sql

102 - Configuring and Populating a Production Database

ATG Commerce Programming Guide

Defines additional views for reporting Defines additional views for reporting Defines additional views for reporting Creates tables for ATG Commerce Giftlist services Creates tables for ATG Commerce promotion profile extensions

reporting_views1.sql reporting_views2.sql reporting_views3.sql user_giftlist_ddl.sql user_promotion_ddl.sql

Creating Tables for ATG Consumer CommerceTo configure your database to work with ATG Consumer Commerce, you only need to configure the core ATG Commerce tables, as described in Creating Tables for Core ATG Commerce. You do not need to configure any additional database tables.

Creating Pioneer Cycling Reference Application TablesYou can configure your database to work with the ATG Adaptive Scenario Engine, core ATG Commerce, ATG Consumer Commerce, and the Pioneer Cycling reference application by running a single script, pioneercyclingall_ddl.sql, from the following directory:

/PioneerCyclingJSP/sql/install/database-vendorAlternatively, to configure just the database tables for the Pioneer Cycling reference application, run the pioneercycling_ddl.sql script from the same directory. The pioneercycling_ddl.sql script is derived from the subscripts described in Creating Tables for Core ATG Commerce as well as subscripts listed in the table below. If necessary, you can run these subscripts individually from the following directory:

/PioneerCyclingJSP/sql/db_components/database-vendor

File Name

Description Creates tables for Pioneer Cycling catalog extensions Create tables for Pioneer Cycling profile extensions Creates tables for the French Pioneer Cycling product catalog Creates tables for the Japanese Pioneer Cycling product catalog

b2c_product_catalog_ddl.sql b2c_user_profile_ddl.sql french_product_catalog.sql japanese_product_catalog.sql

Creating Tables for ATG Business CommerceWhen you want to configure your database to work with ATG Business Commerce, configure the core ATG Commerce tables first, as described in Creating Tables for Core ATG Commerce. Then , you can create

112 - Configuring and Populating a Production Database

ATG Commerce Programming Guide

the ATG Business Commerce tables by running the b2bcommerce_ddl.sql script from the following directory:

/B2BCommerce/sql/install/database-vendorThe b2bcommerce_ddl.sql script executes subscripts in a particular order to create the schema used by the ATG Business Commerce product. Some subscripts are part of the core ATG Commerce product and are described in the Creating Tables for Core ATG Commerce section. The remaining subscripts are described in the table below. If necessary, you can run an individual subscript from the following directory:

/B2BCommerce/sql/db_components/database-vendor

Script name

Description Creates tables for ATG Business Commerce order repository extensions Creates tables for ATG Business Commerce product catalog extensions Defines views for reporting Creates tables for ATG Business Commerce profile extensions Creates tables for the ATG Business Commerce contracts repository Creates tables for the ATG Business Commerce invoice repository Creates tables for ATG Business Commerce organization extensions

b2b_order_ddl.sql b2b_product_catalog_ddl.sql b2b_reporting_views.sql b2b_user_ddl.sql contracts_ddl.sql invoice_ddl.sql organization_ddl.sql

Creating Motorprise Reference Application TablesYou can configure your database to work with the ATG Adaptive Scenario Engine, core ATG Commerce, ATG Business Commerce, and the Motorprise reference application by running a single script, motorpriseall_ddl.sql, from the following directory:

/MotorpriseJSP/sql/install/database-vendorAlternatively, to configure just the database tables for the Motorprise reference application, run the

motorprise_ddl.sql script from the same directory.The motorprise_ddl.sql script is derived from the subscripts that are described in the Creating Tables for ATG Business Commerce section as well as other subscripts listed in the table below. If necessary, you can run these subscripts individually from the following directory:

/MotorpriseJSP/sql/db_components/database-vendor

122 - Configuring and Populating a Production Database

ATG Commerce Programming Guide

Purpose Creates tables for Motorprise profile extensions for authorization Creates tables for Motorprise custom catalog extensions Creates tables for Motorprise profile extensions for order details Creates tables for the Motorprise product catalog extensions for German content Creates tables for the Motorprise product catalog extensions for Japanese content

Script name

b2b_auth_cc_ddl.sql b2b_custom_catalog_ddl.sql b2b_user_orddet_ddl.sql german_catalog_ddl.sql japanese_catalog_ddl.sql

Using ATG Commerce with an Oracle DatabaseTo use ATG Commerce with an Oracle database, you need to configure the storage parameters for several tables and configure your ATG Commerce catalog for full text searching. This section covers these configuration tasks: Configuring Storage Parameters Configuring a Catalog for Oracle Full Text Searching

Configuring Storage ParametersThe SQL scripts that configure ATG Commerce databases on Oracle do not set storage parameters to control how free database space is allocated. You should spread your tablespaces across several disk drives and disk controllers. The size of the extents for the tablespaces needed to store ATG Commerce tables depends on your specific requirements in terms of the catalog items you have, the expected number of user profiles and Web site visitors, and the expected transaction volume. To allocate space, you need to specify the initial extent and the incremental extent for the tables that are likely to expand significantly. The initial extent parameter limits the amount of space that is reserved initially for a tables data segment. The incremental extent limits the additional space that is reserved when the segments initial data blocks become full, and more space is required. To begin, you can set the extent sizes for the tablespaces to be 512K with pctincrease equal to 50. If you are loading the Pioneer Cycling reference application or Motorprise reference application on an Oracle database, you should configure the storage parameters for the following ATG Commerce tables:

Table Name

Initial Extent 1M 1M

Incremental Extent 1M 1M

DCS_CATEGORY DCS_PRODUCT

132 - Configuring and Populating a Production Database

DCS_SKU DCS_MEDIA_BIN DSS_SCENARIO_INFO1M 4M 4M 1M 2M 2M

ATG Commerce Programming Guide

Note: These storage parameters are guidelines only. As previously mentioned, the optimal settings for your database may vary depending on the expected number of user profiles, Web site visitors, and catalog items, as well as the expected transaction volume. To specify a storage parameter, include it in the STORAGE clause of the CREATE TABLE statement for these tables. For additional information about configuring storage parameters, see your Oracle documentation.

Configuring a Catalog for Oracle Full Text SearchingIf your product catalog is stored in an Oracle database, you must configure the catalog to properly handle full text searching. There are two main steps involved in this configuration: 1. 2. Set up the proper ConText full text indexes on the appropriate columns in the database. Make sure the simulateTextSearchQueries property of each product catalog repository component is set to false.

These steps are described in more detail in the sections that follow.

Setting Up the ConText IndexesThe SQL Repository has built-in support for Oracles ConText full text search engine, which processes queries and returns information based on the content or themes of text stored in a text column of an Oracle database. To enable full text searching on columns, you must create ConText indexes for the columns. See your Oracle documentation for information about how to do this. If you are using the default product catalog, index these tables: DCS_PRODUCT DCS_CATEGORY

If you have imported the Pioneer Cycling product catalog into Oracle, index these tables: DCS_PRODUCT DCS_CATEGORY DFR_PRODUCT DFR_CATEGORY DJP_PRODUCT DJP_CATEGORY

If you have imported the Motorprise product catalog into Oracle, index these tables:

142 - Configuring and Populating a Production Database

ATG Commerce Programming Guide

DCS_PRODUCT DCS_CATEGORY DBC_CATEGORY_DE DBC_PRODUCT_DE

In each of these tables, create a ConText index on the DESCRIPTION, LONG_DESCRIPTION, and DISPLAY_NAME columns.

Configuring the Repository Components for Full Text SearchingTo enable a SQL Repository to use full text searching in an Oracle database, the simulateTextSearchQueries property of the SQL Repository component must be set to false. Make sure this property is set to false for any SQL Repository component that connects to an Oracle database. If you are using the default product catalog, the SQL Repository component for the catalog has the Nucleus address /atg/commerce/catalog/ProductCatalog. If you have exported the Pioneer Cycling catalog into Oracle, there are three SQL Repository components for the catalog:

/atg/commerce/catalog/ProductCatalog /atg/commerce/catalog/FrenchProductCatalog /atg/commerce/catalog/JapaneseProductCatalog

Using ATG Commerce with an MSSQL DatabaseIf your ATG Commerce product catalog is stored in a Microsoft SQL Server database, you must configure the database and catalog to properly handle full text searching. There are four steps involved in the configuration process: 1. 2. 3. 4. Set up the proper full text indexes on the appropriate columns in the database. Modify the template definition file. Set the simulateTextSearchQueries property of each product catalog repository component to false. Configure each search form handler component.

See the subsections that follow for information on completing each step.

Setting Up the MS SQL Full Text IndexesTo enable full text searching on columns, you must create full text indexes for the columns. See your Microsoft SQL Server documentation for specific information on performing this step. If you are using the default ATG Commerce product catalog, index these tables: DCS_PRODUCT

152 - Configuring and Populating a Production Database

DCS_CATEGORY DCS_PRODUCT DCS_CATEGORY DFR_PRODUCT DFR_CATEGORY DJP_PRODUCT DJP_CATEGORY

ATG Commerce Programming Guide

If you have imported the Pioneer Cycling product catalog into MS SQL, index these tables:

If you have imported the Motorprise product catalog into MS SQL, index these tables: DCS_PRODUCT DCS_CATEGORY DBC_CATEGORY_DE DBC_PRODUCT_DE For each of these tables, create an index for the LONG_DESCRIPTION, DESCRIPTION and DISPLAY_NAME columns.

Modifying the Template Definition FileIf you include any full text search queries in the XML template definition file (using the tag), verify that the queries use the appropriate format for MS SQL Full Text Query. For example:

description MATCHES "Ethernet" USING "MSSQL_TSQL" For more information on template definition files, see the ATG Repository Guide.

Configuring the Repository Components for Full Text SearchingTo enable a SQL repository to work with a full text search engine, the simulateTextSearchQueries property of the SQL repository component must be set to false. If you are using the default product catalog, the SQL repository component for the catalog has the Nucleus address /atg/commerce/catalog/ProductCatalog. If you have exported the Pioneer Cycling catalog into MS SQL, there are three SQL repository components for the catalog:

/atg/commerce/catalog/ProductCatalog /atg/commerce/catalog/FrenchProductCatalog /atg/commerce/catalog/JapaneseProductCatalog

162 - Configuring and Populating a Production Database

ATG Commerce Programming Guide

Configuring the Search Form HandlersIf your site uses components of class atg.commerce.catalog.SearchFormHandler (or atg.commerce.catalog.custom.CatalogSearchFormHandler for custom catalogs) to build search forms for full-text searching, you must configure these components to generate full-text queries in the appropriate form. To do this, each component must be configured as follows: 1. 2. Set the searchStringFormat property to MSSQL_TSQL. Set the allowEmptySearch property to false.

By default, ATG Commerce includes five instances of this class in /atg/commerce/catalog/:

AdvProductSearch CatalogSearch CategorySearch ProductSearch ProductTextSearch

If youve created your own instances of this class, be sure to also set the properties of those components as described above. Also note that the Motorprise Store Solution Set uses its own instance of

atg.commerce.catalog.custom.CatalogSearchFormHandler, which is located in Nucleus at /atg/projects/b2bstore/catalog/SearchCompare. If you have imported the Motorprise productcatalog into MS SQL, configure this component as described above as well.

Transferring Product Catalog and Price List Data Using Copy and SwitchThe database Copy and Switch features assist you in moving your product catalog and price lists data from one environment to another, for example, from a staging environment to a live production environment. The database Copy feature enables you to copy product catalog and price lists data from one database to another. The database Switch feature enables you to switch the product catalog and price lists on your Web site to use a different data source. Both database Copy and database Switch are Dynamo Application Framework (DAF) features that can be used with any database. However, ATG Commerce provides a user interface for performing a database copy or switch. This user interface requires initial configuration before you perform each type of update for the first time. (See the configuration sections in this chapter for more information on the configuration processes.) This chapter describes how to perform a database copy and switch of the ATG Commerce product catalog and price list repositories, which are included with ATG Commerce. It includes the following sections: Configuring a Database Copy Performing a Database Copy

172 - Configuring and Populating a Production Database

Configuring a Database Switch Performing a Database Switch

ATG Commerce Programming Guide

Note: For additional information about copying and switching databases and setting up your database servers, see the ATG Installation and Configuration Guide. For information about ATG Commerce database tables, see Appendix B: ATG Commerce Databases in this manual.

Configuring a Database CopyThis section describes the configuration steps you must take before performing a database copy of your product catalog and price lists data. You must complete this process before performing an initial database copy. However, you dont need to complete this process before subsequent database copies as long as the source and destination databases remain the same. Note: While the process used in this section assumes the data is in a SOLID database, the mechanisms are the same regardless of what kind of database is used. The differences are in the configuration of the environment within which ATG Commerce is running. Some database clients require additional configuration to perform the database copy. Refer to the database clients documentation for more information. Follow these configuration steps to prepare to copy the product catalog and price lists data from one database to another: 1. Create the destination database and all destination tables. Most interactions between the ATG Commerce and a database are done through JDBC, but the DBCopier in this process instead uses native commands according to the database manufacturer. It executes a new process and uses the vendors bulk copy tools to copy the tables from one database to another. This means that the DBCopier and, therefore, the JVM running Dynamo must have the proper environment set up as specified by the vendor. See your vendor documentation for these specifications. For information on the API for the specific DBCopier you are using, you can refer to the ATG API Reference. The following are some SOLID-specific configuration settings:

$SOLIDDIR should be defined in the environment in which Dynamo is running.The names of the servers to use when performing the database copy should be defined in the solid.ini file.

[Data Sources] SOLID=TCP/IP localhost 1313,SOLIDNote that SOLID is a valid server name. 2. Verify that the environment is set up correctly. Make sure that all the necessary environmental variables are set as specified by the vendor. Verify that all the necessary drivers or client tools are installed. Create a DBCopier component with which to copy the product catalog and price lists data. The class from which you instantiate the DBCopier depends on the database you are using. The following are subclasses of atg.adapter.gsa.DBCopier and are in package atg.adapter.gsa:

3.

182 - Configuring and Populating a Production Database

ATG Commerce Programming Guide

BcpDBCopier (for Microsoft and Sybase) DB2DBCopier OracleDBCopier SolidDBCopierFor more information on these DBCopier classes, you can refer to the ATG API Reference and the ATG Installation and Configuration Guide. Alternatively, you can use one of the preconfigured DBCopier components that are included with ATG Commerce. They are:

ProductCatalogMsSqlDBCopierNote: By default, the

ProductCatalogMsSqlDBCopier.maxTextOrImageSize property is set to a negative value (-1) in order to force the copier not to use the T option with the bcp utility; the T option does not work with MS SQL. For more information on the maxTextOrImageSize property, refer to the BcpDBCopier class (from which ProductCatalogMsSqlDBCopier is instantiated) in the ATG API Reference. For more information on the bcp utility, refer to your databasevendor documentation.

ProductCatalogOracleDBCopier ProductCatalogDB2DBCopier ProductCatalogSybaseDBCopier ProductCatalogSolidDBCopierThese DBCopier components are located in Nucleus at /atg/commerce/jdbc/. The following code example is taken from the properties file of ProductCatalogSolidDBCopier:

# This is an instance of the DBCopier specific for copying # ProductCatalog data from one Solid instance to another. $class=atg.adapter.gsa.SolidDBCopier # # The directory where temporary files are stored. # directory=d:/copytmp # # The name of the file that gets created to delete # data from the destination. # deleteDataFileName=del_dest_data.sql # # The list of tables that will actually be copied. # If there are references between tables, make sure they

192 - Configuring and Populating a Production Database

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

ATG Commerce Programming Guide

appear in the correct order. The tables are updated in the order they appear in this list. Copy will overwrite these tables. Only list static tables that do not change. There are 3 sets of tables listed here: product catalog, promotions, and price lists. These are the product catalog tables: dcs_folder dcs_media dcs_media_ext dcs_media_bin dcs_media_txt dcs_category dcs_category_acl dcs_product dcs_product_acl dcs_sku dcs_cat_groups dcs_cat_chldprd dcs_cat_chldcat dcs_cat_ancestors dcs_cat_rltdcat dcs_cat_keywrds dcs_cat_media dcs_cat_aux_media dcs_prd_keywrds dcs_prd_media dcs_prd_aux_media dcs_prd_chldsku dcs_prd_skuattr dcs_prd_groups dcs_prd_rltdprd dcs_prd_ancestors dcs_sku_attr dcs_sku_link dcs_sku_bndllnk dcs_sku_media dcs_sku_aux_media dcs_sku_replace dcs_sku_conf dcs_config_prop dcs_conf_options dcs_config_opt dcs_foreign_cat These are the promotion tables:

202 - Configuring and Populating a Production Database

ATG Commerce Programming Guide

# # dcs_promotion # dcs_promo_media # dcs_discount_promo # # These are the price list tables: # # dcs_price_list # dcs_complex_price # dcs_price # dcs_price_levels # dcs_price_level # dcs_gen_fol_pl # dcs_child_fol_pl # dcs_plfol_chld # # If you are using custom catalogs, you should also add these files: # # dcs_catalog # dcs_root_cats # dcs_allroot_cats # dcs_root_subcats # dcs_sub_catalogs # dcs_category_info # dcs_product_info # dcs_sku_info # dcs_cat_subcats # dcs_cat_subroots # dcs_cat_catinfo # dcs_catinfo_anc # dcs_prd_prdinfo # dcs_prdinfo_rdprd # dcs_prdinfo_anc # dcs_sku_skuinfo # dcs_skuinfo_rplc # dcs_gen_fol_cat # dcs_child_fol_cat # dcs_catfol_chld # # tables= \ dcs_folder,\ dcs_media,\ dcs_media_ext,\ dcs_media_bin,\ dcs_media_txt,\ dcs_category,\ dcs_category_acl,\ dcs_product,\ dcs_product_acl,\

212 - Configuring and Populating a Production Database

dcs_sku,\ dcs_cat_groups,\ dcs_cat_chldprd,\ dcs_cat_chldcat,\ dcs_cat_ancestors,\ dcs_cat_rltdcat,\ dcs_cat_keywrds,\ dcs_cat_media,\ dcs_cat_aux_media,\ dcs_prd_keywrds,\ dcs_prd_media,\ dcs_prd_aux_media,\ dcs_prd_chldsku,\ dcs_prd_skuattr,\ dcs_prd_groups,\ dcs_prd_rltdprd,\ dcs_prd_ancestors,\ dcs_sku_attr,\ dcs_sku_link,\ dcs_sku_bndllnk,\ dcs_sku_media,\ dcs_sku_aux_media,\ dcs_sku_replace,\ dcs_sku_conf,\ dcs_config_prop,\ dcs_conf_options,\ dcs_config_opt,\ dcs_foreign_cat,\ dcs_promotion,\ dcs_promo_media,\ dcs_discount_promo,\ dcs_price_list,\ dcs_complex_price,\ dcs_price,\ dcs_price_levels,\ dcs_price_level,\ dcs_gen_fol_pl,\ dcs_child_fol_pl,\ dcs_plfol_chld

ATG Commerce Programming Guide

Note: If you are running Pioneer Cycling, note that the ProductCatalogOracleDBCopier and ProductCatalogSolidDBCopier components specify additional tables because Pioneer Cycling uses additional tables for its product catalog. If you want to use a different database for the database copy, and therefore a different DBCopier, youll need to manually add these tables to the DBCopier. 4. Check that the directory specified in the directory property of the DBCopier exists in the file system used by Dynamo.

222 - Configuring and Populating a Production Database

ATG Commerce Programming Guide

5.

Verify that the tables property of the DBCopier component includes all the necessary tables to copy in the correct order. The tables in the destination database will be updated according to the list of tables in this property. Optionally, to obtain information on the activity of the DBCopier, you can set the loggingDebug property of the DBCopier component to true. Create an instance of atg.droplet.sql.DBCopyFormHandler to handle the database copy. Alternatively, you can use the preconfigured DBCopyFormHandler included with ATG Commerce. It is located in Nucleus at /atg/commerce/jdbc/ProductCatalogCopierForm. The following code example is taken from the properties file of

6. 7.

ProductCatalogCopierForm: # # This is an instance of the DBCopyFormHandler that is specific # to copying product catalog and price lists data. # $class=atg.adapter.gsa.DBCopyFormHandler $scope=request # # This is the DBCopier to use. The class used depends on the # brand of database being used. # DBCopier=/atg/commerce/jdbc/ProductCatalogSolidDBCopier8. Perform the database copy from the Copy Product Catalog and Price Lists page, as described in Performing a Database Copy.

Performing a Database CopyThis section describes the process to copy the contents of one database to another database. It can be used, for example, to copy the updated contents of the product catalog/price lists database on an Administration server to the product catalog/price lists database on a Staging server. Note: You must have read, write and delete permissions, as well as import and export permissions, to perform the database copy. If you do not have the appropriate permissions, ask your database administrator to copy the database. To perform a database copy of the product catalog and price lists data: 1. Make sure the configuration file of the DBCopier you are using has been updated to account for any database tables you have created or deleted. (See Configuring a Database Copy for a code example of a DBCopier configuration file.) Access the main Commerce Administration page of the Dynamo Administration UI using the port appropriate for your application server. See the ATG Installation and Configuration Guide to find the default port. For example, on JBoss the default URL is:

2.

http://hostname:8080/dyn/admin/atg/commerce/admin

232 - Configuring and Populating a Production Database

3. 4. Click the Copy link.

ATG Commerce Programming Guide

Note: your application must include the Dynamo Administration UI in order for you to access it. Click the Copy/Switch Commerce Data link. The system displays the Product Catalog and Price Lists Copy/Switch page.

The system displays the Copy Product Catalog and Price Lists page. 5. 6. 7. Enter the Server Name, Username, and Password for the Source database. Enter the Server Name, Username, and Password for the Destination database. Click the Copy button. The contents of the Source database are copied into the Destination database. Note that the time it takes to perform the database copy depends on the size of the database.

Configuring a Database SwitchThis section describes the configuration steps you must take before performing a database switch of the data source used by the product catalog and price lists on your Web site. You must complete this process before performing an initial database switch. However, you dont need to complete this process before subsequent database switches as long as the data sources involved remain the same. When you perform a database switch, you use a SwitchingDataSource to switch between two product catalog/price lists data sources. The SwitchingDataSource can switch from one underlying data source to another. For example, the method could switch from a test database to a production database. The Nucleus components used in this example are located at /atg/commerce/jdbc. Note: While the process used in this section assumes the data is in a SOLID database, the mechanisms are the same regardless of what kind of database is used. Follow these configuration steps to prepare to switch the data source used by the product catalog and price lists repositories: 1. Create the underlying data sources. Alternatively, you can use the data sources provided with the default configuration of ATG Commerce. They are:

/atg/commerce/jdbc/ProductCatalogDataSourceA and /atg/commerce/jdbc/ProductCatalogDataSourceB.These data sources are used as the example data sources in this procedure. 2. Configure the dataSource property in each of the data sources. The dataSource property contains a reference to the data source that stores information for connection to a database. By setting this property for ProductCatalogDataSourceA and ProductCatalogDataSourceB, you control to what database each data source points. By default, ProductCatalogDataSourceA.dataSource is set to ProductCatalogFakeXADataSourceA, and

242 - Configuring and Populating a Production Database

ATG Commerce Programming Guide

ProductCatalogDataSourceB.dataSource is set to ProductCatalogFakeXADataSourceB. Both of these FakeXADataSource datasources are configured as follows:

$class=atg.service.jdbc.FakeXADataSource driver=solid.jdbc.SolidDriver URL=jdbc:solid://hostname:port user=user password=passwordThe port for SOLID is typically 1313. Note: In this example, both FakeXADataSource data sources have the same configuration. In an actual database switch, the configuration of the two data sources would be different. 3. Create a SwitchingDataSource. Alternatively, you can use ProductCatalogSwitchingDataSource, which is located in Nucleus at /atg/commerce/jdbc/. This SwitchingDataSource is provided with the default configuration of ATG Commerce. A SwitchingDataSource is a DataSource that can switch between two or more underlying data sources. In a SwitchingDataSource, all DataSource method calls are passed through to the DataSource specified in the currentDataSource property, which is defined at run time. For more information on SwitchingDataSource, see the ATG API Reference and the ATG Installation and Configuration Guide. The following example shows the configuration for the ProductCatalogSwitchingDataSource included with ATG Commerce.

$class=atg.service.jdbc.SwitchingDataSource # # A map from data source names to data sources # dataSources=\ DataSourceA=/atg/commerce/jdbc/ProductCatalogDataSourceA,\ DataSourceB=/atg/commerce/jdbc/ProductCatalogDataSourceB # # The name of the data source that should be used # initialDataSourceName=DataSourceAThe dataSources property of a SwitchingDataSource is a mapping of data source names to the Nucleus path of each data source. The initialDataSource is the data source used. 4. Configure the ProductCatalog repository to use the SwitchingDataSource. By default, the ProductCatalog repository does not use this data source, so you must add the following to the ProductCatalog.properties file at localconfig/atg/commerce/catalog/:

252 - Configuring and Populating a Production Database

5.

ATG Commerce Programming Guide

dataSource=/atg/commerce/jdbc/ProductCatalogSwitchingDataSourceConfigure the PriceLists repository to use the SwitchingDataSource. By default, the PriceLists repository does not use this data source, so you must add the following to the PriceLists.properties file at localconfig/atg/commerce/pricing/priceLists/:

dataSource=/atg/commerce/jdbc/ProductCatalogSwitchingDataSource6. Configure the switchingDataSource property of the ProductCatalogSwitcher form handler (class atg.droplet.sql.SwitchDataSourceFormHandler) to use the SwitchingDataSource. The Switch UI uses the ProductCatalogSwitcher form handler to perform the database switch; the switchingDataSource property specifies the specific SwitchingDataSource controlled by the form handler. Perform the database switch, as described in Performing a Database Switch.

7.

Performing a Database SwitchThis section describes the process of switching the data source used by the product catalog and price lists on your Web site. When you perform a database switch, you must do so on each DRP server instance in a Dynamo server cluster. This is necessary because the SwitchingDataSource components on separate instances do not synchronize themselves. Consequently, for each DRP server instance, you need to connect to the servers Admin port, access the Commerce Administration UI, and perform the database switch. Follow these steps to switch the data source currently used by the product catalog and price lists on your Web site. 1. Access the main Commerce Administration page of the Dynamo Administration UI using the port appropriate for your application server. See the ATG Installation and Configuration Guide to find the default port. For example, on JBoss the default URL is:

http://hostname:8080/dyn/admin/atg/commerce/admin/en/index.jhtmlNote: your application must include the Dynamo Administration UI module in order for you to view this URL. 2. Click the Copy/Switch Commerce Data link. The system displays the Product Catalog and Price Lists Copy/Switch page. 3. Click the Switch link. The system displays the Switch the Product Catalogs and Price Lists Data Source: Prepare page. The names and paths of the available data sources are listed. The data source currently being used by your site is displayed below the table. 4. 5. Select the name of the data source to which you want to switch from the drop-down list at the bottom of the page. Click the Prepare for Switch button.

262 - Configuring and Populating a Production Database

ATG Commerce Programming Guide

The system prepares for the switch by sending events to each of the repositories that are using the switching data source. Each repository performs any functions needed to prepare for a switch. When preparation is complete, the following message displays at the top of the Switch the Product Catalogs and Price Lists Data Sources: Switch page: Now that you have prepared the data source, you can finish the switch. 6. Click the Switch button to complete the switch. When the switch is complete, the page displays the following message: You have finished switching the data source used by the Product Catalog and the Price Lists. The data source to which you just switched is now listed as the current data source.

Transferring Demo DataYou can move the Pioneer Cycling and Motorprise demo data from the SOLID database to another database using the ATG startSQLRepository utility. You can export that data to your production database to test the demos against your production environment. Once you have exported the data to your database, you must update your connection pool service to use the new database. For more information on configuring connection pools, refer to the Configuring Databases and Database Access section of the ATG Installation and Configuration Guide. To transfer the demo data to your production database, you must do the following: Export the demo data Reset your production database, if necessary Import the demo data

Microsoft SQL users: In order to run the ATG demos with a Microsoft SQL database, you must configure the database to be case-sensitive. See your MS SQL documentation for instructions.

Exporting the Demo Data from SOLIDMake sure that either there are no connection pool properties files, or that they are pointing to the demo SOLID database. Start the SOLID database and use the commands below (on one line, with no line breaks) to export the demo data to an XML file called all.xml.

Demo Application Pioneer Cycling

Command

bin/startSQLRepository -m PioneerCyclingJSP -exportRepositories all all.xml bin/startSQLRepository -m MotorpriseJSP -exportRepositories all all.xml

Motorprise

272 - Configuring and Populating a Production Database

ATG Commerce Programming Guide

For more information, see the ATG Installation and Configuration Guide.

Importing the Demo Data to Your DatabaseYour connection pool properties file must be pointing to the new target database. All Dynamo supported databases can import all.xml. Oracle users: Before importing the demo data, set the useSetCharacterStream property of all SQL repository components to true so that non-8859 characters are displayed correctly. You can set this property in your localconfig/GLOBAL.properties file: useSetCharacterStream=true From the command line, go to the /home directory. Use the commands below (on one line, with no line breaks) to import the data contained in all.xml to your target database. Your connection pool properties file must be pointing to the new target database.

Demo Application Pioneer Cycling Motorprise

Command

bin/startSQLRepository -m PioneerCyclingJSP -import all.xml bin/startSQLRepository -m MotorpriseJSP -import all.xml

For more information about the startSQLRepository utility, see the ATG Repository Guide.

Destroying Database Tables for ATG CommerceThis section describes how to destroy the ATG Commerce database tables. When you destroy database tables, you need to destroy them in the opposite order you used for creating them. If you want to remove all tables for ATG Business Commerce, for example, you would destroy first the ATG Business Commerce tables, then the core ATG Commerce, followed by the ATG Adaptive Scenario Engine tables. This section includes the following subsections: Destroying Tables for Core ATG Commerce Destroying Tables for ATG Consumer Commerce Destroying Tables for ATG Business Commerce

For descriptions of core ATG Commerce, ATG Business Commerce, and ATG Consumer Commerce database tables, see Appendix B: ATG Commerce Databases.

Destroying Tables for Core ATG CommerceTo destroy all core ATG Commerce tables, run the drop_dcs_ddl.sql script from the following directory:

/DCS/sql/install/database-vendor

282 - Configuring and Populating a Production Database

ATG Commerce Programming Guide

Description Destroys the schema for the ATG Commerce Claimable repository Destroys the tables for the ATG Commerce credit card profile extensions Destroys the table for handling shopping cart events Destroys the tables for the ATG Commerce inventory system Destroys the tables for the ATG Commerce purchase process Destroys the tables that contain order markers Destroys the tables for the ATG Commerce price lists Destroys the tables for the ATG Commerce product catalog Destroys the tables for the ATG Commerce promotions Destroys the views for reporting Destroys additional views for reporting Destroys additional views for reporting Destroys additional views for reporting Destroys the tables for the ATG Commerce Giftlist Services Destroys the tables for the ATG Commerce promotions profile extensions

The drop_dcs_ddl.sql script is derived from the subscripts listed in the table below. If necessary, you can run these subscripts individually from the following directory:

/DCS/sql/uninstall/database-vendor

File Name

drop_claimable_ddl.sql drop_commerce_user.sql drop_dcs_mappers.sql drop_inventory_ddl.sql drop_order_ddl.sql drop_order_markers_ddl.sql drop_priceLists_ddl.sql drop_product_catalog_ddl.sql drop_promotion_ddl.sql drop_reporting_views.sql drop_reporting_views1.sql drop_reporting_views2.sql drop_reporting_views3.sql drop_user_giftlist_ddl.sql drop_user_promotion_ddl.sql

Destroying Tables for ATG Consumer CommerceTo destroy all ATG Consumer Commerce tables, you only need to destroy the core ATG Commerce tables, as described in Destroying Tables for Core ATG Commerce. You do not need to destroy any additional database tables.

292 - Configuring and Populating a Production Database

ATG Commerce Programming Guide

Destroying Pioneer Cycling Reference Application TablesYou can destroy the database tables for the ATG Adaptive Scenario Engine, core ATG Commerce, ATG Consumer Commerce, and the Pioneer Cycling reference application by running a single script, drop_pioneercyclingall_ddl.sql, from the following directory:

/PioneerCyclingJSP/sql/install/database-vendorAlternatively, to destroy just the database tables for the Pioneer Cycling reference application, run the drop_pioneercycling_ddl.sql script from the same directory. The drop_pioneercycling_ddl.sql script is derived from the subscripts that are described in Destroying Tables for Core ATG Commerce section as well as those listed in the table below. If necessary, you can run these subscripts individually from the following directory:

/PioneerCyclingJSP/sql/uninstall/database-vendor

Script name

Purpose Destroys tables for the Pioneer Cycling catalog extensions Destroys tables for the Pioneer Cycling profile extensions Destroys tables for the French Pioneer Cycling catalog Destroys tables for the Japanese Pioneer Cycling catalog

drop_b2c_product_catalog_ddl.sql drop_b2c_user_profile_ddl.sql drop_french_product_catalog.sql drop_japanese_product_catalog.sql

Destroying Tables for ATG Business CommerceTo destroy all ATG Business Commerce tables, destroy first the core ATG Commerce tables, as described in Destroying Tables for Core ATG Commerce and then run the ATG Business Commerce script appropriate for your product suite. Note: While dropping these tables you may see error messages indicating that six views could not be removed. This is not an error. During the installation of ATG Business Commerce, six views that are created by ATG Consumer Commerce are removed because they are not applicable in ATG Business Commerce. The views involved are listed below: View DRPT_PRODUCTS View DRPT_CATEGORY View DRPTW_CAT_SALES View DRPTM_CAT_SALES View DRPTQ_CAT_SALES View DRPTA_CAT_SALES

302 - Configuring and Populating a Production Database

ATG Commerce Programming Guide

To destroy all ATG Business Commerce tables, destroy the core ATG Commerce tables, as described in Destroying Tables for Core ATG Commerce, and then run the drop_b2bcommerce_ddl.sql script from the following directory:

/B2BCommerce/sql/install/database-vendorThe drop_b2bcommerce_ddl.sql script is derived from subscripts described in Destroying Tables for Core ATG Commerce as well as subscripts listed in the table below. If necessary, you can run each subscript individually from the following directory:

/B2BCommerce/sql/uninstall/database-vendor

Script name

Purpose Destroys the tables for the ATG Business Commerce order repository extensions Destroys the tables for the ATG Business Commerce product catalog extensions Destroys the views for reporting on ATG Business Commerce Destroys the tables for the ATG Business Commerce profile extensions Destroys the tables for the ATG Business Commerce contracts repository Destroys the tables for the ATG Business Commerce invoice repository Destroys the tables for the ATG Business Commerce organization extensions

drop_b2b_order_ddl.sql drop_b2b_product_catalog_ddl.sql drop_b2b_reporting_views.sql drop_b2b_user_ddl.sql drop_contracts_ddl.sql drop_invoice_ddl.sql drop_organization_ddl.sql

Destroying Motorprise Reference Application TablesYou can destroy the database tables for ATG Adaptive Scenario Engine, core ATG Commerce, ATG Business Commerce, and the Motorprise reference application by running a single script, drop_motorpriseall_ddl.sql, from the following directory:

/MotorpriseJSP/sql/install/database-vendorAlternatively, to destroy just the database tables for the Motorprise reference application, run the

drop_motorprise_ddl.sql script from the same directory.The drop_motoprise_ddl.sql script is derived from the Destroying Tables for ATG Business Commerce as well as subscripts listed in the table below. If necessary, you can run each subscript individually from the following directory:

312 - Configuring and Populating a Production Database

Script name

ATG Commerce Programming Guide

/MotorpriseJSP/sql/uninstall/database-vendor

Purpose Destroys tables for the Motorprise profile extensions for authorization Destroys tables for the Motorprise custom catalog extensions Destroys tables for the Motorprise profile extensions for order details Destroys tables for the Motorprise product catalog extensions for German content Destroys tables for the Motorprise product catalog extensions for Japanese content

drop_b2b_auth_cc_ddl.sql drop_b2b_custom_catalog_ddl.sql drop_b2b_user_orddet_ddl.sql drop_german_catalog_ddl.sql drop_japanese_catalog_ddl.sql

322 - Configuring and Populating a Production Database

ATG Commerce Programming Guide

3 Integrating Third-Party Software With ATG Commerce

This chapter describes how to integrate ATG Commerce with the following third party software applications: Integrating Payflow Pro with ATG Commerce Integrating CyberSource with ATG Commerce Integrating TAXWARE with ATG Commerce

Note: You can use more than one third-party application module. The order of the modules affects their precedence, and the module with the highest precedence is at the end of the line. If two application modules each implement the same capability, such as address verification, then the address verification implementation of the module with the highest precedence is used. As an example, CyberSource and TAXWARE both have a tax calculation feature. When you assemble your application, be sure to specify the module for the third party software you want to use. To use CyberSource for credit verification and TAXWARE instead of CyberSource for tax information, include the following modules: For ATG Business Commerce:

B2BCommerce Cybersource TaxwareFor ATG Consumer Commerce:

B2CCommerce Cybersource Taxware

Integrating Payflow Pro with ATG CommerceThe Payflow Pro payment object handles credit card authorization, settlement, and crediting. To use Payflow Pro with ATG Commerce, follow these steps: 1. 2. 3. 4. Install and register Payflow Pro. See Setting Up Payflow Pro. Start Payflow Pro Provide property values to two Nucleus components. See Pre-Configuring the Integration. Assemble an application that includes ATG Commerce and Payflow Pro. See Using ATG Commerce with Payflow Pro.

333 - Integrating Third-Party Software With ATG Commerce

Setting up Payflow Pro

ATG Commerce Programming Guide

Before using Payflow Pro, be sure to install and configure Payflow Pro SDK, which involves downloading the product, setting several environment variables, and registering with VeriSign. The registration process has two parts: setting up a Payflow Pro account and obtaining a Merchant account. Refer to the documentation and information available at http://www.versign.com. Keep