Tutorial: Importing and exporting contracts

 

Introduction

This tutorial explains how to import and export contracts through two separate methods. One method utilizes the WebSphere Commerce Accelerator user interface, and the other method involves importing or exporting the XML files that define the contract. Not all of the contract functionality is available through the Commerce Accelerator, and therefore importing and exporting the XML files directly often gives you more options. Your contracts may individually specify thousands of products, so it would not be practical in such cases to use the user interface to set up these contracts. In this tutorial you will first learn about the XML files that define contracts, and then you will import and export a contract using both the Commerce Accelerator and the XML files directly.

After completing this tutorial, you should be able to import and export contracts using both the Commerce Accelerator, and the contract XML files directly.

Audience

This tutorial is designed for those people who are interested in learning how to import and export contracts into stores.

Time required

Expect this tutorial to take 2 hours to complete.

Prerequisites

You have installed WebSphere Commerce Developer, and published the B2BAdvanced starter store.

Tutorial tasks

This tutorial is divided into the following steps:

  1. Understand contract XML files
  2. Import and export a contract using Commerce Accelerator
  3. Import and export a contract using XML files
  4. HTML Utility for importing and exporting contracts

 

Resources

Download the sample code zip file related to this tutorial. Included in the zip file is a useful utility that you can use to import and export accounts and contracts. This utility is explained in step 4. The zip file also includes sample accounts and contracts that you can use as references for complete XML syntax.