Operate > WebSphere Commerce Accelerator > Business relationship management
Tutorial: Creating contracts to reference base entitlement contracts
In this tutorial, we will learn how to create several contracts. You will create base contracts, then create other contracts to reference to those base contracts. For example, you might have a requirement where several different organizations may share the same entitlement to a product set. In this instance, you could create several organizational units that can reference a base contract that contains the shared attributes for that contract, specifically in this case, entitlement attributes.
This tutorial shows you how to set up different organizations, accounts and contracts to allow a shopper to access AdvancedB2BDirect for an entitlement contract shopping experience.
To complete this tutorial you should be familiar with the following terms and concepts:
- Log into the AdvancedB2BDirect Store URL: http://localhost/webapp/wcs/stores/servlet/AdvancedB2BDirect/index.jsp
- Click Register > Register Organization. Enter the following information:
Organization Name Company Example 1 Description Company Example 1 Business Category External Address 4 Central Street, Bldg 1 City East Hartford State CT Country United States ZIP 06108 E-mail address <your email> User ID CompanyExample1AccMgr Password ibm1ibm Verify Password ibm1ibm Employee ID 06108 Last Name Shields Address 4 Central Street, Bldg 1 City East Hartford State CT Country USA ZIP 06108 E-mail address <your email>
Click Submit.
- Open the Organization Administration Console:
- Enter the following information for Company's Account 1:
Organization Name CompanyExample1-SoldToA Description CompanyExample1-SoldToA Business Category External Address 4 Central Street, Bldg 1 City East Hartford State CT Country United States ZIP 06108 E-mail address <your email> User ID ExSoldToA Password ibm1ibm Verify Password ibm1ibm Employee ID 06108 Last Name Shields Address 4 Central Street, Bldg 1 City East Hartford State CT Country USA ZIP 06108 E-mail address <your email>
Click Submit.
- Enter the following information for Company's Account 2:
Organization Name CompanyExample1-SoldToB Description CompanyExample1-SoldToB Business Category External Address 4 Central Street, Bldg 1 City East Hartford State CT Country United States ZIP 06108 E-mail address <your email> User ID ExSoldToB Password ibm1ibm Verify Password ibm1ibm Employee ID 06108 Last Name Shields Address 4 Central Street, Bldg 1 City East Hartford State CT Country USA ZIP 06108 E-mail address <your email>
Click Submit.
- Enter the following information for Company's Ship To 1:
Organization Name ExShipToAA Description ExShipToAA Business Category External Address 4 Central Street, Bldg 1 City East Hartford State CT Country United States ZIP 06108 E-mail address <your email> User ID ExShipToAA Password ibm1ibm Verify Password ibm1ibm Employee ID 06108 Last Name Shields Address 4 Central Street, Bldg 1 City East Hartford State CT Country USA ZIP 06108 E-mail address <your email>
Click Submit.
- Enter the following information for Company's Ship To 2:
Organization Name ExShipToAB Description ExShipToAB Business Category External Address 4 Central Street, Bldg 1 City East Hartford State CT Country United States ZIP 06108 E-mail address <your email> User ID ExShipToAB Password ibm1ibm Verify Password ibm1ibm Employee ID 06108 Last Name Shields Address 4 Central Street, Bldg 1 City East Hartford State CT Country USA ZIP 06108 E-mail address <your email>
Click Submit.
- Approve Registered Users:
- From the Approvals menu, click Approval Requests.
- Check boxes for ExampleCompany1AccMgr, ExSoldToA, ExSoldToB, ExShipToAA, ExShipToBB
- Click Approve
- Log out of the Organization Administration Console.
- Add Addresses for users:
- Log into the AdvancedB2BDirect Store URL: http://localhost/webapp/wcs/stores/servlet/AdvancedB2BDirect/index.jsp
Userid ExShipToAA Password ibm1ibm
- Click Account. > Edit Address Book > Add New Personal Address Enter the following information for Company's Ship To 1:
Nickname address2 Last Name Shields Address 4 Central Street, Bldg 4aa City East Hartford State CT Country USA ZIP 06108
Click Submit.
- Click Add New Personal Address Enter the following information for Company's Ship To 1:
Nickname address3 Last Name Shields Address 4 Central Street, Bldg 4ab City East Hartford State CT Country USA ZIP 06108
Click Submit.
- Log out of Store; then log in using the following information:
Userid ExShipToAB Password ibm1ibm
- Click Account button Click Edit Address BookClick Add New Personal AddressEnter the following information for Company's Ship To 1:
Nickname address2 Last Name Shields Address 4 Central Street, Bldg 5aa City East Hartford State CT Country USA ZIP 06108
Click Submit.
- Click Add New Personal Address. Enter the following information for Company's Ship To 1:
Nickname address3 Last Name Shields Address 4 Central Street, Bldg5ab City East Hartford State CT Country USA ZIP 06108
Click Submit.
- Log out of the store.
- Update the database to associate new addresses to point to organization level:
update address set member_id = (select orgentity_id from orgentity where orgentityname = 'ExShipToAA') where nickname like 'address%' and address1 like '4 Central Street, Bldg 4a%' update address set member_id = (select orgentity_id from orgentity where orgentityname = 'ExShipToAB') where nickname like 'address%' and address1 like '4 Central Street, Bldg 5a%'
- Create Accounts and Contracts for each store:
- Log into the WebSphere Commerce Accelerator and select AdvancedB2BDirect Store
- Create Account For: From the Sales menu, click Accounts.
- The Account List page displays, containing business accounts currently defined for the selected store. If you do not see this menu, then your logon ID does not have the appropriate authority to perform this task. Contact the Site Administrator.
- Click New. The Account notebook displays.
- Complete the fields for each page as required, and use the links on the left side to switch between pages. Account Customer
Customer Organization Company Example 1 Contact CompanyExample1AccMgr This is for base contracts 'checked'
- Click OK to save the business account and close the notebook. The business account is displayed in the Account List page.
- Create Contract For: Air Canada Customer Level
- From the Sales menu, click Accounts.
- The Account List page displays, containing business accounts currently defined for the selected store. If you do not see this menu, then your logon ID does not have the appropriate authority to perform this task. Contact the Site Administrator.
- Select the check box to the left of the business account that to create a new contract for. Click New Contract. This will open the Contract notebook.
- Complete the fields for each page as required, and use the links on the left side to switch between pages. Contract General Information
Contract name Example 1 Customer Level Short Description Example 1 Customer Level Description Example 1 Customer Level Starts immediately 'checked' No expiry date 'checked' Participants
Selected organizations Company Example 1 Catalog Filter
Woodworking 'Include at List Price' Power 'Include at List Price' Shipping Charge Type
Shipping Charge Type select 'Free shipping'
- Click OK to save the contract and close the notebook.
- Select the check box to the left of the business account that you have just created a new contract for. Click the button "Contracts"
- Select the check box to the left of the contract that you have just created. Click Submit.
- Click button "Refresh" until the status for the contract states "Active"
- Create Account For: CompanyExample1-SoldToAFrom the Sales menu, click Accounts.
- The Account List page displays, containing business accounts currently defined for the selected store. If you do not see this menu, then your logon ID does not have the appropriate authority to perform this task. Contact the Site Administrator.
- Click New. The Account notebook displays.
- Complete the fields for each page as required, and use the links on the left side to switch between pages. Account Customer
Customer Organization CompanyExample1-SoldToA Contact ExSoldToA This is for base contracts 'checked'
- Click OK to save the business account and close the notebook. The business account is displayed in the Account List page.
- Create Contract For: Ex-SoldToA
- From the Sales menu, click Accounts.
- The Account List page displays, containing business accounts currently defined for the selected store. If you do not see this menu, then your logon ID does not have the appropriate authority to perform this task. Contact the Site Administrator.
- Select the check box to the left of the business account that to create a new contract for. Click New Contract. This will open the Contract notebook.
- Complete the fields for each page as required, and use the links on the left side to switch between pages. Contract General Information
Contract name Ex-SoldToA Short Description Ex-SoldToA Description Ex-SoldToA Starts immediately 'checked' No expiry date 'checked' Refer to Contract Example 1 Customer Level Participants
Selected organizations CompanyExample1-SoldToA
- Click OK to save the contract and close the notebook.
- Select the check box to the left of the business account that you have just created a new contract for. Click Contracts.
- Select the check box to the left of the contract that you have just created. Click Submit.
- Click Refresh until the status for the contract states Active.
- Create Account For: CompanyExample1-SoldToBFrom the Sales menu, click Accounts.
- The Account List page displays, containing business accounts currently defined for the selected store. If you do not see this menu, then your logon ID does not have the appropriate authority to perform this task. Contact the Site Administrator.
- Click New. The Account notebook displays.
- Complete the fields for each page as required, and use the links on the left side to switch between pages. Account Customer
Customer Organization CompanyExample1-SoldToB Contact ExSoldToB This is for base contracts 'checked'
- Click OK to save the business account and close the notebook. The business account is displayed in the Account List page.
- Create Contract For: CompanyExample1-SoldToB
- From the Sales menu, click Accounts. The Account List page displays, containing business accounts currently defined for the selected store.
- Select the check box to the left of the business account that to create a new contract for. Click New Contract. This Contract notebook opens.
- Complete the fields for each page as required, and use the links on the left side to switch between pages. Contract General Information
Contract name CompanyExample1-SoldToB Short Description CompanyExample1-SoldToB Description CompanyExample1-SoldToB Starts immediately 'checked' No expiry date 'checked' Refer to Contract Example 1 Customer Level Participants
Selected organizations CompanyExample1-SoldToB
- Click OK to save the contract and close the notebook.
- Select the check box to the left of the business account that you have just created a new contract for. Click the button "Contracts"
- Select the check box to the left of the contract that you have just created. Click Submit.
- Click button "Refresh" until the status for the contract states "Active"
- Create Account For: ExShipToAAFrom the Sales menu, click Accounts.
- The Account List page displays, containing business accounts currently defined for the selected store. If you do not see this menu, then your logon ID does not have the appropriate authority to perform this task. Contact the Site Administrator.
- Click New. The Account notebook displays.
- Complete the fields for each page as required, and use the links on the left side to switch between pages. Account Customer
Customer Organization Ex-ShipToAA Contact Ex-ShipToAA Account Display Customization
Logo mockups/logo.gif Text Field One Company Example 1 - SoldTo A Text Field Two Ship To 1 Account Purchase Order
Purchase order number must be specified at time of order 'checked'
- Click OK to save the business account and close the notebook. The business account is displayed in the Account List page.
- Click the same Account that was just saved to enable editing of the information.
- Complete the fields for each page as required, and use the links on the left side to switch between pages. Shipping Providers
Selected Shipping Providers 'Shipping Policy for A1' and 'Shipping Policy for A2' Shipping Charge Type
Shipping Charge Type select 'Free shipping' Shipping Addresses
Selected Shipping Addresses select 'ExShipToAA' and 'address2' and 'address3'
- Click OK to save the business account and close the notebook. The business account is displayed in the Account List page.
- Create Contract For: ExShipToAA
- From the Sales menu, click Accounts.
- The Account List page displays, containing business accounts currently defined for the selected store. If you do not see this menu, then your logon ID does not have the appropriate authority to perform this task. Contact the Site Administrator.
- Select the check box to the left of the business account that to create a new contract for. Click New Contract. This will open the Contract notebook.
- Complete the fields for each page as required, and use the links on the left side to switch between pages. Contract General Information
Contract name Ex-ShipToAA Short Description Ex-ShipToAA Description Ex-ShipToAA Starts immediately 'checked' No expiry date 'checked' Refer to Contract Ex-SoldToA Participants
Selected organizations ExShipToAA Shipping Providers
Selected Shipping Providers 'Shipping Policy for A1' and 'Shipping Policy for A2' Shipping Charge Type
Shipping Charge Type select 'Free shipping' Shipping Addresses
Selected Shipping Addresses select 'ExShipToAA' and 'address2' and 'address3'
- Click OK to save the contract and close the notebook.
- Select the check box to the left of the business account that you have just created a new contract for. Click the button "Contracts"
- Select the check box to the left of the contract that you have just created. Click Submit.
- Create Account For: ExShipToABFrom the Sales menu, click Accounts.
- The Account List page displays, containing business accounts currently defined for the selected store. If you do not see this menu, then your logon ID does not have the appropriate authority to perform this task. Contact the Site Administrator.
- Click New. The Account notebook displays.
- Complete the fields for each page as required, and use the links on the left side to switch between pages. Account Customer
Customer Organization Ex-ShipToAB Contact Ex-ShipToAB Account Display Customization
Logo mockups/logo.gif Text Field One Customer Example 1 - SoldTo A Text Field Two Ship To 2 Account Purchase Order
Purchase order number must be specified at time of order 'checked'
- Click OK to save the business account and close the notebook. The business account is displayed in the Account List page.
- Click the same Account that was just saved to enable editing of the information.
- Complete the fields for each page as required, and use the links on the left side to switch between pages. Shipping Providers
Selected Shipping Providers 'Shipping Policy for A1' and 'Shipping Policy for A2' Shipping Charge Type
Shipping Charge Type select 'Free shipping' Shipping Addresses
Selected Shipping Addresses select 'ExShipToAB' and 'address2' and 'address3'
- Click OK to save the business account and close the notebook. The business account is displayed in the Account List page.
- Create Contract For: ExShipToAB
- From the Sales menu, click Accounts.
- The Account List page displays, containing business accounts currently defined for the selected store. If you do not see this menu, then your logon ID does not have the appropriate authority to perform this task. Contact the Site Administrator.
- Select the check box to the left of the business account that to create a new contract for. Click New Contract. This will open the Contract notebook.
- Complete the fields for each page as required, and use the links on the left side to switch between pages. Contract General Information
Contract name Ex-ShipToAB Short Description Ex-ShipToAB Description Ex-ShipToAB Starts immediately 'checked' No expiry date 'checked' Refer to Contract Ex-SoldToA Participants
Selected organizations ExShipToAB Shipping Providers
Selected Shipping Providers 'Shipping Policy for A1' and 'Shipping Policy for A2' Shipping Charge Type
Shipping Charge Type select 'Free shipping' Shipping Addresses
Selected Shipping Addresses select 'ExShipToAB' and 'address2' and 'address3'
- Click OK to save the contract and close the notebook.
- Select the check box to the left of the business account that you have just created a new contract for. Click the button "Contracts"
- Select the check box to the left of the contract that you have just created. Click Submit.
- Click button "Refresh" until the status for the contract states "Active"
- logout of WebSphere Accelerator
- Check product entitlement Log into the AdvancedB2BDirect Store URL: http://localhost/webapp/wcs/stores/servlet/AdvancedB2BDirect/index.jsp
- Log into Store:
Userid ExShipToAA Password ibm1ibm
- Add two different products to the cart
- Click "Current Order" and click "Next"
- Ensure there are multiple shipping address drop-down selections available for each order
- Click "Checkout"
- Click "Next" and continue to "Order Now"
- Once there is an order confirmation, logout of store and repeat steps for ExShipToAB
- Log into Store:
Userid ExShipToAB Password ibm1ibm
- Click "Browse Catalog"
- Add two different products to the cart
- Click "Current Order" and click "Next"
- Ensure there are multiple shipping addresses drop-down selections available for each order
- Click "Checkout"
- Click "Next" and continue to "Order Now"
- Once there is an order confirmation, logout of store
- Export Accounts and Contracts Log into the WebSphere Commerce Accelerator and select AdvancedB2BDirect Store
- Compile all account identifiers from the database. Use the following SQL:
select * from account
- For each account identifier, export the Account XML using the following URL format:
https://localhost/webapp/wcs/stores/servlet/AccountExport? accountId=14501&fileName=accountExCompanyExample1.xml&langId=-1&xsdName=Package.xsd&URL= https://localhost/webapp/wcs/stores/servlet/AccountExport? accountId=14503&fileName=accountExSoldToA.xml&langId=-1&xsdName=Package.xsd&URL= https://localhost/webapp/wcs/stores/servlet/AccountExport? accountId=14505&fileName=accountExSoldToB.xml&langId=-1&xsdName=Package.xsd&URL= https://localhost/webapp/wcs/stores/servlet/AccountExport? accountId=14507&fileName=accountExShipToAA.xml&langId=-1&xsdName=Package.xsd&URL= https://localhost/webapp/wcs/stores/servlet/AccountExport? accountId=15501&fileName=accountExShipToAB.xml&langId=-1&xsdName=Package.xsd&URL=For these URLs, enter them into the browser which initiated the Accelerator tool as this will have the appropriate cookie to enable privilege to run this command.
- Go to the directory <CommerceInstallPath>/xml/trading/xml/ and find the files that were just exported. These files represent your accounts.
- Export All Contracts from the Sales menu.
- Click Accounts.
- The Account List page displays, containing business accounts currently defined for the selected store. If you do not see this menu, then your logon ID does not have the appropriate authority to perform this task. Contact the Site Administrator.
- Select the check box to the left of the business account that to export a contract for. Click Contracts. This will list all the available Contracts for a particular account.
- Select the check box to the left of the contracts that you wish to export and click "Export"
- The "Export contract to a file" page will appear. Enter in a Filename.xml value for each contract.
- Click "OK"
- Go to the directory WC_INSTALL/xml/trading/xml/ and find the files that were just exported. These files represent your contracts.