Tutorials > Contracts > Import and exporting contracts
HTML Utility for importing and exporting contracts
This section of the tutorial explains HTML Utility for importing and exporting contracts.
In order to run the contract import and export commands, be logged on to the WebSphere Commerce Server. The easiest way to do this is to log on to the WebSphere Commerce Accelerator. When the Select Store and Language page appears, in the same Internet Explorer window, edit the address field to enter the appropriate URL, such as:
https://hostname:8000/webapp/wcs/tools/servlet/ContractImportApprovedVersion? xsd=true&fileName=SampleContract.xml&URL=ContractDisplay&targetStoreId=123
The following HTML file makes importing and exporting trading agreements easy. Most parameters are pre-filled, and you only need to enter file names and store IDs. Log on to WebSphere Commerce Accelerator as described above, and open the ContractImportExportUtility.html file in the Select Store and Language window.
Sample filesIncluded with this article are sample contract and business account XML files. These files include samples of the syntax for base contracts, customer contracts, business accounts, and all the available terms and conditions.
- SampleAccount.xml - Create a business account - includes all available terms and conditions.
- SampleBaseContract.xml - Create a base contract.
- SampleContract.xml - Create a contract - includes all available terms and conditions.
- SampleNationalLanguage.xml - Create the national language descriptions for a contract and store.
- TemplateHostingContract.xml - Create a hosted store.
- TemplateReferralContract.xml - Create a distributor proxy store.
A quick way to create the contract xml is to create the contract using the WebSphere Commerce Accelerator, and then export the contract to a file. Use that file as a base to make any desired changes.
ResourcesDownload the zip file containing all the code related to this article.