pfx-api:updateLPG

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

ObjectType

Yes

--

The object type for the price items. Supported values: PLI (Price List Item), LPG (Live Price Grid), XPLI (Extension Price List Item).

typedId

String

No

--

The typedId of the target entity.

priceListId

String

No

--

The Price List ID (e.g., 42.PL) that the items belong to.

performRecalculation

Boolean

No

true

Whether to trigger a recalculation after the upsert. Set to false to skip recalculation for better performance when doing bulk updates followed by a manual recalculation.


XML Route Examples

Upsert Price List items with recalculation:

XML
<route>
    <from uri="direct:upsertPLI"/>
    <to uri="pfx-api:upsertPriceItems?objectType=PLI&amp;priceListId=42.PL&amp;performRecalculation=true"/>
</route>

Upsert Live Price Grid items without recalculation:

XML
<route>
    <from uri="direct:upsertLPG"/>
    <to uri="pfx-api:updateLPG?objectType=LPG&amp;typedId=10.LPG&amp;performRecalculation=false"/>
</route>

Upsert extension price list items:

XML
<route>
    <from uri="direct:upsertXPLI"/>
    <to uri="pfx-api:upsertPriceItems?objectType=XPLI&amp;priceListId=55.PL"/>
</route>

Common Pitfalls

  • Setting performRecalculation=false improves performance for bulk loads, but you must trigger a recalculation manually afterwards (e.g., via pfx-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 objectType must match the type of items being upserted (PLI for Price List items, LPG for Live Price Grid items).