Mapping - Overview (TO DO)
🔄 What is Mapping?
Mapping is a core step in ensuring that external data can be correctly interpreted and processed by DJUST. It defines how external fields (from a CSV file or REST API response) are linked to DJUST’s internal data model. Without mapping, DJUST cannot understand where to place imported data or how to structure exported data.
This configuration is required for every import and export job to function properly.
- Import jobs: map source fields to DJUST’s fields.
- Export jobs: map DJUST’s internal fields to the expected output for external systems (eg. the API field of a payload)
🔧 Mapping Configuration in Data Hub
You can manage mapping settings directly from DJUST Back Office in the Data Hub for each Job Configuration
When configuring a job, you must provide the name of each input field (API field or CSV column header) and link it to the corresponding DJUST column name in the target entity model.
Example: If your system has a field called "Supplier Reviews", and DJUST expects supplierRating, enter Supplier Reviews next to supplierRating.
Mapping and Job ConfigurationMappings are entity-specific and must be aligned with the data required by each DJUST object (e.g., Product, Offer, Order).
For detailed information on the required fields for each data type, refer to the dedicated documentations for each entity in this section.
API Connector Mapping
When mapping data fetched via the API Connector from a JSON payload, additional syntax and parameters can be used to accurately extract and align nested or structured fields.
Access Nested Values
Syntax | Description | Example usage |
---|---|---|
$. | Access a sub-object | $.addresses retrieves the addresses object |
[0]. | Access the first element in an array | $.addresses[0].type |
. | Access a direct child field in a nested object (non-array) | $.deliveryInfo.trackingNumber |
[n]. | Access the nth element in an array | $.products[2].sku |
[*]. | Concatenate all values from an array of objects into a single string | $.tags[*].name results in tag1, tag2, tag3 |
Define Data Type Behavior
For each mapped field, you must specify:
- JSON VALUE: if the field is a string, boolean, number, etc.
- JSON VALUE ARRAY: if the field is a list of values. Two options:
- FIRST: keep only the first value
- CONCATENATE TO STRING: merge array values into one string
Payload Structure
The JSON payload must follow a specific structure expected by DJUST. This structure ensures that data is correctly interpreted and mapped to DJUST’s internal model/
For example, when importing order data, the root object should represent the Order Logistic, and it should contain a nested array of Order Lines.
{ "elements":[ { "orderLogisticId":"12345", "status":"CREATED", "orderLines":[ { "productId":"ABC123", "quantity":2, "unitPrice":19.99 } ] }, { "orderLogisticId":"67890", "status":"SHIPPED", "orderLines":[ { "productId":"XYZ789", "quantity":1, "unitPrice":49.90 } ] } ], "paging":{ "pageNumber":1, "pageSize":50, "totalPages":2, "totalRecords":100 } }
Payload Structure per EntityFor detailed information on the required payload structure for each data type, refer to the dedicated documentations for each entity in this section.
Mapping & Custom Fields
Transoding
Updated 18 days ago