Export (0) Print
Expand All

Microsoft Commerce Server 2000: Commerce and BizTalk Server Integration

Commerce Server 2000

With the arrival of the Internet, the pattern of electronic commerce has dramatically changed. In particular, the Internet has introduced many new ways of trading, enabling interaction between groups that previously could not economically afford to trade with one another. The exchange of information takes the form of fulfilling requests for items such as quotes, bids, catalogs, purchase orders, order confirmations, shipping documents, invoices, and payment information.

Building business-to-business (B2B) e-commerce systems presents many challenges. Typically, each company stores its data and documents in formats that can be different from the formats that other participating companies use. Companies need a way to connect internal line-of-business applications and vendors with systems that improve customer service and reduce operating costs. By automating and integrating business and data-exchange processes between buyers and sellers, companies can increase efficiency, reduce errors, and lower costs.

You can integrate Microsoft BizTalk Server 2000 with Microsoft Commerce Server 2000 to build B2B e-commerce networks with your vendors. Your vendors can then send you catalogs of their products and fill orders for products that you are selling on your site.

BizTalk Server Overview

Cc936691.spacer(en-US,CS.10).gif Cc936691.spacer(en-US,CS.10).gif

BizTalk Server provides a standard gateway for sending and receiving documents across the Internet, as well as a range of services that ensure data integrity, delivery, security, and support for the BizTalk Framework and other key document formats. BizTalk Server features include the ability to design and use XLANG schedules (executable business-process files), integrate existing applications, define document specifications and specification transformations, and monitor and log run-time activity. BizTalk Server provides these features in two main subsystems:

  • BizTalk Messaging Services 

  • BizTalk Orchestration Services 

BizTalk Messaging Services

BizTalk Messaging Services enable you to do the following:

  • Receive incoming documents 

  • Parse the documents to determine their format 

  • Extract key identifiers and identify document-specific processing rules 

  • Deliver documents to their destinations 

  • Track documents 

  • Map data 

  • Generate and correlate receipts 

  • Ensure data integrity and security 

This section describes the following BizTalk Messaging Services:

  • Receive functions 

  • Transport services 

  • Data parsers 

  • Data validation services 

  • Document delivery services 

  • Security 

Receive Functions

The Receive functions provided in BizTalk Server enable a server to poll for business documents that are posted at specified locations. The following table shows the Receive functions supported by BizTalk Server and where they are configured.

Receive function

Configure using

File

BizTalk Server Administration

Hypertext Transfer Protocol (HTTP)

ASP page

Hypertext Transfer Protocol Secure (HTTPS)

ASP page

Message Queuing

BizTalk Server Administration

Simple Mail Transfer Protocol (SMTP)

Microsoft Exchange script

Transport Services

BizTalk Server supports a core set of transport services that enable a server to send documents to organizations or applications. Documents can be sent whether or not the recipients are capable of communicating directly with the server by means of a Component Object Model (COM) interface. BizTalk Server supports the following transport services:

  • Application integration components (AIC) 

  • File 

  • HTTP 

  • HTTPS 

  • Message queuing 

  • SMTP 

Data Parsers

BizTalk Server supports data parsers for a variety of document standards, such as ANSI X12, UN/EDIFACT, and valid, well-formed Extensible Markup Language (XML). BizTalk Server also supports BizTalk Framework 2.0. For more information about BizTalk Framework 2.0, see the Microsoft BizTalk Server Web site at http://www.microsoft.com/biztalk/ . BizTalk Server also provides parsers for flat files; you can register and use your own custom parser components.

Data Validation Services

BizTalk Server validates data by verifying each instance of a document against a specification. You create specifications in BizTalk Editor; specifications can be based on industry standards (such as EDIFACT, X12, and XML) or on flat files (delimited, positional, or delimited and positional). If a document does not match the specification, it is placed into a suspended queue for further analysis.

Document Delivery Services

BizTalk Server uses configurable BizTalk Messaging Services properties to provide reliable document delivery. You can configure these properties to do the following:

  • Set service windows for sending documents 

  • Send or receive receipts 

  • Set the number of send retries 

  • Set the time between retry attempts 

BizTalk Server supports the use of BizTalk Framework-compliant envelopes to provide reliable messaging features. For more information about BizTalk Framework 2.0, see the Microsoft BizTalk Server Web site at http://www.microsoft.com/biztalk/ .

BizTalk Server queues documents to a central location. If a server fails, rollover mechanisms enable a new server to take control of the documents and process them.

Security

BizTalk Server supports encryption and digital signatures. Public-key encryption technology is supported for all documents that you transmit using BizTalk Server Transport Services. BizTalk Server also supports decryption and signature verification for the documents that it receives.

BizTalk Orchestration Services

BizTalk Orchestration Services integrate long-running business processes with the applications that run the business processes. BizTalk Orchestration Services can handle complex transactions that require weeks or months to complete, not just minutes or hours.

Integration is handled by an executable business-process file called an XLANG schedule. Additional services run XLANG schedule instances. You can also implement concurrent actions within a single XLANG schedule.

BizTalk Orchestration Services support the following implementation technologies:

  • BizTalk Messaging Services 

  • COM components 

  • Message Queuing Services 

  • Windows Script components 

XLANG Language

XLANG is a language that describes the logical sequence of a business process, as well as the implementation of the business process using various technology components or services. The XLANG language is expressed in Extensible Markup Language (XML).

XLANG Schedules

