IBM Support

Calling repriceOrder API for a second time is throwing an error - Record already exists

Troubleshooting


Problem

After creating an order with item which has info price configured, call repriceOrder API twice. The second call to reprice order API throws an exception - Record already exists. The repriceOrder API invokes GetOrderPriceUE

Cause

This was due to a unique AdditionalLinePriceKey not being passed

Diagnosing The Problem

The issue was due to the API making an insert into YFS_ADDNL_LINE_PRICE.ADDNL_LINE_PRICE_KEY with the same AdditionalLinePriceKey in the second call as the first.

Resolving The Problem

Pass AdditionalLinePriceKey ( YFS_ADDNL_LINE_PRICE.ADDNL_LINE_PRICE_KEY) as LinePriceID in the output of getOrderPriceUE while making the consecutive reprice order call. You can get LinePriceID(AdditionalLinePriceKey ) in the input of getOrderPriceUE by extending the user exit input template.

[{"Product":{"code":"SS6PEW","label":"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.5;9.4","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
21 June 2018

UID

swg22017383