Develop > Presentation layer > Customize IBM Sales Center


WebSphere Commerce integration

Business Object Document messages sent from the IBM Sales Center client to the WebSphere Commerce Server are mapped to controller commands through the WebSphere Commerce message mapper. The WebSphere Commerce configuration file contains this message mapper entry. The contents of the file are:

<MessageMapper classname="com.ibm.commerce.messaging.programadapter.messagemapper.ecsax.ECSAXMessageMapper"
               enable="true"
               messageMapperId="-4"
               name="WCS.SOABODINTEGRATION">    

    <configuration DuplicateCreatesArray="true"
                   EcInboundMessageDtdFiles=""
                   EcInboundMessageDtdPath="messaging"
                   EcSystemTemplateFile="webservice_SOABOD_template.xml"
                   EcTemplatePath="messaging"
                   EcUserTemplateFile="webservice_SOABOD_template.extension.xml"
                   EmptyElementClearsData="true"
                   isValidating="false" />

</MessageMapper> 

WebSphere Commerce uses the !ENTITY declarations to include different files for each of the document command mappings, and has extended the message mapper declaration to include a file for extensions called...

webservice_SOABOD_template.extension.xml

You can update this file to include the own extensions and any additional or changed mappings that to define. The message mapper files are located in the XML configuration directory:

For example the file that maps the CreateCustomer BOD to the UserRegistrationAdminAddCmd command looks like this:

<TemplateDocument>    

<DocumentType version="8.1">CreateCustomer</DocumentType>    

<StartElement>CreateCustomer</StartElement>    

<TemplateTagName>CreateCustomer81Map</TemplateTagName>    

<CommandMapping>        

<Command CommandName="com.ibm.commerce.usermanagement.commands.UserRegistrationAdminAddCmd"
         Condition='profileType="B"'>>

<Constant Field="URL">NoURL</Constant>
<Constant Field="ReURL">NoReURL</Constant>
<Constant Field="registrationType">BuyerRegistration</Constant>
<Constant Field="profileType">B</Constant>
<Constant Field="disableExtendedChecking">true</Constant> 

</Command>        

<Command CommandName="com.ibm.commerce.usermanagement.commands.UserRegistrationAdminAddCmd"
         Condition='profileType="C"'>>

<Constant Field="URL">NoURL</Constant>
<Constant Field="ReURL">NoReURL</Constant>
<Constant Field="profileType">C</Constant>
<Constant Field="disableExtendedChecking">true</Constant>

</Command>        

<Command CommandName="com.ibm.commerce.usermanagement.commands.UserRegistrationAdminAddCmd"
         Condition='GuestUserRegisterCondition'>            

<Constant Field="URL">NoURL</Constant>            
<Constant Field="ReURL">NoReURL</Constant>            
<Constant Field="profileType">C</Constant>            
<Constant Field="disableExtendedChecking">true</Constant>        

</Command>    

</CommandMapping>

</TemplateDocument>