An XLANG schedule is a business process that you implement by connecting each step in the process to a technology such as a Component Object Model (COM) or Windows Scripting Component, or to another service that can execute the step.

A service called the XLANG Scheduler Engine then runs the XLANG schedule. The engine controls the instantiation, execution, dehydration, and rehydration of an XLANG schedule, or multiple instances of one or more schedules.

Dehydrating schedules reduces the load on the computer that is hosting the schedule. When a schedule is dehydrated, all state information in the Microsoft SQL Server database is stored while the XLANG Scheduler Engine waits to receive a message before it executes the next action in the business process.

When the XLANG Scheduler Engine receives the message, it rehydrates the schedule by retrieving all state information for the XLANG schedule instance from SQL Server.

Common Business-to-Business Requirements

Cc936691.spacer(en-US,CS.10).gif Cc936691.spacer(en-US,CS.10).gif

Although each business-to-business (B2B) site is different, many requirements are common to all sites. These requirements include the following:

  • Catalog exchange and management 

  • Order management and order workflow 

  • Secure exchange of business documents 

  • Integration of existing business applications 

  • Advanced product pricing and product configuration 

BizTalk Server and Commerce Server offer a number of core features that can help companies satisfy these requirements in a timely, cost-effective manner. This section describes how to exchange and manage catalogs and orders.

Catalog Exchange and Management

The catalog stores the products and services that a company procures through a B2B application. A catalog must be accurate, current, complete, extensible, and flexible. In many scenarios, the catalog also has to support multiple vendors.

Commerce Server and BizTalk Server offer a number of features that can help you manage your catalog. Figure 13.1 shows how you can use products from multiple vendors in a catalog management scenario.

Cc936691.f13csrk01(en-US,CS.10).gif 

Figure 13.1 Catalog management scenario 

In this scenario, the B2B site hosts catalogs from a number of suppliers. Buyers can purchase products and services from the supplier catalogs through the B2B site. Catalog exchange and management are major issues in this situation. For example, the B2B application might host catalogs for hundreds of suppliers. It is likely that each supplier will send catalog data to the B2B application in a different file format. This poses a significant challenge to the system administrator of the B2B site, who must convert the various formats into a single one that can be used on the B2B site.

BizTalk Server and Commerce Server can facilitate catalog management. Both products include features that specifically address common B2B catalog management challenges, such as the following:

  • Catalog mapping tools 

  • Commerce Server XML format for catalogs 

  • Catalog import, export, and exchange tools 

  • Application Integration Components (AIC) 

You can use these tools to streamline the process of aggregating catalog data in various formats into a single, consistent format, thereby eliminating the need to write costly mapping scripts for each supplier that hosts a catalog on your B2B site. In addition to lowering catalog management costs, these tools can also significantly reduce the time it takes to bring a new supplier online.

Catalog Mapping Tools

The BizTalk Editor and Mapper tools provide easy-to-use, drag-and-drop interfaces that you can use to define and map catalog formats. These tools can greatly reduce the time it takes to define the structure of various supplier catalogs, and also to graphically define maps between different catalog schemas.

BizTalk Editor

You can use BizTalk Editor to create, edit, and manage specifications using XML. You can base these specifications on industry standards (such as EDIFACT, X12, and XML) or on flat files (delimited, positional, or delimited and positional).

Using BizTalk Editor, you can graphically create catalog schema definitions for each supplier, thereby reducing the time it takes to define the structure of various supplier catalogs. BizTalk Editor supports a number of file formats that can describe most catalog formats.

BizTalk Editor creates specifications by interpreting the properties of records and fields contained in a file. Specifications represent the structured data as XML, regardless of the original format. In addition, specifications that you create or modify with BizTalk Editor provide common data descriptions that BizTalk Mapper can use to transform data across dissimilar formats. The specifications provide data portability across business processes.

BizTalk Mapper

BizTalk Mapper is a transformation design tool that enables you to create a correspondence between the records and fields in two different specification formats. BizTalk Mapper supports complex structural transformations from records and fields in a source specification tree to records and fields in a destination specification tree.

The cross-reference and data-manipulation functionality creates a map that provides a set of instructions that define the relationship between the two different specification formats. (You use BizTalk Editor to define the specification formats.)

BizTalk Messaging Service uses a map within a channel to specify how data existing in a document in a given format is transformed into data in a document conforming to a different format. Channels, which are named sets of properties, identify the document source and define the processing steps performed by BizTalk Server to deliver the document to the destination designated by the messaging port with which the channel is associated.

BizTalk Mapper uses links and functoids that enable complex structural manipulation between source data elements and destination data elements to accomplish this translation.

Functoids are similar to Microsoft Visual Basic controls that can be dragged onto the map itself. You use BizTalk Mapper to graphically represent the structural transformation relationship between the source data elements and destination data elements.

Functoids use predefined formulas and specific values, called arguments, to perform calculations. BizTalk Mapper runs these calculations based on the designated order of the records and fields. By selecting a functoid from the Functoid Palette, dragging it to the mapping grid, and linking it to elements in the source specification and destination specification trees, you can combine data, modify dates or times, concatenate data, or perform other operations. Figure 13.2 shows the Functoid Palette in BizTalk Mapper.

Cc936691.f13csrk02(en-US,CS.10).gif

Figure 13.2 Functoid Palette in BizTalk Mapper 

You can use the Value Mapping functoid in two different types of mapping scenarios:

  • Mapping from a Commerce Server catalog specification to a flat schema 

  • Mapping from a flat schema to a Commerce Server catalog

