Decision Matrix
Summary: Consolidated decision guide — when to use X vs Y for every major IM choice. Designed for AI agents generating integrations.
Import Method
|
Condition |
Use |
Why |
|---|---|---|
|
CSV import for P, PX, CX, C, LTV, MLTV2 |
|
Default. Streams file to server, much faster for large files |
|
Need Groovy row-level logic per record |
|
IM parses each row in memory, allows custom processing |
|
PA Data Source (DMDS) import |
|
DMDS requires flush after loading; loaddataFile not supported |
|
Server-side import (rare) |
|
File already on Pricefx server |
Batch Size for loaddataFile
|
Fields per row |
Recommended batchSize |
|---|---|
|
< 10 |
|
|
10–20 |
|
|
20+ |
|
Default batchSize for all methods is 5000. Override explicitly in route URI.
CSV Parsing Method
|
Condition |
Use |
Why |
|---|---|---|
|
With |
|
Must be BEFORE split, not inside. Streams without loading full file |
|
With |
|
Parses batch of lines into List of Maps |
|
Need custom delimiter/header |
Add |
Both methods support these |
Mapper Type
|
Condition |
Use |
Why |
|---|---|---|
|
Bulk load (replace all data) |
|
Used with |
|
Upsert (insert or update by key) |
|
Used with |
|
Nested/hierarchical data |
|
Multi-level data structures |
Object Type for Data Sources
|
Operation |
objectType |
Notes |
|---|---|---|
|
Load data into Data Source |
|
With |
|
Fetch from Data Source |
|
With |
|
Server-side import |
|
With |
|
Flush after DS load |
use |
|
|
Calculate/refresh Datamart |
|
With |
PX/CX Table Name
|
Approach |
Correct? |
Why |
|---|---|---|
|
|
YES |
Required. Sets the extension table name |
|
|
NO |
|
|
|
NO |
This parameter does not exist |
File Consumer Locking
|
Condition |
Use |
Why |
|---|---|---|
|
Default (no external signal) |
|
Waits until file size stabilizes |
|
Upstream writes .done marker file |
|
Waits for |
|
Never use both |
— |
Causes deadlock — pick one |
|
Never use |
— |
Files must be archived after processing |
Always include {{archive.file}} to move processed files to .archive/YYYY/MM/.
Export: Batched vs Non-Batched
|
Condition |
Use |
Why |
|---|---|---|
|
Small dataset (< 50k rows) |
|
Simple, one API call |
|
Large dataset (50k+ rows) |
|
Avoids OutOfMemoryError |
|
Need record count only |
|
Returns count, no data |
Delta Export: Timestamp Persistence
|
Step |
Component |
Pattern |
|---|---|---|
|
Read last timestamp |
|
|
|
Fallback for first run |
|
Set |
|
Capture current time |
|
|
|
Filter: both bounds |
|
Prevents missing records during export |
|
Save new timestamp |
|
After successful export only |
Scheduling
|
Condition |
Use |
Why |
|---|---|---|
|
One-time run |
|
Fires once on startup |
|
Periodic run |
|
Every N milliseconds |
|
Cron schedule |
|
Spaces replaced with |
|
Event-triggered |
|
See events.md |
Company Parameter (LTV/MLTV2) Field Names
|
Table Type |
objectType |
Key fields |
Value fields |
|---|---|---|---|
|
SIMPLE |
|
|
|
|
RANGE |
|
|
|
|
MATRIX |
|
|
|
|
MATRIX2 |
|
|
|
|
MATRIX3 |
|
|
|
|
MATRIX4 |
|
|
|
|
MATRIX5 |
|
|
|
Business Key Field per Object Type
|
objectType |
Business key field |
businessKeys parameter |
|---|---|---|
|
P (Product) |
|
|
|
PX (Product Extension) |
|
|
|
C (Customer) |
|
|
|
CX (Customer Extension) |
|
|
|
SL (Seller) |
— |
— |
|
LTV / MLTV2 |
— |
Uses |
|
DM (Data Source) |
— |
No businessKeys for DMDS |
Upsert: businessKeys vs integrateMapper
|
Condition |
Use |
Why |
|---|---|---|
|
Bulk load with upsert by single key |
|
Simplest approach. Server matches by business key and updates or inserts |
|
Upsert with conditional logic per field |
|
Allows field-level conditions (e.g., only update price if new value is higher) |
|
Upsert with composite business key |
|
|
|
Simple bulk replace (no upsert needed) |
|
All existing records are replaced by the new data |
Rule of thumb: Use loaddata + businessKeys for straightforward upserts. Use integrate + integrateMapper only when you need field-level predicates or complex multi-key matching.
Error Handling Decision
|
Scenario |
Retried automatically? |
Action |
|---|---|---|
|
|
Yes (10x, exponential) |
Wait, check network if persistent |
|
HTTP 409, 503, 504 |
Yes |
Wait, usually resolves |
|
HTTP 400, 401, 404 |
No |
Fix request/credentials/target |
|
|
No |
Fix configuration |
|
|
No |
Fix source data or mapper |