<TemplateTag name="CreateCustomer81Map">    
<!-- Command Parameters -->    
<Tag
XPath="DataArea/Customer/UserAccount/Authorization/UserId"
Field="logonId" FieldInfo="DATA"/>    
<Tag
XPath="DataArea/Customer/UserAccount/Authorization/Password"
Field="logonPassword"/>    
<Tag
XPath="DataArea/Customer/UserAccount/Authorization/VerifyPassword"
Field="logonPasswordVerify"/>    
<Tag
XPath="DataArea/Customer/UserAccount/Authorization/Status/Code"
Field="userStatus"/>    
<Tag XPath="x" Field="passwordExpired"/>    
<Tag
XPath="DataArea/Customer/UserAccount/Authorization/ChallengeQuestion"
Field="challengeQuestion"/>    
<Tag
XPath="DataArea/Customer/UserAccount/Authorization/ChallengeAnswer"
Field="challengeAnswer"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Addresses/Address/AddressId"
Field="addressId"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Addresses/Address/AddressNickName"
Field="nickName"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Addresses/Address@type"
Field="addressType"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Contacts/Contact/Person/PersonName/Salutation"
Field="personTitle"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Contacts/Contact/Person/PersonName/FamilyName"
Field="lastName"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Contacts/Contact/Person/PersonName/GivenName"
Field="firstName"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Contacts/Contact/Person/PersonName/MiddleName"
Field="middleName"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Addresses/Address/AddressLine"
XPathType="REPEAT"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Addresses/Address/AddressLine[1]"
Field="address1"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Addresses/Address/AddressLine[2]"
Field="address2"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Addresses/Address/AddressLine[3]"
Field="address3"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Addresses/Address/City"
Field="city"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Addresses/Address/StateOrProvinceCode"
Field="state"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Addresses/Address/PostalCode"
Field="zipCode"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Addresses/Address/CountryCode"
Field="country"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Addresses/Address/UserData/UserDataField"
XPathType="USERDATA"/>    
<Tag XPath="x" Field="primary"/>    
<Tag XPath="x" Field="selfAddress"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Contacts/Contact/Telephone"
XPathType="REPEAT"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Contacts/Contact/Telephone[1]"
Field="phone1"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Contacts/Contact/Telephone[1]@type"
Field="phone1Type"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Contacts/Contact/Telephone[1]@publish"
Field="publishPhone1"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Contacts/Contact/Telephone[2]"
Field="phone2"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Contacts/Contact/Telephone[2]@type"
Field="phone2Type"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Contacts/Contact/Telephone[2]@publish"
Field="publishPhone2"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Contacts/Contact/BestCallTime"
Field="bestCallingTime"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Contacts/Contact/Fax"
XPathType="REPEAT"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Contacts/Contact/Fax[1]"
Field="fax1"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Contacts/Contact/Fax[2]"
Field="fax2"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Contacts/Contact/EMailAddress"
XPathType="REPEAT"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Contacts/Contact/EMailAddress[1]"
Field="email1"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Contacts/Contact/EMailAddress[2]"
Field="email2"/>    
<Tag XPath="x" Field="billingCode"/>    
<Tag XPath="x" Field="billingCodeType"/>    
<Tag XPath="x" Field="packageSuppression"/>    
<Tag XPath="x" XPathType="REPEAT"/>    
<Tag XPath="x" Field="distinguishedName"/>    
<Tag XPath="DataArea/Customer/CustomerParty/Currency"
Field="preferredCurrency"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/CorrespondenceLanguage"
Field="preferredLanguage"/>    
<Tag XPath="x" XPathType="REPEAT"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Contacts/Contact/Person/PersonName/FormattedName"
Field="displayName"/>    
<Tag XPath="x" Field="photo"/>    
<Tag XPath="x" Field="preferredMeasure"/>    
<Tag XPath="x" Field="preferredCommunication"/>    
<Tag XPath="x" Field="preferredDelivery"/>    
<Tag XPath="x" Field="description"/>    
<Tag XPath="x" XPathType="REPEAT"/>    
<Tag XPath="x" Field="businessTitle"/>    
<Tag XPath="DataArea/Customer/CustomerParty/Business/Id"
Field="organizationId"/>    
<Tag XPath="DataArea/Customer/CustomerParty/Business/Name"
Field="organizationName"/>    
<Tag XPath="x" Field="organizationUnitId"/>    
<Tag XPath="x" Field="organizationUnitName"/>    
<Tag XPath="x" Field="employeeId"/>    
<Tag XPath="x" Field="alternateId"/>    
<Tag XPath="x" Field="employeeType"/>    
<Tag XPath="x" Field="officeAddress"/>    
<Tag XPath="x" Field="departmentNumber"/>    
<Tag XPath="x" Field="manager"/>    
<Tag XPath="x" Field="secretary"/>    
<Tag
XPath="DataArea/Customer/GuestCustomer/MigrateGuestCustomer"
Field='GuestUserRegisterConditiion' FieldInfo='COMMAND' />    
<Tag
XPath="DataArea/Customer/GuestCustomer/CustomerParty/PartyId/Id"
Field="userId"/>    
<Tag XPath="DataArea/Customer/CustomerDemographics/Age"
Field="age"/>    
<Tag XPath="DataArea/Customer/CustomerDemographics/Gender"
Field="gender"/>    
<Tag
XPath="DataArea/Customer/CustomerDemographics/AnnualIncome"
Field="income"/>    
<Tag
XPath="DataArea/Customer/CustomerDemographics/AnnualIncome@currency"
Field="incomeCurrency"/>    
<Tag
XPath="DataArea/Customer/CustomerDemographics/MaritalStatus"
Field="maritalStatus"/>    
<Tag
XPath="DataArea/Customer/CustomerDemographics/NumberOfChildren"
Field="children"/>    
<Tag
XPath="DataArea/Customer/CustomerDemographics/NumberInHousehold"
Field="household"/>    
<Tag XPath="DataArea/Customer/CustomerDemographics/Employer"
Field="companyName"/>    
<Tag
XPath="DataArea/Customer/CustomerDemographics/Department"
Field="departmentNumber"/>    
<Tag
XPath="DataArea/Customer/CustomerDemographics/BusinessTitle"
Field="businessTitle"/>    
<Tag
XPath="DataArea/Customer/CustomerDemographics/InterestHobby"
Field="hobbies"/>    
<Tag XPath="x" Field="orderBefore"/>    
<Tag XPath="x" Field="timeZone"/>    
<Tag
XPath="DataArea/Customer/Profile/Demographics/DemographicField"
XPathType="REPEAT"/>    
<Tag
XPath="DataArea/Customer/CustomerParty/Business/RelatedUnit/Unit/Id"
Field="parentMemberId"/>    
<Tag
XPath="DataArea/Customer/CustomerDemographics/ProfileType"
Field="profileType" FieldInfo="COMMAND"/>    
<Tag XPath="DataArea/Customer/CommerceArea/StoreId"
Field="storeId"/>    
<Tag XPath="DataArea/Customer/UserData/UserDataField"
XPathType="USERDATA"/>
</TemplateTag> 