Mapping from a Commerce Server Catalog to a Flat Schema

Commerce Server site managers need the ability to map data from a Commerce Server catalog to a flat schema. You use the Value Mapping (Flattening) functoid to do this. The following code is an example of three records in a Commerce Server catalog:

<Root>
<Record>
<Field Name="X" Value="1"/>
<Field Name="Y" Value="2"/>
<Field Name="Z" Value="3"/>
</Record>
<Record>
<Field Name="X" Value="4"/>
<Field Name="Y" Value="5"/>
<Field Name="Z" Value="6"/>
</Record>
<Record>
<Field Name="X" Value="7"/>
<Field Name="Y" Value="8"/>
<Field Name="Z" Value="9"/>
</Record>
</Root>

The following code is an example of a flat schema:

<Root>
<Record X="1" Y="2" Z="3"/>
<Record X="4" Y="5" Z="6"/>
<Record X="7" Y="8" Z="9"/>
</Root>

In this mapping scenario, it is important to maintain the one-to-one correspondence between the three records in the catalog and the three records in the flat schema. Figure 13.3 shows a map that maintains this correspondence.

Cc936691.f13csrk03(en-US,CS.10).gif 

Figure 13.3 Mapping from a Commerce Server catalog to a flat schema 

Mapping from a Flat Schema to a Commerce Server Catalog

You can use the Looping functoid to map a flat schema to a Commerce Server catalog. For more information about flat schemas and Commerce Server catalogs, see "Using the Value Mapping (Flattening) Functoid" in BizTalk Server 2000 Help.

Figure 13.4 shows a flat schema mapped to a Commerce Server catalog.

Cc936691.f13csrk04(en-US,CS.10).gif

Figure 13.4 Mapping from a flat schema to a Commerce Server catalog 

Generating Catalogs in the Commerce Server XML Format

A product catalog must exist in the XML or CSV format required by Commerce Server before Commerce Server can import it successfully. If the vendor supplying the catalog is using Commerce Server to produce the catalog and BizTalk Server to deliver the catalog, the process is quite simple. A business manager can select a catalog and send it to a vendor.

However, if the vendor doesn't use Commerce Server to produce the catalog, you can still use BizTalk Server to import the catalog to your Commerce Server application. You can take advantage of the Mapper tool in BizTalk Server, using the Looping functoid, to convert the product catalog from its native format to the XML format required by Commerce Server.

If vendors don't use BizTalk Server, they must devise a proprietary solution to convert their catalog format to the XML format required by Commerce Server. For more information about the XML format required by Commerce Server, see "Catalog XML Structures" in Commerce Server 2000 Help.

Catalog Import, Export, and Exchange Tools

You can import catalogs into Commerce Server databases in XML or comma-separated value (CSV) file format from external sources. For example, if you have catalogs in other databases, you can import them into a Commerce Server database, and then use Business Desk to manage them.

You might want to export a catalog if, for example, you are selling products wholesale, and you want to make your catalog available to retailers. Or you might want to export a catalog to another application, such as an inventory system or a pricing system. You can export your catalogs in XML format.

You can use BizTalk Server to exchange catalogs with your vendors. After you convert a catalog to an XML document, BizTalk Server processes it to save the XML catalog file in a shared folder on the destination computer on which Commerce Server is installed. If the destination computer is on a local area network (LAN), then BizTalk Server does not need to be installed on the destination computer. However, if you use HTTP to send the catalog, then BizTalk Server must be installed on the destination computer.

Import Catalogs from Other Data Sources

To convert a catalog to XML or CSV format, you can use your existing database management system to save the catalog in XML or CSV format, or you can write a Visual Basic script to convert the catalog for you.

You normally use the Catalog Editor module of Business Desk to import a catalog. However, you can also use the ImportXML method of the CatalogManager object to programmatically import a catalog that is already in XML format into the Commerce Server Catalogs database. For more information about this method, see "CatalogManager.ImportXML" in Commerce Server 2000 Help.

To verify that your catalog XML file conforms to the proper schema, do the following:

  1. Edit the root element in your catalog XML file so that it references the catalog XML-Data Reduced (XDR) file provided in the Commerce Server root installation folder. For example: 

    <MSCommerceCatalogCollection xmlns="x-schema:C:\Program Files\Microsoft 
    Commerce Server\CatalogXMLSchema.xml">
    
  2. Open your catalog XML file in Internet Explorer. Internet Explorer verifies that the XML file conforms to the specified schema and provides diagnostic errors if it does not conform. 

If you have BizTalk Server installed on the same computer as Commerce Server, you can use an AIC to automate the process of importing XML catalogs into Commerce Server as they arrive from vendors using BizTalk Server.

Export Catalogs

You can export a catalog to a known path or a shared folder called CommerceCatalogs on the computer on which Commerce Server is installed. Exporting a catalog can enable you to share your catalog with a business partner, or outsource the development and maintenance of your catalogs.

Before you can export a catalog, you must create a shared folder on Commerce Server, or you must know the name of a directory on the server that you can access. You can then use Business Desk to export the catalog to the shared folder or the directory.

Exchange Catalogs

After you save an XML catalog file on the destination computer, you use Business Desk to import the catalog from the shared folder on the destination computer. You can then publish the catalog on your Web site. You can also use the Catalog Editor module in Business Desk to edit the newly imported catalog, if necessary. For information about importing a catalog using Business Desk, see "Importing a Catalog" in Commerce Server 2000 Help.

