Get catalog entry components by ID

This service request, getCatalogEntryComponentsByID, returns the details of a catalog entry plus the components of this catalog entry. For example, if the catalog entry is a ProductBean, then the components will be the ItemBeans (SKUs) associated to the product. A list of all CatalogEntry returns if you pass in multiple catalog entry IDs. In this service, we use the catalog entry ID to request the components of the catalog entry.

 

Request

Request BOD GetCatalogEntry
Access profile WC_CatalogEntryComponentsProfile
Schema /Catalog-DataObjects/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/GetCatalogEntry.xsd
Service data object GetCatalogEntryType

 

Sample request BOD

<_cat:GetCatalogEntry
       
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-25T16:49:45.207Z
                </oa:CreationDateTime>
               
<oa:BODID>f8385780-acbd-11db-8259-832d45b925f9</oa:BODID>
                <_wcf:BusinessContext>
                        <_wcf:ContextData
name="storeId">511</_wcf:ContextData>
                </_wcf:BusinessContext>
        </oa:ApplicationArea>
        <_cat:DataArea>
                <oa:Get>
                        <oa:Expression
expressionLanguage="wcf:XPath">
                               
{_wcf.ap=WC_CatalogEntryComponentsProfile}/CatalogEntry[CatalogEntryIdentifier[(UniqueID='51100000019')]]
                        </oa:Expression>
                </oa:Get>
        </_cat:DataArea>
</_cat:GetCatalogEntry>

 

Response

Response BOD ShowCatalogEntry
Schema /Catalog-DataObjects/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/ShowCatalogEntry.xsd
Service data object ShowCatalogEntryType

The response contains the following information if the catalog entry is of type ProductBean:

/CatalogEntry/@catalogEntryTypeCode/
/CatalogEntry/CatalogEntryIdentifier/UniqueID
/CatalogEntry/ CatalogEntryIdentifier/ExternalIdentifier/@ownerID
/CatalogEntry/ CatalogEntryIdentifier/ExternalIdentifier/PartNumber
/CatalogEntry/Description/@language
/CatalogEntry/Description/Name
/CatalogEntry/Description/ThumbNail
/CatalogEntry/Description/ShortDescription
/CatalogEntry/Description/FullImage
/CatalogEntry/Description/LongDescription
/CatalogEntry/ListPrice/Price(@currency)
/CatalogEntry/ListPrice/Quantity
/CatalogEntry/Price/StandardPrice/Price/Price/@currency
/CatalogEntry/Price/StandardPrice/Price/Quantity
/CatalogEntry/Price/ContractPrice/@minimumQuantity
/CatalogEntry/Price/ContractPrice/Price/Price/@currency/
/CatalogEntry/Price/ContractPrice/@minimumQuantity) /Price/Quantity
/CatalogEntry/Price/ContractPrice/Price/Quantity
/CatalogEntry/Price/ContractPrice/@minimumQuantity/
/CatalogEntry/Price/ContractPrice/ContractIdentifier/UniqueID
/CatalogEntry/Price/ContractPrice/ContractIdentifier/ExternalIdentifier/@majorVersionNumber
/CatalogEntry/Price/ContractPrice/ContractIdentifier/ExternalIdentifier/@minorVersionNumber
/CatalogEntry/Price/ContractPrice/ContractIdentifier/ExternalIdentifier/@origin
/CatalogEntry/Price/ContractPrice/ContractIdentifier/ExternalIdentifier/@ownerID
/CatalogEntry/Price/ContractPrice(@minimumQuantity)ContractIdentifier/ExternalIdentifier/Name
/CatalogEntry/CatalogEntryAttributes/@displaySequence
/CatalogEntry/CatalogEntryAttributes/@language
/CatalogEntry/CatalogEntryAttributes/@usage
/CatalogEntry/CatalogEntryAttributes/Name
/CatalogEntry/CatalogEntryAttributes/Description
/CatalogEntry/CatalogEntryAttributes/StringValue/Value
/CatalogEntry/CatalogEntryAttributes/IntegerValue/Value
/CatalogEntry/CatalogEntryAttributes/FloatValue/Value
/CatalogEntry/NavigationRelationship/@displaySequence
/CatalogEntry/NavigationRelationship/CatalogEntryReference/@catalogEntryTypeCode
/CatalogEntry/NavigationRelationship/CatalogEntryReference/CatalogEntryIdentifier
/CatalogEntry/NavigationRelationship/CatalogEntryReference/CatalogEntryIdentifier/UniqueID>
/CatalogEntry/NavigationRelationship/CatalogEntryReference/CatalogEntryIdentifier/ExternalIdentifier/@ownerID
/CatalogEntry/NavigationRelationship/CatalogEntryReference/CatalogEntryIdentifier/ExternalIdentifier/PartNumber
/CatalogEntry/NavigationRelationship/CatalogEntryReference/displayName

