Tutorial: Creating contracts to reference base entitlement contracts (Enterprise)

In this tutorial, you 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.

Prerequisites

To complete this tutorial you should be familiar with the following terms and concepts:

 

Tutorial tasks

This tutorial covers the following tasks:

  1. Contract Setup

Contract Setup

  1. Log into the AdvancedB2BDirect Store
    URL: http://localhost/webapp/wcs/stores/servlet/AdvancedB2BDirect/index.jsp
  2. Under Register: Click Register Organization.
  3. Enter the following information for Company:

    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>
  4. Click Submit.
  5. 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>
  6. Click Submit.
  7. 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>
  8. Click Submit.
  9. 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>
  10. Click Submit.
  11. 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>
  12. Click Submit.
  13. Approve Registered Users
    Open the WebSphere Organization Console.
  14. From the Approvals menu, click Approval Requests.
  15. Check boxes for ExampleCompany1AccMgr, ExSoldToA, ExSoldToB, ExShipToAA, ExShipToBB
  16. Click Approve
  17. logout of WebSphere Organization Console
  18. Add Addresses for users Log into the AdvancedB2BDirect Store URL: http://localhost/webapp/wcs/stores/servlet/AdvancedB2BDirect/index.jsp
  19. Log into Store:

    Userid ExShipToAA
    Password ibm1ibm
  20. Click Account.
  21. Click Edit Address Book
  22. Click Add New Personal Address
  23. 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
  24. Click Submit.
  25. Click Add New Personal Address
  26. 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
  27. Click Submit.
  28. Log out of Store
  29. Log into Store:

    Userid ExShipToAB
    Password ibm1ibm
  30. Click Account button
  31. Click Edit Address Book
  32. Click Add New Personal Address
  33. Enter 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
  34. Click Submit.
  35. Click Add New Personal Address
  36. 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
  37. Click Submit.
  38. Log out of the store.
  39. 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%'
    
  40. Create Accounts and Contracts for each Log into the WebSphere Commerce Accelerator and select AdvancedB2BDirect Store
  41. Create Account For: From the Sales menu, click Accounts.
  42. 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 your Site Administrator.
  43. Click New. The Account notebook displays.
  44. 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'
  45. Click OK to save the business account and close the notebook. The business account is displayed in the Account List page.
  46. Create Contract For: Air Canada Customer Level
  47. From the Sales menu, click Accounts.
  48. 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 your Site Administrator.
  49. Select the check box to the left of the business account that you want to create a new contract for. Click New Contract. This will launch the Contract notebook.
  50. 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'
  51. Click OK to save the contract and close the notebook.
  52. Select the check box to the left of the business account that you have just created a new contract for. Click the button "Contracts"
  53. Select the check box to the left of the contract that you have just created. Click Submit.
  54. Click button "Refresh" until the status for the contract states "Active"
  55. Create Account For: CompanyExample1-SoldToAFrom the Sales menu, click Accounts.
  56. 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 your Site Administrator.
  57. Click New. The Account notebook displays.
  58. 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'
  59. Click OK to save the business account and close the notebook. The business account is displayed in the Account List page.
  60. Create Contract For: Ex-SoldToA
  61. From the Sales menu, click Accounts.
  62. 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 your Site Administrator.
  63. Select the check box to the left of the business account that you want to create a new contract for. Click New Contract. This will launch the Contract notebook.
  64. 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
  65. Click OK to save the contract and close the notebook.
  66. Select the check box to the left of the business account that you have just created a new contract for. Click Contracts.
  67. Select the check box to the left of the contract that you have just created. Click Submit.
  68. Click Refresh until the status for the contract states Active.
  69. Create Account For: CompanyExample1-SoldToBFrom the Sales menu, click Accounts.
  70. 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 your Site Administrator.
  71. Click New. The Account notebook displays.
  72. 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'
  73. Click OK to save the business account and close the notebook. The business account is displayed in the Account List page.
  74. Create Contract For: CompanyExample1-SoldToB
  75. From the Sales menu, click Accounts. The Account List page displays, containing business accounts currently defined for the selected store.
  76. Select the check box to the left of the business account that you want to create a new contract for. Click New Contract. This Contract notebook opens.
  77. 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
  78. Click OK to save the contract and close the notebook.
  79. Select the check box to the left of the business account that you have just created a new contract for. Click the button "Contracts"
  80. Select the check box to the left of the contract that you have just created. Click Submit.
  81. Click button "Refresh" until the status for the contract states "Active"
  82. Create Account For: ExShipToAAFrom the Sales menu, click Accounts.
  83. 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 your Site Administrator.
  84. Click New. The Account notebook displays.
  85. 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'
  86. Click OK to save the business account and close the notebook. The business account is displayed in the Account List page.
  87. Click the same Account that was just saved to enable editing of the information.
  88. 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'
  89. Click OK to save the business account and close the notebook. The business account is displayed in the Account List page.
  90. Create Contract For: ExShipToAA
  91. From the Sales menu, click Accounts.
  92. 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 your Site Administrator.
  93. Select the check box to the left of the business account that you want to create a new contract for. Click New Contract. This will launch the Contract notebook.
  94. 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'
  95. Click OK to save the contract and close the notebook.
  96. Select the check box to the left of the business account that you have just created a new contract for. Click the button "Contracts"
  97. Select the check box to the left of the contract that you have just created. Click Submit.
  98. Create Account For: ExShipToABFrom the Sales menu, click Accounts.
  99. 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 your Site Administrator.
  100. Click New. The Account notebook displays.
  101. 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'
  102. Click OK to save the business account and close the notebook. The business account is displayed in the Account List page.
  103. Click the same Account that was just saved to enable editing of the information.
  104. 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'
  105. Click OK to save the business account and close the notebook. The business account is displayed in the Account List page.
  106. Create Contract For: ExShipToAB
  107. From the Sales menu, click Accounts.
  108. 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 your Site Administrator.
  109. Select the check box to the left of the business account that you want to create a new contract for. Click New Contract. This will launch the Contract notebook.
  110. 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'
  111. Click OK to save the contract and close the notebook.
  112. Select the check box to the left of the business account that you have just created a new contract for. Click the button "Contracts"
  113. Select the check box to the left of the contract that you have just created. Click Submit.
  114. Click button "Refresh" until the status for the contract states "Active"
  115. logout of WebSphere Accelerator
  116. Check product entitlement Log into the AdvancedB2BDirect Store URL: http://localhost/webapp/wcs/stores/servlet/AdvancedB2BDirect/index.jsp
  117. Log into Store:

    Userid ExShipToAA
    Password ibm1ibm
  118. Add two different products to the cart
  119. Click "Current Order" and click "Next"
  120. Ensure there are multiple shipping address drop-down selections available for each order
  121. Click "Checkout"
  122. Click "Next" and continue to "Order Now"
  123. Once there is an order confirmation, logout of store and repeat steps for ExShipToAB
  124. Log into Store:

    Userid ExShipToAB
    Password ibm1ibm
  125. Click "Browse Catalog"
  126. Add two different products to the cart
  127. Click "Current Order" and click "Next"
  128. Ensure there are multiple shipping addresses drop-down selections available for each order
  129. Click "Checkout"
  130. Click "Next" and continue to "Order Now"
  131. Once there is an order confirmation, logout of store
  132. Export Accounts and Contracts Log into the WebSphere Commerce Accelerator and select AdvancedB2BDirect Store
  133. Compile all account identifiers from the database. Use the following SQL:
      select * from account
    
  134. 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.
  135. Go to the directory <CommerceInstallPath>/xml/trading/xml/ and find the files that were just exported. These files represent your accounts.
  136. Export All Contracts from the Sales menu.
  137. Click Accounts.
  138. 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 your Site Administrator.
  139. Select the check box to the left of the business account that you want to export a contract for. Click Contracts. This will list all the available Contracts for a particular account.
  140. Select the check box to the left of the contracts that you wish to export and click "Export"
  141. The "Export contract to a file" page will appear. Enter in a Filename.xml value for each contract.
  142. Click "OK"
  143. Go to the directory <CommerceInstallPath>/xml/trading/xml/ and find the files that were just exported. These files represent your contracts.