You can set up BizTalk Server to automatically transform an incoming catalog to Commerce Server. Figure 13.5 shows how BizTalk Server processes an XML catalog file.

Cc936691.f13csrk05(en-US,CS.10).gif 

Figure 13.5 Processed XML catalog file 

Application Integration Components

Application integration components (AIC) are COM objects that the BizTalk Server state engine calls to deliver data to an application. If you configure a messaging port in BizTalk Server to include the use of an AIC for application integration, this component is automatically instantiated and passed the requisite data. The component then determines how to communicate this data back to the application. You can use private API calls, invoke other COM objects, use database writes, or other methods to do this.

An AIC typically serves as an integration point between BizTalk Server and a back-end application that cannot be accessed directly from BizTalk Server. The AIC functions both as the integration point and as a simulated back-end application. The messaging port passes a purchase order, which is received from the buyer system, to the AIC. The AIC transforms the purchase order message into an invoice message and submits it to a channel in BizTalk Messaging Services on the seller system.

If you have BizTalk Server installed on the same computer as Commerce Server, you can use an AIC defined by BizTalk Server to automate the process of importing XML catalogs into Commerce Server through BizTalk Server. For information about creating an AIC, see "Creating the Application Integration Component (AIC)" in BizTalk Server 2000 Help.

Order Management

Your order fulfillment process might be managed by an internal order management system within your private network, a remote distribution and fulfillment center, or a vendor that provides an outsourced fulfillment service. Companies that run successful e-commerce sites quickly realize the need to integrate their Web order-capture process with their order fulfillment process.

You can submit orders to BizTalk Server in several different ways, depending on your needs. You can use mapping to submit orders, you can use a variety of protocols to submit orders, or your trading partner can create a Commerce Server site or a non-Commerce Server site to receive the submitted orders. For additional methods of integrating Commerce Server order processing with your existing systems, see Chapter 10, "Integrating Third-Party ERP Systems with Commerce Server Applications."

Order Routing Manager

Commerce Server supports both internal routing and routing through BizTalk Server. The Order Routing Manager is a design-time component that you can use to define, configure, and maintain a RoutingConfig table. You can use the RoutingConfig table to route the following methods:

  • INT (internal) 

  • BTS (BizTalk Server) 

You use the INT and BTS methods with the components required for routing.

Splitter Pipeline Component

The Splitter is a pipeline component that creates a collection of Shipment dictionaries (each pointing to a collection of references to line items). You can configure the Splitter to create the required data structures by taking the Shipping method and Vendor ID properties as input. The required data or input distinguishers (for example, shipping_method_id and shipping_address_id) are the keys in the required data structure or dictionary.

You can use the Splitter to specify the input distinguishers and then use the associated dictionary item as the input. By specifying the input distinguishers, you add a column to the product catalog indicating the source of the product. At this point, you need to use the associated dictionary item as the input distinguisher that you configure on the Splitter component. The Splitter creates multiple dictionaries (one for each source of the product).

You can implement the Splitter using the catalog vendor ID feature based on the product type. If you do this, you must create a separate catalog for each source and then assign each catalog a vendor ID to specify the source for the catalog products. Commerce Server then automatically places the items into separate order forms when a customer adds them to the shopping cart (order group). This splits the order into groups of items, which you can then send to different back-end systems.

ShippingMethodRouter Component

The ShippingMethodRouter is a run-time component that iterates through the Order Routing dictionaries to invoke the components specified by the ShippingMethodManager object. The router components are the following:

  • CommerceRouter. Wraps the OrderGroup.SaveAsOrder method. 

  • BTSRouter. Wraps the GenerateXMLForDictionaryUsingSchema method. 

The router components are followed by a submit call to BizTalk Server. Figure 13.6 shows how the Splitter and the ShippingMethodRouter component work with other objects to process shipments.

Cc936691.f13csrk06(en-US,CS.10).gif 

Figure 13.6 Processing shipments with the Splitter and ShippingMethodRouter 

Order Form Integration

Order form integration is the process of splitting an order form into multiple purchase orders, then using BizTalk Server to send them to the appropriate vendors. The Commerce Server Solution Sites include conditional code for submitting per-vendor purchase orders to BizTalk Server, thus enabling the purchase orders to be sent to the appropriate vendors. This functionality is built into the Solution Sites, and is configured using Commerce Server Manager.

Associating a Vendor with Each Catalog

When you set up an agreement with a vendor, the vendor ID is automatically made available to Commerce Server. The vendor ID is the organization name that you specify for the vendor when you create a destination organization for the source server. For more information, see "Creating Source and Destination Organizations on the Source Server" in Commerce Server 2000 Help.

Commerce Server uses the vendor ID associated with a product catalog to identify the vendor for each product in an order. It does this by identifying the product catalog associated with the product, and then identifying the vendor associated with that catalog. Commerce Server can then construct purchase orders on a vendor-by-vendor basis, and use BizTalk Server to deliver those purchase orders to the corresponding vendors.

You usually use Business Desk to manually associate vendors with catalogs. Commerce Server displays the vendor ID in Business Desk. It also displays those vendors that support the same document type as your organization supports, and thus have compatible document routing. You can then use Business Desk to associate the vendor ID with the catalog.