The response contains the following information if the catalog entry is of type PackageBean or BundleBean:

/CatalogEntry/@catalogEntryTypeCode/
/CatalogEntry/CatalogEntryIdentifier/UniqueID
/CatalogEntry/CatalogEntryIdentifier/ExternalIdentifier/@ownerID
/CatalogEntry/CatalogEntryIdentifier/ExternalIdentifier/PartNumber
/CatalogEntry/Description/@language
/CatalogEntry/Description/Name
/CatalogEntry/Description/ThumbNail
/CatalogEntry/Description/ShortDescription
/CatalogEntry/Description/FullImage
/CatalogEntry/Description/LongDescription
/CatalogEntry/ListPrice/Price(@currency)
/CatalogEntry/ListPrice/Quantity
/CatalogEntry/Price/StandardPrice/Price/Price/@currency
/CatalogEntry/Price/StandardPrice/Price/Quantity
/CatalogEntry/Price/ContractPrice/@minimumQuantity
/CatalogEntry/Price/ContractPrice/Price/Price/@currency/
/CatalogEntry/Price/ContractPrice/@minimumQuantity)/Price/Quantity
/CatalogEntry/Price/ContractPrice/Price/Quantity
/CatalogEntry/Price/ContractPrice/@minimumQuantity/
/CatalogEntry/Price/ContractPrice/ContractIdentifier/UniqueID
/CatalogEntry/Price/ContractPrice/ContractIdentifier/ExternalIdentifier/@majorVersionNumber
/CatalogEntry/Price/ContractPrice/ContractIdentifier/ExternalIdentifier/@minorVersionNumber
/CatalogEntry/Price/ContractPrice/ContractIdentifier/ExternalIdentifier/@origin
/CatalogEntry/Price/ContractPrice/ContractIdentifier/ExternalIdentifier/@ownerID
/CatalogEntry/Price/ContractPrice(@minimumQuantity)ContractIdentifier/ExternalIdentifier/Name
/CatalogEntry/CatalogEntryAttributes/@displaySequence/CatalogEntry/CatalogEntryAttributes/@language
/CatalogEntry/CatalogEntryAttributes/@usage/CatalogEntry/CatalogEntryAttributes/Name
/CatalogEntry/CatalogEntryAttributes/Description/CatalogEntry/CatalogEntryAttributes/StringValue/Value
/CatalogEntry/CatalogEntryAttributes/IntegerValue/Value
/CatalogEntry/CatalogEntryAttributes/FloatValue/Value
/CatalogEntry/KitComponent/@KitComponentCodeType
/CatalogEntry/KitComponent/@quantity
/CatalogEntry/KitComponent/@sequence
/CatalogEntry/KitComponent/CatalogEntryReference/@catalogEntryTypeCode
/CatalogEntry/KitComponent/CatalogEntryReference
/CatalogEntryIdentifier
/CatalogEntry/KitComponent/CatalogEntryReference/CatalogEntryIdentifier/UniqueID>
/CatalogEntry/KitComponent/CatalogEntryReference/CatalogEntryIdentifier/ExternalIdentifier/@ownerID
/CatalogEntry/KitComponent/CatalogEntryReference/CatalogEntryIdentifier/ExternalIdentifier/PartNumber
/CatalogEntry/KitComponent/CatalogEntryReference/displayName

 

Sample response BOD

<_cat:ShowCatalogEntry
        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-25T17:06:46.703Z
                </Oagis9:CreationDateTime>
                <Oagis9:BODID>
                        5903ef50-acc0-11db-986f-827045b7cf58
                </Oagis9:BODID>
        </Oagis9:ApplicationArea>
        <_cat:DataArea>
                <Oagis9:Show />
                <_cat:CatalogEntry
