Adding the new role to the store type mapping

In this lesson, you learn how to create a customized configuration file to map the new usage to store types, and to map the store to the role type.

About this task

There are two main purposes of the customization of this configuration file.
  • To map the new usage to store types: The new usage is represented by externalValue="EXT_ManageSearchTermAssociation". For example, the store types that are mapped with the new usages include B2B, B2C, and the Extended Site Model stores, which means that the new usages can be used with these stores.
  • To map the store to the role types: You need to add the new role, the Search Term Manager role, to the store types configuration file.

Procedure

  1. Navigate to workspace_dir\WC\xml\config
  2. Create a directory that is called com.ibm.commerce.infrastructure-ext.
  3. Create a custom component configuration file and rename it to wc-component.xml.
  4. Map the new usage to the store types.
    1. Open wc-component.xml for editing.
    2. Copy and paste the following code block into the file.
      <?xml version="1.0" encoding="ISO-8859-1"?>
      
      <!--
       =================================================================
        Licensed Materials - Property of IBM
      
        WebSphere Commerce
      
        (C) Copyright IBM Corp. 2012 All Rights Reserved.
      
        US Government Users Restricted Rights - Use, duplication or
        disclosure restricted by GSA ADP Schedule Contract with
        IBM Corp.
       =================================================================
      -->
      
      <_config:DevelopmentComponentConfiguration
      	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      	xmlns:_config="http://www.ibm.com/xmlns/prod/commerce/foundation/config"
      	xsi:schemaLocation="http://www.ibm.com/xmlns/prod/commerce/foundation/config ../xsd/wc-component.xsd ">
      
      	<_config:valuemappingservice>
      		<_config:valuemapping externalName="StoreType" internalName="StoreType">
      			<!-- Map tool type to STORE.STORETYPE in database -->
      			<_config:valuemap externalValue="EXT_ManageSearchTermAssociation" internalValue="B2C, B2B, BBB, RHS, BRH, CPS, SCS, CHS, SCP, SHS, MHS, BMH" />		
      		</_config:valuemapping>
  5. Add the new role to the store type mapping.
    1. Run the following SQL statement to determine the Search Term Manager role ID:
      Select role_id, name from role;
    2. Copy and paste the following code block, replacing 10001 with the correct role ID of the Search Term Manager.
      <_config:valuemapping externalName="RoleType" internalName="RoleType">
      			<!-- Map STORE.STORETYPE to roles in database 
      				Available roles:
       				-1 Site Administrator
      				-3 Customer Service Representative
      				-4 Seller
      				-6 Store Administrator X
      				-8 Product Manager
      				-9 Marketing Manager
      				-10 Receiver
      				-11 Pick Packer
      				-12 Operations Manager
      				-13 Buyer (sell-side)
      				-14 Customer Service Supervisor
      				-15 Returns Administrator
      				-16 Category Manager
      				-17 Logistics Manager
      				-18 Sales Manager
      				-19 Account Representative
      				-20 Seller Administrator
      				-21 Buyer Administrator
      				-22 Buyer Approver
      				-24 Buyer (buy-side)
      				-25 Procurement Buyer Administrator
      				-26 Procurement Buyer
      				-27 Channel Manager
      				-29 Registered Customer X
      				-30 Attachment Manager X
      				-31 Organization Participant
      				-32 Workspace Taskgroup Approver
      				-33 Workspace Content Contributor
      				-34 Workspace Manager
      
      				Available store types:
      				B2C = Consumer direct;
      				BBB = Basic B2B;
      				B2B = Advanced B2B direct;
      				CHS = Channel hub;
      				CPS = Catalog asset store;
      				RHS = Consumer direct reseller store;
      				BRH = B2B reseller store;
      				RPS = Consumer direct reseller storefront asset store;
      				BRP = B2B reseller storefront asset store;
      				DPS = Distributor asset store;
      				DPX = Distributor proxy store;
      
      				SCP = Supplier hub; 
      				SPS = Supplier asset store;
      				SHS = Supplier hosted store;
      				SCS = Supplier catalog asset store;
      
      				HCP = Hosting hub;
      				PBS = Store directory;
      				MHS = Consumer direct hosted store;
      				BMH = B2B hosted store;
      				MPS = Consumer direct hosted storefront asset store;
      				BMP = B2B hosted storefront asset store.
      			-->
      			<!-- Consumer Direct -->
      			<_config:valuemap externalValue="B2C" internalValue="-9,-4,-8,-16,-13,-1,-32,-33,-34,10001" />
      			
      			<!-- Basic B2B -->
      			<_config:valuemap externalValue="BBB" internalValue="-9,-4,-8,-16,-13,-1,-32,-33,-34,10001" />
      
      			<!-- Advanced B2B Direct -->
      			<_config:valuemap externalValue="B2B" internalValue="-18,-19,-9,-4,-17,-8,-16,-13,-1,-32,-33,-34,10001" />
      			
      			<!-- Demand Chain -->
      			<_config:valuemap externalValue="BRH" internalValue="-13, -19,-18,-9,-4,-17,-16,-1,-32,-33,-34,10001" />
      			<_config:valuemap externalValue="RHS" internalValue="-13,-9,-4,-16,-1,-32,-33,-34,10001" />
      			<_config:valuemap externalValue="CHS" internalValue="-27,-9,-1,-32,-33,-34,10001" />
      			<_config:valuemap externalValue="CPS" internalValue="-18,-19,-4,-16,-1,-32,-33,-34,10001" />
      			
      			<!-- Supply Chain Model -->
      			<_config:valuemap externalValue="SHS" internalValue="-19,-13, -18,-9,-4,-17,-16,-1,-32,-33,-34,10001" />
      			<_config:valuemap externalValue="SCP" internalValue="-27,-9,-1,-32,-33,-34,10001" />
      			<_config:valuemap externalValue="SCS" internalValue="-18,-19,-4,-16,-1,-32,-33,-34,10001" />
      
      			<!-- Extended Site Model -->
      			<_config:valuemap externalValue="MHS" internalValue="-9,-4,-8,-16,-13,-1,-32,-33,-34,10001" />
      			<_config:valuemap externalValue="BMH" internalValue="-19,-18,-9,-4,-17,-8,-16,-13,-1,-32,-33,-34,10001" />
      		</_config:valuemapping>
      	</_config:valuemappingservice>
      	
      </_config:DevelopmentComponentConfiguration>