You can associate more than one catalog with a vendor. You can also specify a vendor at the product level; however, if you do this you must also customize the _Additem.asp page (if you are developing with the Retail Solution Site). For instructions for adding the vendor ID to a catalog, see "Setting Up Your Catalogs for BizTalk Server" in Commerce Server 2000 Help.

Commerce Server also provides a COM object designed to assign vendors to catalogs programmatically. This object, called the CatalogToVendorAssociation object, also provides methods to, for example, retrieve a list of available vendors, and to return vendor information for a particular catalog. For more information about this object, see "CatalogToVendorAssociation Object" in Commerce Server 2000 Help.

Sending Orders to BizTalk Server

A common e-commerce scenario is to collect a group of catalogs from various drop-ship vendors and present them to users as one catalog. When users place orders on your site, the Splitter component separates the line items in any given order (basket) into logical groups so that each line item can be routed to the appropriate vendor for fulfillment. This logical separation of an order should be completely transparent to the users.

The Splitter identifies the fulfillment vendor for each line item in an order, and then groups vendors with the appropriate OrderForm objects. As the existing pipelines (Plan, Product, Purchase, and so forth) are operating against the OrderForm object, the order processing happens on a subset of the OrderGroup object (based on how the order will be routed internally). When a customer adds an item to a basket, it must be added to the default OrderForm object to ensure that there is only one OrderForm object within each OrderGroup object.

Figure 13.7 shows how Commerce Server processes an order and then sends it to BizTalk Server.

Cc936691.f13csrk07(en-US,CS.10).gif 

Figure 13.7 Commerce Server processes an order and sends it to BizTalk Server

To create an order for processing by Commerce Server, a customer does the following:

  1. Adds items to the basket. 

    Commerce Server reads the Commerce Server database and retrieves vendor names for the items. 

  2. Proceeds to check out. 

To process the order, Commerce Server does the following:

  1. The Commerce Server Checkout pipeline processes the order. For each line item (product) in the order, the Splitter component determines whether your company supplies the product or whether a vendor with whom you have a trading agreement supplies it. The Splitter component creates a list of vendors and attaches it to the order form.

  2. Commerce Server determines whether the BizTalk Options property (in the App Default Config resource) is set to "1."

    If the BizTalk Options property is set to "1," Commerce Server reads the list of vendors and bundles the line items for each vendor.

  3. Commerce Server converts the order form into one or more XML documents to be sent to BizTalk Server. 

    When Commerce Server converts the order form (using the XMLTransforms process), it creates one XML document for each vendor. To convert the order, Commerce Server uses the schema named POSchema.xml, which is associated with the site.

    If you add one or more fields to the order form, by default Commerce Server does not include the new fields in the XML document that it sends to BizTalk Server. To add the new fields on the order form, you must edit POSchema.xml, an XDR (XML-Data Reduced) format file, and re-associate the XML file with the document in BizTalk Server. You must also transfer the XML file to BizTalk Server and re-associate it. You use BizTalk Editor to edit POSchema.xml.

  4. Commerce Server sends the XML documents to BizTalk Server. 

Processing Received Orders

You can submit orders to BizTalk Server in several different ways. You can use mapping to submit orders, you can use a variety of protocols to submit orders, or your vendor can create a Commerce Server site or a non-Commerce Server site to receive the submitted orders.

If you choose to have your vendor set up a Commerce Server site to receive orders, you can set up the site using the _Recvpo.asp page that receives XML documents from BizTalk Server. When _Recvpo.asp receives an XML document, it starts the XMLTransforms process and converts the XML document back to an order form. Commerce Server then runs a pipeline on the order form. After the pipeline processes the order form, the order is saved to the Commerce Server database. By using _Recvpo.asp, you can use Commerce Server objects to redirect the XML to your order management system. For information about the components in _Recvpo.asp, see the "Pipeline Component Reference" section of Commerce Server 2000 Help. For information about _Recvpo.asp, see the Commerce Server Solution Sites Help.

Figure 13.8 shows how an XML document is sent from your BizTalk Server and processed by the vendor's Commerce Server site.

Cc936691.f13csrk08(en-US,CS.10).gif 

Figure 13.8 XML document processed by vendor's Commerce Server site 

You can also set up Commerce Server to process and send order forms to a queue. You then set up your BizTalk Server (or the BizTalk Server at the vendor installation) to poll the queue. If you use this configuration, you can install BizTalk Server and Commerce Server on separate servers. Figure 13.9 shows a configuration with Commerce Server and BizTalk Server installed on separate servers.

Cc936691.f13csrk09(en-US,CS.10).gif 

Figure 13.9 Order forms processed in a queue between Commerce Server and BizTalk Server 

Integrating Commerce Server and BizTalk Server

Cc936691.spacer(en-US,CS.10).gif Cc936691.spacer(en-US,CS.10).gif

By integrating BizTalk Server with your Commerce Server installation, you can contract with vendors to receive catalogs of their products, and then fill orders for their products that you sell on your site. Although it is not required that both you and your vendors install BizTalk Server, the following business scenario explains how to set up BizTalk Server systems for both you and your vendors.

This business scenario describes how a wholesaler manually sends a Commerce Server catalog to a retailer using the Catalog Editor module in Business Desk. Business Desk then accepts the order from a consumer or business buyer using the Retail Solution Site and passes the order to BizTalk Server.

A custom AIC is used to import the catalog on the retailer's server. After the wholesaler makes changes to its catalog, the catalog is submitted to BizTalk Server over HTTP. The retailer automatically receives the catalog and deploys it onto the production site.

