Importing a contract or service agreement uploads a service agreement in XML format from your local client to the WebSphere Commerce Server and deploys the service agreement in WebSphere Commerce.
Note: If you have an XML file that is larger than 1 MB, you must first increase the column size of the STOREXML column in the CNTRSTORE database table, and the XMLDEFINITION column in the TCTATTR table. The following is an example of how to increase the column size for these tables to 2 MB, using DB2:
EXPORT TO tcattr.ixf OF IXF MESSAGES tcattr.out SELECT * FROM TCATTR; DROP TABLE TCATTR; CREATE TABLE tcattr ( termcond_id BIGINT NOT NULL, type INTEGER NOT NULL, trading_id BIGINT NOT NULL, sequence INTEGER NOT NULL DEFAULT 0, xmldefinition CLOB(20000000) NOT NULL, optcounter SMALLINT ) IN USERSPACE1 INDEX IN USERSPACE1 ; ALTER TABLE tcattr ADD PRIMARY KEY (termcond_id, type, sequence); ALTER TABLE tcattr ADD CONSTRAINT f_924 FOREIGN KEY (trading_id) REFERENCES trading ON DELETE CASCADE; ALTER TABLE tcattr ADD CONSTRAINT f_923 FOREIGN KEY (termcond_id) REFERENCES termcond ON DELETE CASCADE; CREATE INDEX I0000807 ON tcattr ( trading_id ASC ); IMPORT FROM tcattr.ixf OF IXF MESSAGES tcattr.out INSERT INTO TCATTR; EXPORT TO cntrstore.ixf OF IXF MESSAGES cntrstore.out SELECT * FROM CNTRSTORE; DROP TABLE CNTRSTORE; CREATE TABLE cntrstore ( contract_id BIGINT NOT NULL, storexml CLOB(20000000) NOT NULL, optcounter SMALLINT ) IN USERSPACE1 INDEX IN USERSPACE1 ; ALTER TABLE cntrstore ADD PRIMARY KEY (contract_id); ALTER TABLE cntrstore ADD CONSTRAINT f_912 FOREIGN KEY (contract_id) REFERENCES contract ON DELETE CASCADE; IMPORT FROM cntrstore.ixf OF IXF MESSAGES cntrstore.out INSERT INTO CNTRSTORE;
To import a contract:
- Open the WebSphere Commerce Accelerator.
- Select Sales > Accounts.
The Accounts list displays. If you do not see this menu, then your logon ID does not have the appropriate authority to perform this task. Contact your Site Administrator. - Select the check box to the left of the business account that you want to work with and click Contracts. A list of contracts for the account displays.
- Click Import. The Import Contracts dialog displays.
- In the XML File field, type the full path to the service agreement XML file. You can also click Browse to find the XML file using the Choose file dialog.
- Click Import to import the contract from your local client machine.
When the XML file uploads successfully, a business relationship will be created that respects the terms and conditions defined in the contract. In addition, a confirmation message will be displayed once the setup process is complete and the list of contracts will be refreshed showing the newly created contract.
If the status of the service agreement is Deployment Failed when the list of service agreements is refreshed, you can attempt to redeploy the contract.