If you want to change or insert default title of an eSpot in the IBM WCS then please follow below steps.
- Modify below loader file which is used to insert/update default content of an eSpot.
<?xml version="1.0" encoding="UTF-8"?>
<_config:DataloadBusinessObjectConfiguration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ibm.com/xmlns/prod/commerce/foundation/config ../../../../xml/config/xsd/wc-dataload-businessobject.xsd"
xmlns:_config="http://www.ibm.com/xmlns/prod/commerce/foundation/config">
<_config:DataLoader className="com.ibm.commerce.foundation.dataload.BusinessObjectLoader" >
<_config:DataReader className="com.ibm.commerce.foundation.dataload.datareader.CSVReader" tokenDelimiter="," firstLineIsHeader="true" useHeaderAsColumnName="true" />
<_config:BusinessObjectBuilder className="com.ibm.commerce.foundation.dataload.businessobjectbuilder.TableObjectBuilder">
<_config:Table name="emspot" deleteKey="delete" deleteValue="1">
<_config:Column name="EMSPOT_ID" value="emspot_id" valueFrom ="IDResolve">
<_config:IDResolve tableName="emspot" generateNewKey="true">
</_config:IDResolve>
</_config:Column>
<_config:Column name="STOREENT_ID" value="storeId" valueFrom ="InputData"/>
<_config:Column name="LASTUPDATE" value="last_update" valueFrom ="InputData"/>
<_config:Column name="LASTUPDATEDBY" value="last_updated_by" valueFrom ="InputData"/>
<_config:Column name="DEFAULTRULE" value="default_rule" valueFrom ="InputData"/>
<_config:Column name="NAME" value="name" valueFrom ="InputData"/>
<_config:Column name="DESCRIPTION" value="description" valueFrom ="InputData"/>
<_config:Column name="SUPPORTEDTYPES" value="supported_types" valueFrom ="InputData"/>
<_config:Column name="USAGETYPE" value="usage_type" valueFrom ="InputData"/>
</_config:Table>
<_config:Table name="collateral" deleteKey="delete" deleteValue="1">
<_config:Column name="COLLATERAL_ID" value="collateral_id" valueFrom ="IDResolve">
<_config:IDResolve tableName="collateral" generateNewKey="true">
</_config:IDResolve>
</_config:Column>
<_config:Column name="COLLTYPE_ID" value="type" valueFrom ="InputData"/>
<_config:Column name="STOREENT_ID" value="storeId" valueFrom ="InputData"/>
<_config:Column name="NAME" value="collname" valueFrom ="InputData"/>
<_config:Column name="URL" value="url" valueFrom ="InputData"/>
<_config:Column name="FIELD1" value="cfield1" valueFrom ="InputData"/>
<_config:Column name="FIELD2" value="cfield2" valueFrom ="InputData"/>
</_config:Table>
<_config:Table name="colldesc" deleteKey="delete" deleteValue="1">
<_config:Column name="COLLATERAL_ID" value="collateral_id" valueFrom="IDResolve" >
<_config:IDResolve tableName="collateral" generateNewKey="false">
<_config:UniqueIndexColumn name="NAME" value="collname" valueFrom="InputData"/>
</_config:IDResolve >
</_config:Column>
<_config:Column name="LANGUAGE_ID" value="langId" valueFrom ="InputData"/>
<_config:Column name="LOCATION" value="location" valueFrom ="InputData"/>
<_config:Column name="MARKETINGTEXT" value="marketingtext" valueFrom ="InputData"/>
<_config:Column name="LONGMKTGTEXT" value="longmktgtext" valueFrom ="InputData"/>
<_config:Column name="FIELD1" value="field1" valueFrom ="InputData"/>
<_config:Column name="FIELD2" value="field2" valueFrom ="InputData"/>
</_config:Table>
<_config:Table name="dmemspotdef" deleteKey="delete" deleteValue="1">
<_config:Column name="DMEMSPOTDEF_ID" value="dmemspotdef_id" valueFrom ="IDResolve">
<_config:IDResolve tableName="dmemspotdef" generateNewKey="true">
</_config:IDResolve>
</_config:Column>
<_config:Column name="EMSPOT_ID" value="emspot_id" valueFrom ="IDResolve">
<_config:IDResolve tableName="emspot" generateNewKey="false">
<_config:UniqueIndexColumn name="NAME" value="name" valueFrom="InputData"/>
</_config:IDResolve>
</_config:Column>
<_config:Column name="STOREENT_ID" value="storeId" valueFrom ="InputData"/>
<_config:Column name="CONTENTTYPE" value="contenttype" valueFrom ="InputData"/>
<_config:Column name="CONTENT" value="collateral_id" valueFrom ="IDResolve" >
<_config:IDResolve tableName="collateral" generateNewKey="false">
<_config:UniqueIndexColumn name="NAME" value="collname" valueFrom="InputData"/>
</_config:IDResolve>
</_config:Column>
</_config:Table>
<_config:Table name="dmemspotcolldef" deleteKey="delete" deleteValue="1">
<_config:Column name="DMEMSPOTCOLLDEF_ID" value="dmemspotcolldef_id" valueFrom ="IDResolve">
<_config:IDResolve tableName="dmemspotcolldef" generateNewKey="true">
</_config:IDResolve>
</_config:Column>
<_config:Column name="EMSPOT_ID" value="emspot_id" valueFrom ="IDResolve">
<_config:IDResolve tableName="emspot" generateNewKey="false">
<_config:UniqueIndexColumn name="NAME" value="name" valueFrom="InputData"/>
</_config:IDResolve>
</_config:Column>
<_config:Column name="STOREENT_ID" value="storeId" valueFrom ="InputData"/>
<_config:Column name="COLLATERAL_ID" value="collateral_id" valueFrom ="IDResolve" >
<_config:IDResolve tableName="collateral" generateNewKey="false">
<_config:UniqueIndexColumn name="NAME" value="collname" valueFrom="InputData"/>
</_config:IDResolve>
</_config:Column>
</_config:Table>
<_config:BusinessObjectMediator className="com.ibm.commerce.foundation.dataload.businessobjectmediator.TableObjectMediator">
</_config:BusinessObjectMediator>
</_config:BusinessObjectBuilder>
</_config:DataLoader>
</_config:DataloadBusinessObjectConfiguration>
- Find below XML piece of code in the default content loader file of an eSpot
<_config:Table name="dmemspotdef" deleteKey="delete" deleteValue="1">
<_config:Column name="DMEMSPOTDEF_ID" value="dmemspotdef_id" valueFrom ="IDResolve">
<_config:IDResolve tableName="dmemspotdef" generateNewKey="true">
</_config:IDResolve>
</_config:Column>
<_config:Column name="EMSPOT_ID" value="emspot_id" valueFrom ="IDResolve">
<_config:IDResolve tableName="emspot" generateNewKey="false">
<_config:UniqueIndexColumn name="NAME" value="name" valueFrom="InputData"/>
</_config:IDResolve>
</_config:Column>
<_config:Column name="STOREENT_ID" value="storeId" valueFrom ="InputData"/>
<_config:Column name="CONTENTTYPE" value="contenttype" valueFrom ="InputData"/>
<_config:Column name="CONTENT" value="collateral_id" valueFrom ="IDResolve" >
<_config:IDResolve tableName="collateral" generateNewKey="false">
<_config:UniqueIndexColumn name="NAME" value="collname" valueFrom="InputData"/>
</_config:IDResolve>
</_config:Column>
</_config:Table>
- And replace it with below XML code
<_config:Table name="dmemspotcolldef" deleteKey="delete" deleteValue="1">
<_config:Column name="DMEMSPOTCOLLDEF_ID" value="dmemspotcolldef_id" valueFrom ="IDResolve">
<_config:IDResolve tableName="dmemspotcolldef" generateNewKey="true">
</_config:IDResolve>
</_config:Column>
<_config:Column name="EMSPOT_ID" value="emspot_id" valueFrom ="IDResolve">
<_config:IDResolve tableName="emspot" generateNewKey="false">
<_config:UniqueIndexColumn name="NAME" value="name" valueFrom="InputData"/>
</_config:IDResolve>
</_config:Column>
<_config:Column name="STOREENT_ID" value="storeId" valueFrom ="InputData"/>
<_config:Column name="COLLATERAL_ID" value="collateral_id" valueFrom ="IDResolve" >
<_config:IDResolve tableName="collateral" generateNewKey="false">
<_config:UniqueIndexColumn name="NAME" value="collname" valueFrom="InputData"/>
</_config:IDResolve>
</_config:Column>
</_config:Table>
- Save
the new loader file with any name like Ex. wc-loader-marketing-spot-and-content_title.xml.
- Update this file name reference in the dataload XML file, like below code.
<_config:DataLoadConfiguration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ibm.com/xmlns/prod/commerce/foundation/config ../xsd/wc-dataload.xsd"
xmlns:_config="http://www.ibm.com/xmlns/prod/commerce/foundation/config">
<_config:DataLoadEnvironment configFile="../../common-env-files/wc-dataload-env.xml" />
<_config:LoadOrder commitCount="100" batchSize="1" dataLoadMode="Replace">
<_config:property name="charset" value="UTF-8" />
<_config:property name="loadSEO" value="true" />
<_config:LoadItem name="MarketingeSpot" businessObjectConfigFile="wc-loader-marketing-spot-and-content_title.xml">
<_config:DataSourceLocation location="../loadfiles/MarketingeSpot.csv" />
</_config:LoadItem>
</_config:LoadOrder>
</_config:DataLoadConfiguration>
- Now stop the server and run the below dataload command to insert/update default content of an eSpot.
dataload.bat ./loaders/wc-dataload-marketing-espot.xml -DXmlValidation=false
- Now start the server and check the default title of the eSpot should be inserted/updated.