Define a new parameter in request messages
You can add new value points
parameter into the
existing requested messages from Sterling Order Management. The
parameter is then transformed by the Service Definition Framework.
The parameter is to be sent to the HCL Commerce GetEntitledPrice
service to get the calculated price.
About this task
value points. Instead, it is up to the merchant. A merchant sells the gift cards online. The price for the gift card is not only related to the quantity of the gift card, but also related to the
value pointsof the card. For example:
- The unit base offer price for one
value point
is $1. - If you buy one gift card with 50
value points
, the base offer price is $50. After applying some price rules, the contract price is $45. - If the base offer price for 100
value points
is $100, after applying price rules, the contract price is $80.
The unit base price for one
value pointcan be stored, and then the total base offer price can be calculated by multiplying the base price by the
value pointspurchased by the shopper. In the integrated environment between Sterling Order Management and HCL Commerce, the default price calculation flow for a product item is:
- In IBM Sterling
Call Center, the product item is open, and Sterling Order Management sends
an initial a request to HCL Commerce through
Service Definition Framework. The message is similar to:
<body xsi:type="ex:getItemPriceRequestMsg"> <input:ItemPrice Currency="USD" EnterpriseCode="MadisonsBase"> <LineItems> <LineItem ItemID="FULO-0101" LineID="1" Quantity="1" UnitOfMeasure="EACH"/> </LineItems> </input:ItemPrice> </body>
- The Service Definition Framework transforms the request message
from Sterling Order Management to
the format that is understood by HCL Commerce, for example:
<_prc:GetEntitledPrice releaseID="9.0" versionID="7.0.0.0" xmlns:_prc="http://www.ibm.com/smlns/prod/commerce/9/price" xmlns:_wcf-"http://www.ibm.com/smlns/prod/commerce/9/foundation" xmlns:oa="http://www.openapplications/org/oagis/9" xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance"> <oa:CreationDateTime>2012-03- 07T08:54:27.109Z</oa:CreationDateTime> <oa:BODID>24e42da0-6833-11e1-a38a-82b64f57220b</oa:BODID> <_wcf:BusinessContext> <_wcf:ContextData name="storeID">10001</_wcf:ContextData> </_wcf:BusinessContext> </oa:ApplicationArea> <_prc:DataArea> <oa:Get> <oa:Expression expressionLanguage="_wcf:XPath">{_wcf.ap=IBM_Store_EntitledPrice_All }/EntitledPrice[CatalogEntryIdentifier[ExternalIdentifier[PartNumber='FULO-0101']] and UnitPrice[Price[@currency='USD'] and (Quantity='1.0' and Quantity[@uom='c62'])])]</oa:Expression> </oa:Get> </_prc:DataArea> <_prc:GetEntitledPrice>
- The HCL Commerce GetEntitledPrice service transfers the request to price engine. The calculated price returns to the Service Definition Framework.
- The Service Definition Framework transforms the response message to the format that can be understood by Sterling Order Management.
- The Sterling Call Center shows the calculated price on the UI.
The response message format does not need to be changed
according to the user story. Compared with the supplied definitions
and their response, the price value is different. The price value
recalculates the entitled price with the value points
parameter.
To
add the value points
parameter into the request message:
- In the request message from Sterling Order Management, add
the attribute for
value points
, and also insert a node for it, if desired. This is an example:<ItemPrice Currency="USD" EnterpriseCode="MadisonsBase" IsQuantityTierRequested="N" OrganizationCode="MadisonsBase"> <LineItems> <LineItem ItemID="FULO-0101" LineID="1" Quantity="1" UnitOfMeasure="EACH"/> <Extn ValuePoints="500" /> </LineItems> <ItemPrice>
- For the request message to HCL Commerce, the
ValuePoints
parameter is transformed to VP.Note:An example of the request message:ValuePoints
is transformed to VP for conciseness in the XPath.<_prc:DataArea> <oa:Get> <oa:Expression expressionLanguage="_wcf:XPath">{_wcf.ap=IBM_Store_EntitledPrice_All }/EntitledPrice[ (CatalogEntryIdentifier[ExternalIdentifier{PartNumbe r='FULO-0101']] and UnitPrice[Price[@currency='USD'] and (Quanitity='1.0' and Quantity[@uom='C62'])] and VP='40')}</oa:Expression> </oa:Get> </_prc:DataArea>
All parameters are now defined.