pfx-api:updateLPG
Upsert (insert or update) price list or live price grid items in Pricefx. Also known as upsertPriceItems.
URI Format
pfx-api:upsertPriceItems?objectType=PLI&priceListId=42.PL&performRecalculation=true
Alias: updateLPG
Both pfx-api:upsertPriceItems and pfx-api:updateLPG refer to the same operation.
Parameters
|
Parameter |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
ObjectType |
Yes |
-- |
The object type for the price items. Supported values: |
|
|
String |
No |
-- |
The typedId of the target entity. |
|
|
String |
No |
-- |
The Price List ID (e.g., |
|
|
Boolean |
No |
|
Whether to trigger a recalculation after the upsert. Set to |
XML Route Examples
Upsert Price List items with recalculation:
<route>
<from uri="direct:upsertPLI"/>
<to uri="pfx-api:upsertPriceItems?objectType=PLI&priceListId=42.PL&performRecalculation=true"/>
</route>
Upsert Live Price Grid items without recalculation:
<route>
<from uri="direct:upsertLPG"/>
<to uri="pfx-api:updateLPG?objectType=LPG&typedId=10.LPG&performRecalculation=false"/>
</route>
Upsert extension price list items:
<route>
<from uri="direct:upsertXPLI"/>
<to uri="pfx-api:upsertPriceItems?objectType=XPLI&priceListId=55.PL"/>
</route>
Common Pitfalls
-
Setting
performRecalculation=falseimproves performance for bulk loads, but you must trigger a recalculation manually afterwards (e.g., viapfx-api:calculate) or data may be stale. -
The exchange body must contain the price item data to upsert (typically a list of maps).
-
When using
priceListId, ensure the Price List exists. If it does not, the upsert will fail. -
The
objectTypemust match the type of items being upserted (PLIfor Price List items,LPGfor Live Price Grid items).