Once the controller command has completed, it will be necessary to prepare a response document. The following entry in the WebSphere Commerce configuration file points to the response builder registry:

<component
 
compClassName="com.ibm.commerce.telesales.configuration.TelesalesRegistryComponentConfiguration"
  enable="true" name="Telesales Response Builder Registry
Configuration">  
<property
        baseRegistryFileName="TelesalesRegistry.xml"
        baseRegistryFilePath="messaging"
        customRegistryFileName=""
        customRegistryFilePath=""
        display="false" enableBaseRegistryOverride="false"/>
</component>

You can modify the customRegistryFileName and customRegistryFilePath attributes to point to a custom registry file. Ensure that enableBaseRegistryOverride is set to true. Entries in the custom registry will be combined with the entries in the base registry file. In the event that the same verb/noun pair is registered in both registry files, then the custom entry will be the one that is used. The base registry file for the IBM Sales Center is WC_EAR/xml/messaging/TelesalesRegistry.xml has the following format:

<WCTBodResponseBuilderRegistry>        
<Noun name="Customer">                
<Verb name="Get">                        
<ClassName>com.ibm.commerce.telesales.messaging.bodreply.ShowCustomer</ClassName>                
</Verb>                
<Verb name="Create">                        
<ClassName>com.ibm.commerce.telesales.messaging.bodreply.ConfirmCustomer</ClassName>                
</Verb>                
<Verb name="Sync">                        
<ClassName>com.ibm.commerce.telesales.messaging.bodreply.ConfirmCustomer</ClassName>                
</Verb>        
</Noun>        
<Noun name="SalesOrder">                
<Verb name="Get">                        
<ClassName>com.ibm.commerce.telesales.messaging.bodreply.ShowSalesOrder</ClassName>                
</Verb>                
<Verb name="Create">                        
<ClassName>com.ibm.commerce.telesales.messaging.bodreply.ConfirmSalesOrder</ClassName>                
</Verb>                
<Verb name="Sync">                        
<ClassName>com.ibm.commerce.telesales.messaging.bodreply.ConfirmSalesOrder</ClassName>                
</Verb>                
<Verb name="Cancel">                        
<ClassName>com.ibm.commerce.telesales.messaging.bodreply.ConfirmSalesOrder</ClassName>                
</Verb>        
</Noun>        
<Noun name="ElectronicCatalog">                
<Verb name="Get">                        
<ClassName>com.ibm.commerce.telesales.messaging.bodreply.ShowElectronicCatalog</ClassName>                
</Verb>        
</Noun>        
<Noun name="Logon">                
<Verb name="Process">                        
<ClassName>com.ibm.commerce.telesales.messaging.bodreply.AcknowledgeLogon</ClassName>                
</Verb>        
</Noun>        
<Noun name="Return">                
<Verb name="Create">                        
<ClassName>com.ibm.commerce.telesales.messaging.bodreply.ConfirmReturn</ClassName>                
</Verb>        
</Noun>        
<Noun name="Organization">                
<Verb name="Get">                        
<ClassName>com.ibm.commerce.telesales.messaging.bodreply.ShowOrganization</ClassName>                
</Verb>                
<Verb name="Create">                        
<ClassName>com.ibm.commerce.telesales.messaging.bodreply.ConfirmOrganization</ClassName>                
</Verb>        
</Noun>        
<Noun name="Comment">                
<Verb name="Create">                        
<ClassName>com.ibm.commerce.telesales.messaging.bodreply.ConfirmComment</ClassName>                
</Verb>                
<Verb name="Get">                        
<ClassName>com.ibm.commerce.telesales.messaging.bodreply.ShowComment</ClassName>                
</Verb>                
<Verb name="Sync">                        
<ClassName>com.ibm.commerce.telesales.messaging.bodreply.ConfirmComment</ClassName>                
</Verb>        
</Noun>        
<Noun name="Quote">                
<Verb name="Create">                        
<ClassName>com.ibm.commerce.telesales.messaging.bodreply.ConfrimQuote</ClassName>                
</Verb>                
<Verb name="Get">                        
<ClassName>com.ibm.commerce.telesales.messaging.bodreply.ShowQuote</ClassName>                
</Verb>                
<Verb name="Sync">                        
<ClassName>com.ibm.commerce.telesales.messaging.bodreply.ConfirmQuote</ClassName>                
</Verb>        
</Noun>
</WCTBodResponseBuilderRegistry>

The classes defined in the ClassName element must implement com.ibm.commerce.telesales.messaging.bodreply.ITelesalesResponseBuilder.


Related concepts

IBM Sales Center architecture


Related tasks

Map a new Business Object Document message to a new command

Map a modified Business Object Document message to a new or existing command

Add a new Business Object Document reply message

Modify an existing Business Object Document reply message

Replace an existing Business Object Document reply message

Example: Adding a user interface element using default WebSphere Commerce customization fields

Related reference

IBM Sales Center Business Object Document response builders available by default


Related information

Business Object Documents long description


+

Search Tips   |   Advanced Search