pfx-api Component
This component is used as the Pricefx connector.
URI format | pfx-api:method |
Available Methods
Changelog
3.7.0
Method
importUsers
was implemented. https://pricefx.atlassian.net/browse/PFIMCORE-1242
3.4.0
Method
distributedCalculation
was implemented. https://pricefx.atlassian.net/browse/PFIMCORE-1096
1.8.0
Method
fetchIterator
was added in order to simplify the batch mode fetching https://pricefx.atlassian.net/browse/PFIMCORE-664
1.7.0
Method
import
was implemented. https://pricefx.atlassian.net/browse/PFIMCORE-760
1.6.0
Method
addProducts
was implemented. https://pricefx.atlassian.net/browse/PFIMCORE-763
1.4.0
Methods
customers
,products
andcancel
were implemented. https://pricefx.atlassian.net/browse/PFIMCORE-569Method
internalCopy
was implemented. https://pricefx.atlassian.net/browse/PFIMCORE-655Methods
datamartImport
anddatamartExport
were implemented. https://pricefx.atlassian.net/browse/PFIMCORE-671, https://pricefx.atlassian.net/browse/PFIMCORE-672Async
delete
was implemented. https://pricefx.atlassian.net/browse/PFIMCORE-684
1.2.0
Method
fetch
was implemented on all object types. https://pricefx.atlassian.net/browse/PFIMCORE-451Method
save
was implemented on a quote. https://pricefx.atlassian.net/browse/PFIMCORE-547
Connection Setup
The connection to use is resolved in the following way (from the highest precedence):
If the pfx-api parameter
connection
is set, the connection is used.
OrIf the header
partitionPfxApi
is set on the route, the connection is used.
OrThe default connection named
pricefx
is used.
If you set partitionPfxApi
before the first call, all subsequent calls within the route will use the connection from this header unless the parameter connection
on pfx-api is specified. To avoid this, clear the header.
Connection Setup Example
The following example demonstrates a complex setup of a connection on a route.
<routes xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="direct:create2"/>
<setHeader name="partitionPfxApi">
<constant>pricefx2</constant> (1)
</setHeader>
<to uri="pfx-api:fetch?filter=myFilter2&objectType=P&connection=pricefx3&resultFields=sku,attribute3,attribute6"/> (2)
<to uri="pfx-api:integrate?mapper=myMapper2&objectType=PX&businessKeys=name,sku"/> (3)
<removeHeaders pattern="partitionPfxApi"/> (4)
<to uri="pfx-api:integrate?mapper=myMapper2&objectType=PX&businessKeys=name,sku&connection={{pfx-connection}}"/> (5)
<to uri="mock:create2"/>
</route>
</routes>
In the code sample the following points are referred to:
(1) - The partitonPfxApi
header is populated with the pricefx2
connection. This means that all subsequent calls on the route will use this connection unless specified otherwise.
(2) - The pfx-api
call specifies a parameter connection pricefx3
to use. This connection takes precedence over the connection from the header partitionPfxApi
, thus the connection pricefx3
is used.
(3) - The pfx-api
call does not specify a parameter connection, thus the connection from the header partitionPfxApi
is used (pricefx2
).
(4) - The header partitionPfxApi
removed. No route connection is set now.
(5) - The pfx-api
call does not specify a connection, neither the partitionPfxApi
header is set. The default connection pricefx
is used.
IntegrationManager version 5.8.0