IBM Support

Passing <Awards> in the input to createOrder API throws an error - "All awards must be associated to a promotion on the order"

Troubleshooting


Problem

In a scenario where promotions are not maintained in IBM Sterling Order Management System, it may be necessary to pass the award and promotion details explicitly to createOrder API.

Symptom

Create an order by passing the <Awards> attributes explicitly under OrderLine -

<OrderLine ReqShipDate="2016-11-07 00:00:00.0" OrderedQty="3.0" PrimeLineNo="1" SubLineNo="1">

<Item CostCurrency="USD" ItemID="WItem" />

<LinePriceInfo ListPrice="5" UnitPrice="5" TaxableFlag="Y" IsPriceLocked="Y"/>

<LineCharges>

<LineCharge ChargePerLine="6.00" ChargeAmount="6.00" ChargeCategory="Discount" ChargeName="Discount"/>

</LineCharges>

<Promotions Reset="N">

<Promotion Action="" IsExternal="Y" PromotionId="Get 2$ off"/>
</Promotions>

<Awards>

<Award AwardId="Get 2$ off" AwardAmount="-6.00000" ChargeCategory="Discount" ChargeName="Discount" AwardApplied="Y" AwardType="PRICING" PromotionId="Get 2$ off" Description="Get 2$ off">

</Award>

</Awards>

</OrderLine>



This results in an error -

All awards must be associated to a promotion on the order

Cause

Sterling automatically applies Awards when the promotion is present in the system and does not need the awards to be passed explicitly

Resolving The Problem

Set ValidatePromotionAward to N in the input to createOrder . This indicates if promotions and awards need to be validated and matched. Setting the flag to N will not look for the promotion in the system and inserts the awards in the YFS_PROMOTION_AWARD table

[{"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"}],"Version":"9.3;9.4;9.5","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
10 May 2022

UID

swg21995241