changeOrder resetting all charges at Line and Header level.

Technote (FAQ)


Question

What is the reason that sterling is resetting all line-level and header level charges to zero during the changeOrder api call with the flag Reset="N.



Simulation steps :





1. Create Order with the following input :





Add Line Level Discount and update IsManual flag = ‘N’ to simulate that it is a system generated charge.





<Order DocumentType="0001" DraftOrderFlag="N" EnterpriseCode="DEFAULT" OrderType="STANDARD" AllocationRuleID="SYSTEM" >

<OrderLines>

<OrderLine DeliveryMethod="SHP" PrimeLineNo="1" OrderedQty="1" >

<Item ItemID="Item2" UnitOfMeasure="EACH"/>

<LinePriceInfo IsPriceLocked="Y" UnitPrice="100.00"/>

<PersonInfoShipTo Country="US" />

<LineCharge ChargeCategory="CUSTOMER_APPEASEMENT" ChargeName="CUSTOMER_APPEASEMENT" ChargePerLine="20.00"/>

</LineCharges>

</OrderLine>

</OrderLines>

<PersonInfoBillTo Country="US" />

<PersonInfoContact Country="US" />

</Order>





2. Order will be get created.



Item price : 100

Discount : 20





Total price : 80





3. Call changeOrder API and give the discount 30$.





<Order OrderHeaderKey="20121212113018140479">

<OrderLines>

<OrderLine PrimeLineNo="1" SubLineNo="1">

<LineCharges Reset="N">

<LineCharge ChargeCategory="CUSTOMER_APPEASEMENT" ChargeName="CUSTOMER_APPEASEMENT" ChargePerLine="30.00" IsNewCharge="Y"/>

</LineCharges>

<LinePriceInfo IsPriceLocked="N"/>

</OrderLine>

</OrderLines>

</Order>





Actual result : Invoking changeOrder api with the following xml Reset="N. But it is resetting to zero all line-level and header level charges.

System should show the total price = 50.

Item price : 100

Discount : 20 + 30

Answer

It is observed that the Charge Category and Charge Name are same for both the charges added during createOrder and changeOrder API call.
This behavior is expected as there can't exist two different LineCharges for a same order line with same Charge Category and Charge Name.

As a solution, use a different Charge Category and Charge Name other than existing ones during the changeOrder API call.

Rate this page:

(0 users)Average rating

Document information


More support for:

Sterling Order Management

Software version:

9.1, 9.2

Operating system(s):

All

Reference #:

1624691

Modified date:

2013-03-29

Translate my page

Machine Translation

Content navigation