pfx-api Component

This component is used as the Pricefx connector.

URI format

pfx-api:method

Available Methods

Changelog

3.7.0

3.4.0

1.8.0

1.7.0

  • Method import was implemented.

1.6.0

  • Method addProducts was implemented.

1.4.0

  • Methods customers, products and cancel were implemented.

  • Method internalCopy was implemented.

  • Methods datamartImport and datamartExport were implemented. ,

  • Async delete was implemented.

1.2.0

  • Method fetch was implemented on all object types.

  • Method save was implemented on a quote.

Connection Setup

The connection to use is resolved in the following way (from the highest precedence):

  1. If the pfx-api parameter connection is set, the connection is used.
    Or

  2. If the header partitionPfxApi is set on the route, the connection is used.
    Or

  3. The 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&amp;objectType=P&amp;connection=pricefx3&amp;resultFields=sku,attribute3,attribute6"/> (2) <to uri="pfx-api:integrate?mapper=myMapper2&amp;objectType=PX&amp;businessKeys=name,sku"/> (3) <removeHeaders pattern="partitionPfxApi"/> (4) <to uri="pfx-api:integrate?mapper=myMapper2&amp;objectType=PX&amp;businessKeys=name,sku&amp;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.0.0