Get catalog group merchandising associations by ID
This service request, getCatalogGroupMerchandisingAssociationsByID, returns the merchandising associations and the details information for the catalog group. A list of all CatalogGroup returns if you pass in multiple catalog group IDs. The catalog group ID is used in the request.
Request
Request BOD GetCatalogGroup Access profile WC_CatalogGroupMerchandisingAssociationsProfile Schema /Catalog-DataObjects/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/GetCatalogGroup.xsd Service data object GetCatalogGroupType
Sample request BOD
<_cat:GetCatalogGroup xmlns:_cat="http://www.ibm.com/xmlns/prod/commerce/9/catalog" xmlns:_wcf="http://www.ibm.com/xmlns/prod/commerce/9/foundation" xmlns:oa="http://www.openapplications.org/oagis/9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <oa:ApplicationArea xsi:type="_wcf:ApplicationAreaType"> <oa:CreationDateTime> 2007-01-25T14:41:03.479Z </oa:CreationDateTime> <oa:BODID>fd81f820-acab-11db-a88f-832d45b907cf</oa:BODID> <_wcf:BusinessContext> <_wcf:ContextData name="storeId">10001</_wcf:ContextData> <_wcf:ContextData name="catalogId">10001</_wcf:ContextData> </_wcf:BusinessContext> </oa:ApplicationArea> <_cat:DataArea> <oa:Get> <oa:Expression expressionLanguage="wcf:XPath"> {_wcf.ap=WC_CatalogGroupMerchandisingAssociationsProfile}/CatalogGroup[CatalogGroupIdentifier[ExternalIdentifier[GroupIdentifier='Batteries']]] </oa:Expression> </oa:Get> </_cat:DataArea> </_cat:GetCatalogGroup>
Response
Response BOD ShowCatalogGroup Schema /Catalog-DataObjects/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/ShowCatalogGroup.xsd Service data object ShowCatalogGroupType The response contains the following information:
/CatalogGroup/CatalogGroupIdentifier/UniqueID /CatalogGroup/CatalogGroupIdentifier/ExternalIdentifier/@ownerID /CatalogGroup/CatalogGroupIdentifier/ExternalIdentifier/GroupIdentifier /CatalogGroup/Description/@language /CatalogGroup/Description/Name /CatalogGroup/Description/ThumbNail /CatalogGroup/Description/ShortDescription /CatalogGroup/Description/FullImage /CatalogGroup/Description/LongDescription /CatalogGroup/@displayTemplateHere AssociationCodeType is MerchandisingAssociation
Sample response BOD
<_cat:ShowCatalogGroup xmlns:Oagis9="http://www.openapplications.org/oagis/9" xmlns:_cat="http://www.ibm.com/xmlns/prod/commerce/9/catalog" xmlns:_wcf="http://www.ibm.com/xmlns/prod/commerce/9/foundation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Oagis9:ApplicationArea xsi:type="_wcf:ApplicationAreaType"> <Oagis9:CreationDateTime> 2007-01-26T11:47:22.047Z </Oagis9:CreationDateTime> <Oagis9:BODID> e4674050-ad5c-11db-986f-827045b7cf58 </Oagis9:BODID> </Oagis9:ApplicationArea> <_cat:DataArea> <Oagis9:Show recordSetCompleteIndicator="false" /> <_cat:CatalogGroup> <_cat:CatalogGroupIdentifier> <_wcf:UniqueID>51101000000</_wcf:UniqueID> <_wcf:ExternalIdentifier ownerID="7000000000000000002"> <_wcf:GroupIdentifier> Store 511 Fall Fashions </_wcf:GroupIdentifier> </_wcf:ExternalIdentifier> </_cat:CatalogGroupIdentifier> <_cat:Description language="-1"> <_cat:Name>Fall Fashions</_cat:Name> <_cat:ShortDescription> short description for fall fashions </_cat:ShortDescription> <_cat:LongDescription> long description for fall fashions </_cat:LongDescription> </_cat:Description> <_cat:Association AssociationCodeType="MerchandisingAssociation" quantity="1.0" sequence="1.0"> <_cat:Name>X-SELL</_cat:Name> <_cat:CatalogGroupReference> <_cat:CatalogGroupIdentifier> <_wcf:UniqueID>51100000014</_wcf:UniqueID> <_wcf:ExternalIdentifier ownerID="7000000000000000002"> <_wcf:GroupIdentifier> Silverware </_wcf:GroupIdentifier> </_wcf:ExternalIdentifier> </_cat:CatalogGroupIdentifier> <_cat:displayName>Silverware</_cat:displayName> </_cat:CatalogGroupReference> </_cat:Association> <_cat:Association AssociationCodeType="MerchandisingAssociation" quantity="1.0" sequence="1.0"> <_cat:Name>UPSELL</_cat:Name> <_cat:CatalogGroupReference> <_cat:CatalogGroupIdentifier> <_wcf:UniqueID>51100000013</_wcf:UniqueID> <_wcf:ExternalIdentifier ownerID="7000000000000000002"> <_wcf:GroupIdentifier> Plates </_wcf:GroupIdentifier> </_wcf:ExternalIdentifier> </_cat:CatalogGroupIdentifier> <_cat:displayName>Plates</_cat:displayName> </_cat:CatalogGroupReference> </_cat:Association> <_cat:Association AssociationCodeType="MerchandisingAssociation" quantity="1.0" sequence="1.0"> <_cat:Name>ACCESSORY</_cat:Name> <_cat:CatalogGroupReference> <_cat:CatalogGroupIdentifier> <_wcf:UniqueID>51100000016</_wcf:UniqueID> <_wcf:ExternalIdentifier ownerID="7000000000000000002"> <_wcf:GroupIdentifier> Wine Glasses </_wcf:GroupIdentifier> </_wcf:ExternalIdentifier> </_cat:CatalogGroupIdentifier> <_cat:displayName>Wine Glasses</_cat:displayName> </_cat:CatalogGroupReference> </_cat:Association> </_cat:CatalogGroup> </_cat:DataArea> </_cat:ShowCatalogGroup>
Usage
To use this service request on a JSP page, use the expression-builder, getCatalogGroupMerchandisingAssociationsByID, and pass the catGroupId parameter.
This service request uses the
CatalogGroupDataBean data bean.This maps to the following XPath expression: {_wcf.ap=$accessProfile$}/CatalogGroup[CatalogGroupIdentifier[UniqueID='$catGroupId$']]
The default is: accessProfile=WC_CatalogGroupMerchandisingAssociationsProfile.
By default, the expression builder in the get-data-config.xml file associated to this service only accepts one id or identifier. By using the pattern from getCatalogGroupSummaryByIDs or getCatalogGroupDetailsbyIDs, you can create your own expression builder that will accept multiple IDs or identifiers.
Exceptions
If there is an error the error is reported in the Response message. You can see the error details in the trace log, SystemOut.log.
Customization
The following extensions are supported:
- Create your own implementation of the interface ComposeCatalogGroupTaskCmd. By creating your own implementation of the ComposeCatalogGroupTaskCmd, and an access profile you can control the level of information returned by these services.
Related concepts
../../com.ibm.commerce.business_process.doc/concepts/processFind_product_(ConsumerDirect).htm
Design pattern for Get service implementation
Related Reference
WebSphere Commerce foundation tag library