catalogEntryTypeCode="ProductBean">
                        <_cat:CatalogEntryIdentifier>
                               
<_wcf:UniqueID>51100000019</_wcf:UniqueID>
                                <_wcf:ExternalIdentifier
                                       
ownerID="7000000000000000002">
                                       
<_wcf:PartNumber>FUDE-01</_wcf:PartNumber>
                                </_wcf:ExternalIdentifier>
                        </_cat:CatalogEntryIdentifier>
                        <_cat:Description language="-1">
                                <_cat:Name>Executive
Six-Drawer Desk</_cat:Name>
                                <_cat:Thumbnail>
                                       
images/catalog/FUDE_01_sm.jpg
                                </_cat:Thumbnail>
                                <_cat:FullImage>
                                        images/catalog/FUDE_01.jpg
                                </_cat:FullImage>
                                <_cat:ShortDescription>
                                        Cherry-finish executive
desk to complement any
                                        office.
                                </_cat:ShortDescription>
                                <_cat:LongDescription>
                                        Cherry-finish executive
desk to complement any
                                        office, boasting eight
fully-extensible drawers with
                                        ball-bearing suspension and
hardwood veneer surfaces
                                        with a beautiful cherry
finish. Measures 72" in
                                        width, 36" in depth, and
30" in height.
                                </_cat:LongDescription>
                        </_cat:Description>
                        <_cat:CatalogEntryAttributes />
                        <_cat:ListPrice>
                                <_wcf:Price
currency="USD">1599.99</_wcf:Price>
                        </_cat:ListPrice>
                        <_cat:Price>
                                <_wcf:StandardPrice>
                                        <_wcf:Price>
                                                <_wcf:Price
currency="USD">1599.99</_wcf:Price>
                                        </_wcf:Price>
                                </_wcf:StandardPrice>
                                <_wcf:ContractPrice
minimumQuantity="1.0">
                                        <_wcf:Price>
                                                <_wcf:Price
currency="USD">1599.99</_wcf:Price>
                                        </_wcf:Price>
                                       
<_wcf:ContractIdentifier>
                                               
<_wcf:UniqueID>51100000001</_wcf:UniqueID>
                                               
<_wcf:ExternalIdentifier majorVersionNumber="1"
                                                       
minorVersionNumber="0" origin="0"
                                                       
ownerID="7000000000000000002">
                                                       
<_wcf:Name>
                                                               
ConsumerDirectATP Default Contract
                                                       
</_wcf:Name>
                                               
</_wcf:ExternalIdentifier>
                                       
</_wcf:ContractIdentifier>
                                </_wcf:ContractPrice>
                        </_cat:Price>
                        <_cat:NavigationRelationship
displaySequence="0.0">
                                <_cat:CatalogEntryReference
                                       
catalogEntryTypeCode="ItemBean">
                                       
<_cat:CatalogEntryIdentifier>
                                               
<_wcf:UniqueID>51100000020</_wcf:UniqueID>
                                               
<_wcf:ExternalIdentifier
                                                       
ownerID="7000000000000000002">
                                                       
<_wcf:PartNumber>FUDE-0101</_wcf:PartNumber>
                                               
</_wcf:ExternalIdentifier>
                                       
</_cat:CatalogEntryIdentifier>
                                        <_cat:displayName>
                                                Executive
Six-Drawer Desk
                                        </_cat:displayName>
                                </_cat:CatalogEntryReference>
                        </_cat:NavigationRelationship>
                </_cat:CatalogEntry>
        </_cat:DataArea>
</_cat:ShowCatalogEntry>

 

Usage

To use this service request on a JSP page use the expression-builder, getCatalogEntryComponentsByID, and pass the catEntryId parameter.

The expression-builder maps to the following XPath expression:

{_wcf.ap=$accessProfile$}/CatalogEntry[CatalogEntryIdentifier[(UniqueID='$catEntryId$')]]

The default value is: accessProfile=WC_CatalogEntryComponentsProfile. This service request uses the
CatalogEntryDataBean data bean.

By default, the expression builder in the get-data-config.xml file associated to this service only accept one id or partnumber. By using the pattern from getCatalogEntrySummaryByIDs or getCatalogEntryDetailsByIDs, you can create your own expression builder that will accept multiple IDs or part numbers.

 

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:

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