pfx-api Component
Summary: Complete reference of the pfx-api Camel component -- the primary interface for all Pricefx API operations (load, fetch, delete, integrate, truncate, flush, etc.).
1. URI Format
pfx-api:method?param1=value1¶m2=value2
The component is producer-only (no consumer/polling support). The method path parameter is required and selects the API operation to perform. All other configuration is passed as URI query parameters, which map to the fields of PfxApiConfiguration.
Minimal example:
<to uri="pfx-api:fetch?objectType=P&filter=myFilter"/>
2. Available Methods
|
Method |
Description |
Key Parameters |
|---|---|---|
|
|
Bulk-load data into Pricefx objects |
|
|
|
Load data from a file (compressed/batched) |
|
|
|
Fetch (export) data from any supported Pricefx object |
|
|
|
Fetch data and write directly to a CSV file |
|
|
|
Continue a batched fetch iteration |
(reads from exchange) |
|
|
Fetch a field collection structure |
|
|
|
Upsert data using business-key matching |
|
|
|
Flush data from a data feed to a data source |
|
|
|
Truncate a data feed, data source, or Datamart |
|
|
|
Refresh a Datamart |
|
|
|
Delete records by filter or typedId |
|
|
|
Calculate/recalculate values |
|
|
|
Execute a Pricefx formula |
|
|
|
Update a single record by typedId |
|
|
|
Save (create or full-replace) a single record |
|
|
|
Mass-edit records matching a filter |
|
|
|
Server-side import using the Pricefx Import API |
|
|
|
Import data into a Datamart via the DM Import API |
|
|
|
Export data from a Datamart |
|
|
|
Internal copy of a Pricefx entity |
|
|
|
Upsert price list or live price grid items |
|
See the full method reference in the source code for additional methods: cancel, resetColumn, addProducts, customers, products, importUsers, uploadProductImage, distributedCalculation, createNewRevision, duplicateCustomForm, changeStatusCustomForm, dataload, fetchRebateAgreementItemList, bdManagerUpload, getAssignedCustomers.
3. URI Parameters
All parameters are declared as @UriParam on PfxApiConfiguration. See the full parameter reference in the detailed documentation.
Key parameters:
|
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
|
ObjectType |
-- |
Pricefx object type (P, C, PX, CX, LTV, MLTV, DM, DMDS, etc.) |
|
|
String |
-- |
Name of the Pricefx connection bean |
|
|
String |
-- |
Mapper bean name for data transformation |
|
|
String |
-- |
Filter bean name for fetch/delete/massEdit |
|
|
String |
-- |
Data Source unique name |
|
|
String |
-- |
Comma-separated business key field names |
|
|
Boolean |
|
Enable batched fetching |
|
|
Integer |
|
Rows per batch |
|
|
String |
-- |
Source data feed name for flush |
|
|
String |
-- |
Target data source name for flush |
|
|
String |
-- |
Where to store response: header, property, or body |
|
|
String |
-- |
Name of header/property for outputTarget |
|
|
Boolean |
|
Run operation asynchronously |
|
|
Enum |
|
Wait strategy for loaddataFile |
4. Common Patterns
4.0 loaddataFile vs loaddata
|
Method |
When to Use |
How It Works |
|---|---|---|
|
|
Default for all CSV imports (P, PX, C, CX, LTV, MLTV2) |
Streams file directly to server. Much faster for large files. |
|
|
When you need Groovy row-level transformations |
IM parses and maps each record in memory. Slower but more flexible. |
4.1 Load Data (Import into Pricefx)
Load products into Pricefx:
<route>
<from uri="direct:loadProducts"/>
<to uri="pfx-api:loaddata?objectType=P&mapper=productMapper&businessKeys=sku"/>
</route>
Load data into a Data Source:
<route>
<from uri="direct:loadDataSource"/>
<to uri="pfx-api:loaddata?objectType=DM&dsUniqueName=MyDataSource&mapper=dsMapper&businessKeys=sku,region"/>
<!-- Flush is required after loading to make data visible in analytics -->
<to uri="pfx-api:flush?objectType=DM&dsUniqueName=MyDataSource"/>
</route>
Important: Always call
pfx-api:flushafter loading data into a Data Source (DMDS/DMF). Without flush, loaded data is not visible in Pricefx analytics.
Load data from a file with batching and wait-for-completion:
<route>
<from uri="file:{{import.directory}}?{{archive.file}}&{{read.lock}}"/>
<to uri="pfx-api:loaddataFile?objectType=P&mapper=productMapper&businessKeys=sku&waitForCompletionStrategy=Always"/>
</route>
4.2 Fetch (Export from Pricefx)
<route>
<from uri="direct:fetchProducts"/>
<to uri="pfx-api:fetch?objectType=P&filter=allProductsFilter"/>
</route>
4.3 Truncate
<to uri="pfx-api:truncate?objectType=DS&targetName=MyDataSource"/>
4.4 Delete
<to uri="pfx-api:delete?objectType=P&filter=deleteFilter"/>
4.5 Integrate (Upsert)
<to uri="pfx-api:integrate?objectType=P&mapper=productIntegrateMapper&businessKeys=sku"/>
4.6 Flush
Flush data from a data feed to a data source:
<to uri="pfx-api:flush?dataFeedName=MyFeed&dataSourceName=MyDS"/>
4.7 Refresh Datamart
<to uri="pfx-api:refresh?targetName=MyDatamart&incremental=true"/>
4.8 Calculate
<to uri="pfx-api:calculate?objectType=CFS&label=MyCFS"/>
5. Commonly Used Object Types
|
Code |
Description |
|---|---|
|
|
Products |
|
|
Customers |
|
|
Product Extensions |
|
|
Customer Extensions |
|
|
Lookup Table Values |
|
|
Matrix Lookup Table Values |
|
|
Datamarts / Data Sources |
|
|
Datamart Data Sources |
|
|
Price Lists |
|
|
Price List Items |
|
|
Quotes |
|
|
Calculated Field Sets |
|
|
Custom Forms |
For the full list, see the ObjectType enum in the source code.