When a customer makes a purchase at the retailer's site, the purchase is automatically sent to the wholesaler for fulfillment. BizTalk Server converts the XML-based order into an EDI representation of a purchase order (for example, an EDI X12 850). The result is written to a file location for tracking purposes. A BizTalk Server file receive function monitors this file location, and then converts the file into a Purchase Order Acknowledgment (for example, an EDI X12 855). The status is extracted and posted to the Commerce Server Orders database by an AIC. The customer can check the Web site to determine whether the order has been shipped. Figure 13.10 shows the workflow for a purchase order exchange.

Cc936691.f13csrk10(en-US,CS.10).gif 

Figure 13.10 Workflow for a purchase order exchange 

The following sections describe the implementation steps required to achieve Commerce Server and BizTalk Server catalog exchange and purchase order integration.

Configuring Commerce Server and BizTalk Server to Send and Receive a Catalog

In the following configuration, for simplification purposes, two sites are unpacked on a single computer. One site is named Wholesaler and represents the wholesaler who has generated a catalog that needs to be sent. The wholesaler sends the catalog through BizTalk Server to a retail site. The retail site, named Retailer, represents the retailer who is receiving the catalog.

In a production implementation, you probably would implement Commerce Server and BizTalk Server on separate systems for scaled-out scenarios. Your Commerce Server system will most probably be more active than your BizTalk Server system because many shopping page hits result in only a single or limited number of purchase orders. Several purchase orders, however, would be generated if a shopper picked products from different vendors. The Commerce Server and BizTalk Server combination is designed to split up these orders and process the order transformation and delivery individually for each vendor.

To configure Commerce Server and BizTalk Server, you do the following:

  1. Set up the environment. 

  2. Configure the site options on the wholesaler site. 

  3. Copy CatalogXmlSchema.xml to the BizTalkServerRepository. 

  4. Create the catalog document definition. 

  5. Configure Receivestandard.asp to receive the catalog. 

  6. Modify the home organization. 

  7. Create the retailer organization. 

  8. Create the catalog application for the wholesaler organization. 

  9. Create the wholesaler messaging port to the retailer organization. 

  10. Create the CatalogImportChannel and retailer receive port. 

  11. Test your configuration. 

These steps are described in the following sections. For detailed information about these configuration steps, see "Using BizTalk Server and Commerce Server" in Commerce Server 2000 Help.

Setting Up the Environment

To set up the environment, you do the following:

  1. Follow the BizTalk Server installation instructions to install BizTalk Server. 

  2. Follow the Commerce Server installation instructions to install Commerce Server. 

  3. Unpack the Retail Solution Site and name it Retailer

  4. Unpack the Supplier Solution Site and name it Wholesaler

  5. Import a catalog to the Wholesaler site. 

Configuring the Site Options on the Wholesaler Site

You use the App Default Config resource to set properties that enable Commerce Server and BizTalk Server to work together.

To enable Commerce Server to exchange catalogs through BizTalk Server, you must specify the properties listed in the following table in Commerce Server Manager.

Property

Value

BizTalk Catalog Doc Type

Catalog

BizTalk Options

1

BizTalk Source Org Qualifier

Catalog

BizTalk Source Org Qualifier Value

Wholesaler

BizTalk Submit Type

1

After you modify the BizTalk Server properties in the previous table, unload the application from memory.

Copying CatalogXmlSchema.xml to the BizTalkServerRepository

The schema of the XML document you are transferring must be available through Windows Web Distributed Authoring and Versioning (WebDAV) to BizTalk Server through the repository. To make the XML document schema available to BizTalk Server, do the following:

  1. In BizTalk Editor, import the XDR Schema file. Specify the path to the catalogxmlschema.xml file in < drive >:\Program Files\Microsoft Commerce Server

  2. Store the file to WebDAV, and then save the file in the Microsoft folder. 

Creating the Catalog Document Definition

In this step, you create a document definition representing a catalog in a messaging port. A document definition provides a pointer to a specification that defines the catalog.

In BizTalk Messaging Manager, in Document definitions, you should modify the boxes in the following table to integrate Commerce Server with BizTalk Server.

Box

Value

Document definition name

Catalog

Document specification

Select this check box, and then browse to the Catalogxmlschema.xml file on the WebDAV repository.

Configuring Receivestandard.asp to Receive the Catalog

On the Retailer site, the file Receivestandard.asp receives XML documents and calls an interchange submit. You must modify this file (on the Retail site, because it receives the catalog) to call a specific channel. The name of the channel called by Receivestandard.asp must match the name of an existing channel. To ensure that the name matches, you must change the following code.

Modify line 89 of Receivestandard.asp, from:

SubmissionHandle = interchange.submit(1, PostedDocument) 

To:

SubmissionHandle = interchange.submit(1,PostedDocument,,,,,,"catalogimportchannel")

This takes the PostedDocument object, which is the exported catalog, and submits it to the catalogimportchannel object.

Modifying the Home Organization

The organizations that you create using BizTalk Messaging Manager represent the vendors with whom you exchange documents. A special organization type, called the home organization, represents your company.

BizTalk Messaging Manager creates the home organization for you automatically. When you configure the home organization, you can rename it to make it easier to identify as your company.

In BizTalk Messaging Manager, in Organizations, you should modify the boxes in the following table.

Box

Value

Home Organization

Wholesaler

Custom identifier

Catalog

Qualifier

Catalog

Creating the Retailer Organization

