Question & Answer
Question
Documentation for the mapping of the MCF to MCS fields for Pricing
Answer
The MCS 8.0.1/MCF 8.0 release pricing integration feature consists of providing implementations for the YFSGetExternalPricesForItemListUE and YFSOrderRepricingUE.
YFSGetExternalPricesForItemListUE Input XML template
<ItemList CallingOrganizationCode="" Currency="" PricingDate="" SearchReference1="" SearchReference2="">
<Item ItemID="" UnitOfMeasure="" OrganizationCode="" ItemGroupCode="" />
</ItemList>
YFSGetExternalPricesForItemListUE Output XML template
<ItemList>
<Item ItemID="" UnitOfMeasure="">
<ComputedPrice UnitPrice="" />
</Item>
</ItemList>
Default User Exit Implementation
This user exit is implemented with as a service calling out to the PricingLineService API that Order Selling provides.
The input is expected to contain the Currency, UserID, EnterpriseCode, and ItemID. However, if the UserID is not passed, the RegisteredUser will be used.
These attributes map to the expected input for the Order Selling api as follows:
Order Fulfillment Attribute
|
Order Selling Attribute
|
Is Mandatory
|
Default Value
|
ItemList@CallingOrganizationCode
|
PricingLineServiceRequest@OrganizationCode
|
Y
|
Defaulted in cmgt.property file
|
ItemList@PricingDate
|
PricingLineServiceRequest/Date
|
N
|
Current Date
|
ItemList@Currency
|
PricingLineServiceRequest/Currency
|
Y
|
None
|
ItemList@SearchReference1
|
PriceLineServiceRequest/BuyerUser
|
N
|
None
|
ItemList/Item@ItemID
|
PriceLineServiceRequest/PricingLineItemList/PricingLineItem/SKU
|
Y
|
None
|
ItemList/Item@OrganizationCode
|
PriceLineServiceRequest/PricingLineItemList/PricingLineItem/SupplierOrgCode
|
N
|
None
|
Here is an example of what the input will look like when translated:
<PricingLineServiceRequest OrganizationCode="">
<Date/>
<CustomerType/>
<Currency/>
<BuyerUser/>
<BuyerOrgCode/>
<PricingLineItemList>
<PricingLineItem>
<SKU/>
<ItemID>Pass-Through</ItemID>
<Quantitiy/>
<SupplierOrgCode/>
</PricingLineItem>
</PricingLineItemList>
</PricingLineServiceRequest>
The PricingLineService call returns the following:
<PricingLineServiceReply>
<Date/>
<CustomerType/>
<Currency/>
<BuyerUser/>
<BuyerOrgCode/>
<PricingLineItemList>
<PricingLineItem>
<SKU/>
<ItemID>Pass-Through</ItemID>
<Quantitiy/>
<ListPrice/>
<PriceListAbsoluteAdjustment/>
<PriceListPercentAdjustment/>
<UnitPrice/>
<SupplierOrgCode/>
<TotalPrice/>
<PricingSupplierPriceList>
<PricingSupplierPrice>
<UnitPrice/>
<SupplierOrgCode/>
</PricingSupplierPrice>
</PricingSupplierPriceList>
</PricingLineItem>
</PricingLineItemList>
</PricingLineServiceReply>
The reply is mapped back into the output to the User Exit using the following mapping:
Order Fulfillment Attribute
|
Order Selling Attribute
|
ItemList/Item/@!ItemID
|
PricingLineServiceReply/PricingLineItemList/PricingLineItem/SKU
|
ItemList/Item/@UnitOfMeasure
|
PricingLineServiceReply/PricingLineItemList/PricingLineItem/ItemID
|
ItemList/Item/ComputedPrice/@UnitPrice
|
PricingLineServiceReply/PricingLineItemList/PricingLineItem/PricingSupplierPriceList/PricingSupplierPrice/UnitPrice
|
ItemList/Item@OrganizationCode
|
PricingLineServiceReply/PricingLineItemList/PricingLineItem/SupplierOrgCode
|
YFSOrderRepricingUE Input XML template
<Order EnterpriseCode="" OrderNo="" BillToID="" BuyerOrganizationCode="" BuyerUserId="" DraftOrderFlag="" PricingClassificationCode="" DocumentType="" IsNewOrder="" OrderComplete="" OrderDate="" SellerOrganizationCode="">
<PriceInfo Currency="" />
<OrderLines>
<OrderLine OrderLineKey="" >
<Item ItemID="" ItemGroupCode="" />
<LinePriceInfo IsPriceLocked="" ListPrice="" UnitPrice="" TaxableFlag="" RepricingQty="" />
<LineCharges>
<LineCharge ChargeCategory="" ChargeName="" ChargePerLine="" ChargePerUnit="" ChargeAmount="" Reference=""/>
</LineCharges>
</OrderLine>
</OrderLines>
<HeaderCharges>
<HeaderCharge ChargeCategory="" ChargeName="" ChargeAmount="" Reference="" />
</HeaderCharges>
<Promotions>
<Promotion PromotionId="" />
</Promotions>
</Order>
YFSOrderRepricingUE Output XML template
<Order>
<OrderLines>
<OrderLine OrderLineKey="">
<LinePriceInfo UnitPrice="" />
<LineCharges Reset="Y">
<LineCharge ChargeCategory="" ChargeName="" ChargePerLine="" ChargePerUnit="" Reference="" />
</LineCharges>
<Awards>
<Award AwardAmount="" AwardApplied="" AwardId="" AwardType="" DenialReason="" Description="" PromotionID="" />
</Awards>
</OrderLine>
<HeaderCharges>
<HeaderCharge ChargeCategory="" ChargeName="" ChargeAmount="" Reference="" />
</HeaderCharges>
<Awards>
<Award AwardAmount="" AwardApplied="" AwardId="" AwardType="" DenialReason="" Description="" PromotionID="" />
</Awards>
<Promotions>
<Promotion PromotionId="" PromotionType="" PromotionApplied="" Description="" DenialReason="" />
</Promotions>
</OrderLines>
</Order>
Default User Exit Implementation
This user exit is implemented with as a service calling out to the PricingCartService API that Order Selling provides. The input expected looks like the following:
<PricingCartServiceRequest>
<Date/>
<CustomerType/>
<Currency/>
<BuyerUser/>
<BuyerOrgCode/>
<RunRulesFlag/>
<PricingCartItemList>
<PricingCartItem>
<SKU/>
<ItemID>Pass-Through</ItemID>
<Quantitiy/>
<FreezeFlag/>
<UnitPrice/>
<SupplierOrgCode/>
</PricingCartItem>
</PricingCartItemList>
<PricingCouponList>
<PricingCoupon>
<CouponID/>
</PricingCoupon>
</PricingCouponList>
</PricingCartServiceRequest>
These attributes map to the expected input for the Order Selling API as follows:
If it is not a PROD order line and the line is not for information only, it is passed to the service as a PricingCartItem.
Order Fulfillment Attribute
|
Order Selling Attribute
|
Is Mandatory
|
Default Value
|
Order@EnterpriseCode
|
PricingCartServiceRequest@OrganizationCode
|
Y
|
Defaulted in cmgt.property file
|
if DraftOrderFlag == "N" {Order@OrderDate}
|
PricingCartServiceRequest/Date
|
N
|
Current Date
|
Order@PricingClassificationCode
|
PricingCartServiceRequest/CustomerType
|
N
|
Defaulted by OS Rule
|
Order/PriceInfo@Currency
|
PricingCartServiceRequest/Currency
|
Y
|
None
|
Order/@BuyerUserId
|
PricingCartServiceRequest/BuyerUser
|
N
|
None
|
Order/@BuyerOrganizationCode
|
PricingCartServiceRequest/BuyerOrgCode
|
N
|
None
|
Order/OrderLines/OrderLine/Item@ItemID
|
PricingCartServiceRequest/PricingCartItemList/PricingCartItem/SKU
|
Y
|
None
|
Order/OrderLines/OrderLine/@OrderLineKey
|
PricingCartServiceRequest/PricingCartItemList/PricingCartItem/ItemID
|
Y
|
Pass-Through - Mapping back to Order
|
Order/OrderLines/OrderLine/LinePriceInfo@RepricingQty
|
PricingCartServiceRequest/PricingCartItemList/PricingCartItem/Quantity
|
N
|
1
|
Order/OrderLines/OrderLine/LinePriceInfo@IsPriceLocked
|
PricingCartServiceRequest/PricingCartItemList/PricingCartItem/FreezeFlag
|
N
|
false
|
Order/OrderLines/OrderLine/LinePriceInfo@UnitPrice
|
PricingCartServiceRequest/PricingCartItemList/PricingCartItem/UnitPrice
|
Conditional
|
0
|
if exists (Order@SellerOrganizationCode) else (Order@EnterpriseCode)
|
PricingCartServiceRequest/PricingCartItemList/PricingCartItem/SupplierOrgCode
|
N
|
If not passed, a list of Supplier Prices is returned
|
Order/Promotions/Promotion@PromotionId
|
PricingCartServiceRequest/PricingCouponList/PricingCoupon/CouponID
|
N
|
None
|
The PricingCartService call returns the following:
<PricingCartServiceReply>
<Date/>
<CustomerType/>
<Currency/>
<BuyerUser/>
<CartSubTotal/>
<CartTotalAdjustment/>
<CartTotalPrice/>
<DistributeHeaderAdjustments/>
<RunRulesFlag/>
<PricingCartItemList>
<PricingCartItem>
<SKU/>
<Quantitiy/>
<ListPrice/>
<PriceListAbsoluteAdjustment/>
<PriceListPercentAdjustment/>
<BasePrice/>
<UnitPrice/>
<FreezeFlag/>
<TotalPrice/>
<SupplierOrgCode/>
<ExternalRefID/>
<AuxiliaryPriceList>
<AuxiliaryPrice>
<PricingType/>
<ListPrice/>
<PriceListAbsoluteAdjustment/>
<PriceListPercentAdjustment/>
<UnitPrice/>
</AuxiliaryPrice>
</AuxiliaryPriceList>
<PricingAdjustmentList>
<PricingAdjustment>
<Name/>
<Description/>
<AdjustmentID/>
<AdjustmentType/>
<QuantityAppliedTo/>
<AbsoluteAdjustment/>
<PercentAdjustment/>
</PricingAdjustment>
</PricingAdjustmentList>
<DistributedHeaderAdjustmentList>
<DistributedHeaderAdjustment>
<Name/>
<Description/>
<AdjustmentID/>
<AdjustmentType/>
<AbsoluteAdjustment/>
</DistributedHeaderAdjustment>
</DistributedHeaderAdjustmentList>
<PricingSupplierPriceList>
<PricingSupplierPrice>
<UnitPrice/>
<SupplierOrgCode/>
<AuxiliaryPriceList>
<AuxiliaryPrice>
<PricingType/>
<ListPrice/>
<PriceListAbsoluteAdjustment/>
<PriceListPercentAdjustment/>
<UnitPrice/>
</AuxiliaryPrice>
</AuxiliaryPriceList>
</PricingSupplierPrice>
</PricingSupplierPriceList>
</PricingCartItem>
</PricingCartItemList>
<PricingCouponList>
<PricingCoupon>
<CouponID/>
<CouponStatus/>
</PricingCoupon>
</PricingCouponList>
<PricingAdjustmentList>
<PricingAdjustment>
<Name/>
<Description/>
<AdjustmentID/>
<AdjustmentType/>
<QuantityAppliedTo/>
<AbsoluteAdjustment/>
<PercentAdjustment/>
</PricingAdjustment>
</PricingAdjustmentList>
</PricingCartServiceReply>
The reply is mapped back into the output to the User Exit using the following mapping, notice only PricingAdjustment's of type COUPON are mapped back to a Promotion and Award on the order. Otherwise only a Header Charge or Line Charge will be produced.
Header Charges will only be mapped when the DistributeHeaderAdjustments attribute returned by the OS service is "false" or it is empty. Otherwise, all PricingAdjustments returned under the PricingCartServiceReply will be ignored. Instead, additional Line Charges will be constructed on each order line utilizing the DistributedHeaderAdjustmentList element. This element will be used to produce line charges in addition to the PricingAdjustments on the order line.
Order Fulfillment Attribute
|
Order Selling Attribute
|
||
Order/OrderLines/OrderLine@OrderLineKey
|
PricingCartServiceReply/PricingCartItemList/PricingCartItem/ItemID
|
||
Order/OrderLines/OrderLine/LinePriceInfo@UnitPrice
|
PricingCartServiceReply/PricingCartItemList/PricingCartItem/BasePrice
|
||
Pricing Adjustment: Order/OrderLines/OrderLine/LineCharges/LineCharge@ChargeCategory
|
if(PricingCartServiceReply/PricingCartItemList/PricingCartItem/PricingAdjustmentList/PricingAdjustment/AbsoluteAdjustment < 0){"OSDISCOUNT"}else{"UPLIFT"}</div>
</td>
</tr>
<tr>
Pricing Adjustment: Order/OrderLines/OrderLine/LineCharges/LineCharge@ChargeName
|
|
if(AdjustmentType==COUPON){PricingCartServiceReply/PricingCartItemList/PricingCartItem/PricingAdjustmentList/PricingAdjustment/AdjustmentID}else{PricingCartServiceReply/PricingCartItemList/PricingCartItem/PricingAdjustmentList/PricingAdjustment/Name}
|
Pricing Adjustment: Order/OrderLines/OrderLine/LineCharges/LineCharge@ChargePerUnit
|
if (PricingCartServiceReply/PricingCartItemList/PricingCartItem/PricingAdjustmentList/PricingAdjustment/QuantitiyAppliedTo == RepricingQty) PricingCartServiceReply/PricingCartItemList/PricingCartItem/PricingAdjustmentList/PricingAdjustment/AbsoluteAdjustment
|
||
Pricing Adjustment: Order/OrderLines/OrderLine/LineCharges/LineCharge@ChargePerLine
|
if (PricingCartServiceReply/PricingCartItemList/PricingCartItem/PricingAdjustmentList/PricingAdjustment/QuantitiyAppliedTo != RepricingQty) PricingCartServiceReply/PricingCartItemList/PricingCartItem/PricingAdjustmentList/PricingAdjustment/AbsoluteAdjustment
|
||
Pricing Adjustment: Order/OrderLines/OrderLine/LineCharges/LineCharge@!Reference
|
PricingCartServiceReply/PricingCartItemList/PricingCartItem/PricingAjustmentList/PricingAdjustment/Description
|
||
Distributed Header Adjustment: Order/OrderLines/OrderLine/LineCharges/LineCharge@ChargeCategory
|
if(PricingCartServiceReply/PricingCartItemList/PricingCartItem/DistributedHeaderAdjustmentList/DistributedHeaderAdjustment/AbsoluteAdjustment < 0){"OSDISCOUNT"}else{"UPLIFT"}</div>
</td>
</tr>
<tr>
Distributed Header Adjustment: Order/OrderLines/OrderLine/LineCharges/LineCharge@ChargeName
|
|
if(AdjustmentType==COUPON){PricingCartServiceReply/PricingCartItemList/PricingCartItem/DistributedHeaderAdjustmentList/DistributedHeaderAdjustment/AdjustmentID}else{PricingCartServiceReply/PricingCartItemList/PricingCartItem/DistributedHeaderAdjustmentList/DistributedHeaderAdjustment/Name}
|
Distributed Header Adjustment: Order/OrderLines/OrderLine/LineCharges/LineCharge@ChargePerLine
|
PricingCartServiceReply/PricingCartItemList/PricingCartItem/DistributedHeaderAdjustmentList/DistributedHeaderAdjustment/AbsoluteAdjustment
|
||
Distributed Header Adjustment: Order/OrderLines/OrderLine/LineCharges/LineCharge@!Reference
|
PricingCartServiceReply/PricingCartItemList/PricingCartItem/DistributedHeaderAdjustmentList/DistributedHeaderAdjustment/Description
|
||
Order/OrderLines/OrderLine/Awards/Award/@AwardApplied
|
Y
|
||
Pricing Adjustment Coupon: Order/OrderLines/OrderLine/Awards/Award/@AwardId
|
PricingCartServiceReply/PricingCartItemList/PricingCartItem/PricingAdjustmentList/PricingAdjustment/Name
|
||
Pricing Adjustment Coupon: Order/OrderLines/OrderLine/Awards/Award/@AwardAmount
|
PricingCartServiceReply/PricingCartItemList/PricingCartItem/PricingAdjustmentList/PricingAdjustment/AbsoluteAdjustment
|
||
Pricing Adjustment Coupon: Order/OrderLines/OrderLine/Awards/Award/@AwardType
|
PricingCartServiceReply/PricingCartItemList/PricingCartItem/PricingAdjustmentList/PricingAdjustment/AdjustmentType
|
||
Pricing Adjustment Coupon: Order/OrderLines/OrderLine/Awards/Award/@Description
|
PricingCartServiceReply/PricingCartItemList/PricingCartItem/PricingAdjustmentList/PricingAdjustment/Description
|
||
Pricing Adjustment Coupon: Order/OrderLines/OrderLine/Awards/Award/@PromotionID
|
PricingCartServiceReply/PricingCartItemList/PricingCartItem/PricingAdjustmentList/PricingAdjustment/AdjustmentID
|
||
Distributed Header Adjustment Coupon: Order/OrderLines/OrderLine/Awards/Award/@AwardId
|
PricingCartServiceReply/PricingCartItemList/PricingCartItem/DistributedHeaderAdjustmentList/DistributedHeaderAdjustment/Name
|
||
Distributed Header Adjustment Coupon: Order/OrderLines/OrderLine/Awards/Award/@AwardAmount
|
PricingCartServiceReply/PricingCartItemList/PricingCartItem/DistributedHeaderAdjustmentList/DistributedHeaderAdjustment/AbsoluteAdjustment
|
||
Distributed Header Adjustment Coupon: Order/OrderLines/OrderLine/Awards/Award/@AwardType
|
PricingCartServiceReply/PricingCartItemList/PricingCartItem/DistributedHeaderAdjustmentList/DistributedHeaderAdjustment/AdjustmentType
|
||
Distributed Header Adjustment Coupon: Order/OrderLines/OrderLine/Awards/Award/@Description
|
PricingCartServiceReply/PricingCartItemList/PricingCartItem/DistributedHeaderAdjustmentList/DistributedHeaderAdjustment/Description
|
||
Distributed Header Adjustment Coupon: Order/OrderLines/OrderLine/Awards/Award/@PromotionID
|
PricingCartServiceReply/PricingCartItemList/PricingCartItem/DistributedHeaderAdjustmentList/DistributedHeaderAdjustment/AdjustmentID
|
||
Order/HeaderCharges/HeaderCharge@ChargeCategory
|
if(PricingCartServiceReply/PricingAdjustmentList/PricingAdjustment/AbsoluteAdjustment < 0){"OSDISCOUNT"}else{"UPLIFT"}</div>
</td>
</tr>
<tr>
Order/HeaderCharges/HeaderCharge@ChargeName
|
|
if(AdjustmentType==COUPON){PricingCartServiceReply/PricingAdjustmentList/PricingAdjustment/AdjustmentID}else{PricingCartServiceReply/PricingAdjustmentList/PricingAdjustment/Name}
|
Order/HeaderCharges/HeaderCharge@ChargeAmount
|
PricingCartServiceReply/PricingAdjustmentList/PricingAdjustment/AbsoluteAdjustment
|
||
Order/HeaderCharges/HeaderCharge@!Reference
|
PricingCartServiceReply/PricingAjustmentList/PricingAdjustment/Description
|
||
Coupon: Order/Awards/Award/@AwardApplied
|
Y
|
||
Coupon: Order/Awards/Award/@AwardId
|
PricingCartServiceReply/PricingAdjustmentList/PricingAdjustment/Name
|
||
Coupon: Order/Awards/Award/@AwardAmount
|
PricingCartServiceReply/PricingAdjustmentList/PricingAdjustment/AbsoluteAdjustment
|
||
Coupon: Order/Awards/Award/@AwardType
|
PricingCartServiceReply/PricingAdjustmentList/PricingAdjustment/AdjustmentType
|
||
Coupon: Order/Awards/Award/@Description
|
PricingCartServiceReply/PricingAdjustmentList/PricingAdjustment/Description
|
||
Coupon: Order/Awards/Award/@PromotionID
|
PricingCartServiceReply/PricingAdjustmentList/PricingAdjustment/AdjustmentID
|
||
Coupon: Order/Pomotions/Promotion@PromotionId
|
PricingCartServiceReply/PricingCouponList/PricingCoupon/CouponID
|
||
Coupon: Order/Pomotions/Promotion@PromotionType
|
"COUPON"
|
||
Coupon: Order/Pomotions/Promotion@PromotionApplied
|
PricingCartServiceReply/PricingCouponList/PricingCoupon/CouponStatus == 'APPLIED' = 'Y' else 'N'
|
There are a couple of notes to mention here:
- Promotions and Awards, and their corresponding Charges are created ONLY from Coupons applied to the order. All other PricingAdjustments are mapped only as Charges at the Header or Line levels.
- The Order Selling app always returns AbsoluteAdjustment values when the Pricing Rule is configured as a percentage.
- External Charges are not currently mapped, but will be recreated through the pricing engine.
[{"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Mapping and Translation","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}},{"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Mapping and Translation","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]
Historical Number
FAQ2638
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21518146