pfx-api:internalCopy

pfx-api:internalCopy

Internal copy (duplicate) of a Pricefx entity such as a Price List, Price Grid, or other supported object.


URI Format

pfx-api:internalCopy?label=CopiedEntityName

Alias: internalcopy


Parameters

Parameter

Type

Required

Default

Description

label

String

Yes

--

Label (name) for the newly created copy of the entity.

objectType

ObjectType

No

--

The Pricefx object type to copy (e.g., PL, PG).

typedId

String

No

--

The typedId of the entity to copy. Can also be provided in the exchange body.


XML Route Examples

Copy (duplicate) a Price List:

XML
<route>
    <from uri="direct:copyPriceList"/>
    <to uri="pfx-api:internalCopy?objectType=PL&amp;label=CopiedPriceList"/>
</route>

Copy a Price Grid with typedId set dynamically:

XML
<route>
    <from uri="direct:copyPriceGrid"/>
    <setHeader name="typedId">
        <simple>${body[typedId]}</simple>
    </setHeader>
    <to uri="pfx-api:internalCopy?objectType=PG&amp;label=CopiedPriceGrid"/>
</route>

Common Pitfalls

  • The label parameter is mandatory. Without it, the copy operation will fail.

  • Ensure the source entity exists and the typedId is valid before triggering the copy.

  • The copied entity is created as a new independent object; subsequent changes to the original do not affect the copy.