Organizations other than the home organization represent an external vendor or a business unit of a vendor. You can create any number of organizations. You can designate a vendor organization either as a source organization in a channel or as a destination organization in a messaging port.

In BizTalk Messaging Manager, in Organizations, you should modify the boxes in the following table.

Box

Value

Organization

Retailer

Custom identifier

Catalog

Qualifier

Catalog

Value

Retailer

Creating the Catalog Application for the Wholesaler Organization

The applications that you create for your home organization enable you to identify and track the flow of documents between BizTalk Server and actual internal applications within your company. You can designate only applications of the home organization as the source or destination for documents within your company.

For example, you might create a messaging port that designates a vendor organization as the destination for documents that your company sends. Then, when you create a channel for that port, rather than designating your home organization as the source, you designate a specific internal application within your company where the documents originate.

To complete the integration between Commerce Server and BizTalk Server, in BizTalk Messaging Manager, you would add an application to the Wholesaler organization named CatalogApplication.

Creating the Wholesaler Messaging Port to the Retailer Organization

A messaging port is a set of properties that you use to configure BizTalk Server so that it transports documents to a specified destination, using a specified transport service. You use the New Messaging Port Wizard to create a new port for sending a catalog from the Wholesaler to the Retailer.

In BizTalk Messaging Manager, in Messaging ports, modify the boxes in the following table.

Box

Value

Messaging Port name

CatalogPort

Destination Organization

Retailer

Primary transport

http://<computer name>/retailer/receivestandard.asp

Envelope information

None

Security information

None

New Channel name

CatalogApplication

Organization Identifier

Catalog/Wholesaler

Inbound document definition name

Catalog

Log inbound document

In native format

In BizTalk Messaging Manager, in Advanced Configuration, modify the boxes in the following table.

Box

Value

URL

http://<computer name>/retailer/receivestandard.asp

User name

<domain>\<username>

Password

<user password>

Creating the CatalogImportChannel and Retailer Receive Port

You configure the retailer receive port to use an AIC/scriptor.

In BizTalk Messaging Manager, in Messaging ports, modify the boxes in the following table.

Box

Value

Destination Organization

Retailer

Primary Transport

Application Integration Component

Component name

BizTalk Scriptor

Organization Identifier

Catalog/Retailer

After you modify the boxes, you create the channel that uses the retailer receive port.

A channel is a set of properties that you use to configure BizTalk Server to process a document that it receives. After a channel has processed a document, it is passed to its associated messaging port or distribution list to be transported to the specified destination. You can create one or more channels for a port or distribution list.

In BizTalk Messaging Manager, in Channels, modify the boxes in the following table.

Box

Value

Channel name

CatalogImportChannel

Organization

Retailer

Organization Identifier

Catalog/Retailer

InboundDocumentDefName

Catalog

OutboundDocumentDefName

Catalog

Log Inbound Document

In native format

In a BizTalk Scriptor, the OrderForm object is used to pass in the contents of the XML document. Use the scripting.filesystemobject object to write out the XML document to a file. To modify the scriptor, use the following code:

function MSCSExecute(config, orderform, context, flags)
sOutput = orderform.Value("working_data")

Dim fso, MyFile
Set fso = CreateObject("Scripting.FileSystemObject")
Mydrive = "c:\commercecatalogs\"
MyDate = cstr(Date)
MyTime = cstr(Time)
Filename = MyDate & MyTime & ".xml"
FileName = Replace(FileName, "/", "")
FileName = Replace(FileName, ":", "")
Filename = Mydrive & FileName
Filename = Replace(Filename, " ", "")
Set MyFile = fso.CreateTextFile(Filename, True)
MyFile.WriteLine(soutput)
MyFile.Close
set appcfg = createobject("commerce.appconfig")
set catalogmanager = createobject("commerce.catalogmanager")
appcfg.initialize("retailer")
set optdict = appcfg.getoptionsdictionary("")
connstr = optdict.s_CatalogConnectionString
catalogmanager.initialize connstr, true
catalogmanager.importxml Filename, TRUE, FALSE

MSCSExecute = 1 'set function return value to 1 
end function

sub MSCSOpen(config)
'optional open routine
end sub

sub MSCSClose()
'optional close routine
end sub
Testing Your Configuration

You use the Catalog Editor module in Business Desk to send a catalog from the Wholesaler site. BizTalk Server then automatically imports the catalog into the Retailer site. To send a catalog to the Retailer site, do the following:

  1. In Commerce Server Business Desk, in Catalogs, in the Catalog Editor module, select a catalog that you have imported. 

  2. Send the Catalog to the Retailer vendor that you created using the BizTalk Messaging Manager. 

Processing a Commerce Server Purchase Order Through BizTalk Server

A Commerce Server application accepts an order from a consumer or business buyer. The order is then passed to BizTalk Server. The configuration steps in the "Configuring Commerce Server and BizTalk Server for Sending and Receiving a Catalog" section earlier in this chapter must be complete before you do the tasks described in this section.

To process a Commerce Server purchase order through BizTalk Server, you do the following:

  1. Configure the site options for the Retailer site. 

  2. Copy POSchema.xml to the WebDAV repository. 

  3. Configure the PurchaseOrder document definition. 

  4. Add the identifier to the retailer organization. 

  5. Configure a vendor for the imported catalog. 

  6. Create a WholesalerPO application for the wholesaler organization. 

  7. Create a new messaging port to an application. 

  8. Create a new channel that uses the WholesalerPO as the messaging port. 

  9. Test your configuration. 

Configuring the Site Options for the Retailer Site

You use the App Default Config resource to set properties that enable Commerce Server and BizTalk Server to work together.

To enable Commerce Server to exchange purchase orders through BizTalk Server, you must specify the properties in the following table.

Property

Value

BizTalk PO Doc Type

PurchaseOrder

BizTalk Options

1

BizTalk Source Org Qualifier

MyCompany

BizTalk Source Org Qualifier Value

Retailer

BizTalk Submit Type

1

After you modify the properties in the previous table, unload the application from memory.

Copying POSchema.xml to the WebDAV Repository

The schema of the XML document you are transferring must be available through WebDAV to BizTalk Server through the repository. To copy the XML document to the WebDAV repository, do the following:

  1. In BizTalk Editor, open the <drive>:\inetpub\wwwroot\wholesaler\poschema.xml file. 

  2. Store the file to WebDAV, and then save the file in the Microsoft folder. 

Configuring the PurchaseOrder Document Definition

A document definition represents a business document in a messaging port, channel, or distribution list. In this scenario, the document definition represents a purchase order. This document definition provides a pointer to a specification that defines the purchase order.

In BizTalk Messaging Manager, in Document definitions, modify the boxes in the following table.

Box

Value

Document Definition name

PurchaseOrder

Document specification

Select this check box, and then browse to the POSchema.xml file on the WebDAV repository that you imported in Step 2.

WebDAV Repository reference

http://<computer name/BizTalkServerRepository/DocSpecs/Microsoft/poschema.xml

Adding the Identifier to the Retailer Organization

Organizations other than your home organization represent an external vendor or a business unit of a vendor. In BizTalk Messaging Manager, in Retailer Organization, modify the boxes in the following table.

Box

Value

Custom Identifier name

PurchaseOrder

Qualifier

MyCompany

Value

Retailer

Configuring a Vendor for the Imported Catalog

After you have added the identifier to the Retailer organization, you are ready to configure a vendor for the imported catalog. To configure the vendor, do the following:

  • In Business Desk for the Retailer site, in Catalogs, in the Catalog Editor module, open the imported catalog, and change the vendor ID of the catalog to Wholesaler.

    Notes If the Wholesaler organization doesn't appear, there is a mismatch between what you have entered on the site options, and the identifier that you have configured for the organization. 

    The function sVendorsAsOptions () in the Dlg_vendorpicker.asp file is used to retrieve a list of vendors for this operation, and also for a catalog send operation. 

Creating a WholesalerPO Application for the Wholesaler Organization

The Application tab is available only on the Wholesaler organization. Normally you wouldn't attempt to send something to your home organization from your own BizTalk Server computer, and therefore wouldn't perform this step. However, in this single server scenario, you need to create a port to an application so that you can send this purchase order to your home organization.

To create a WholesalerPO application for the Wholesaler organization, do the following:

  • In BizTalk Messaging Manager, edit the Wholesaler Application, and add an application named WholesalerPO

Creating a New Messaging Port to an Application

You need to create a messaging port that you can use to configure BizTalk Server to transport a purchase order that is submitted through BizTalk Server over HTTP.

In BizTalk Messaging Manager, in Messaging ports, modify the boxes in the following table.

Box

Value

Messaging Port name

WholesalerPO

Application

WholesalerPO

Transport type

HTTP

Address

http://<computer name>/wholesaler/_recvpo.asp
The transport type specifies the transport service that BizTalk Server uses to convey documents to the destination designated in the messaging port. Transport properties can also include a specific address to which the data is sent. The address properties vary depending on the transport type selected.

Creating a New Channel that Uses the WholesalerPO as the Messaging Port

A channel is a set of properties that you can use to configure BizTalk Server to process a document. After a channel has processed a document, it is passed to its associated messaging port or distribution list to be transported to the specified destination. You can create one or more channels for a port or distribution list.

In BizTalk Messaging Manager, in Channels, modify the boxes in the following table.

Box

Value

Channel name

RetailPO

Organization identifier

PurchaseOrder/Retail

InboundDocumentDefName

PurchaseOrder

OutboundDocumentDefName

PurchaseOrder

In BizTalk Messaging Manager, in Advanced Configuration, modify the boxes in the following table.

Box

Value

URL

http://<computer name>/wholesaler/_recvpo.asp

Username

<domain>\<username>

Password

<user password>

Use HTTP proxy

Leave this check box cleared.

Testing Your Configuration

You can test your configuration by logging onto your Retail site and making a purchase. After you have made a purchase, you can use the Orders modules in Business Desk to view your order status information. You use order status codes to track the location of an order in the order process and to determine where an order might be blocked or have unresolved problems.

An order status code identifies a name with a code for a specific area of the order process. For example, if a customer ordered two CDs and two t-shirts 8 weeks ago, you can view order status codes and track the order's location in the ordering process. There are three default order status codes:

  • 4 (New Order) 

  • 2 (Saved Order) 

  • 1 (Basket) 

To test your configuration, do the following:

  1. Log on to the http://<computer name>/retailer site. 

  2. Add items to your basket, and then make a purchase. 

  3. In Business Desk, in Orders, in the Orders Status module, search for all orders you made on the Retailer site. 

If your Commerce Server and BizTalk Server applications are integrated correctly, there should be a purchase order in the Wholesaler site for the purchase that you just made on the Retailer site.

Cc936691.spacer(en-US,CS.10).gif

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft