Extension Field Mapping
This section provides a sample extension data mapping, where you can map their extension data to the product fields.
The format of extension specification is schemaname_EntityNameExtn.json (For example, PAYMENT_ORDEREvent_PaymentOrderExtn.json). This file exists in the folder pointed in the environment variable.
|
Column name |
Data type |
|---|---|
|
paymentOrderId |
String |
|
debitAccount |
String |
|
creditAccount |
String |
|
payeeDetails |
PayeeDetails(User defined Type) |
|
extensionData |
Map<String,String> |
|
exchangeRates |
List<ExchangeRate>(MultiRec field) |
|
PayeeDetails User Type |
|
|
id |
string |
|
extensionData |
Map<String,String> |
|
ExchangeRate User Type |
|
|
id |
string |
|
extensionData |
Map<String, String> |
The sample output of Input Payload is given below.
{
"application": "PAYMENT.ORDER",
"dataEventSize": 1,
"amount": 100,
"dataEventIndex": 0,
"entityName": "USD",
"ARRAY_Receipt": [
{
"recieptId": "4160",
"Receipt_data": {
"id": "25",
"name": "temenos"
}
},
{
"recieptId": "4260",
"Receipt_data": {
"id": "26",
"name": "t24"
}
}
]
}
[
{
"operation": "shift",
"spec": {
"application": "extensionDataa.application",
"dataEventSize": "extensionData.debitAccount",
"dataEventIndex": "payeeDetails.extensionData.creditAccount",
"ARRAY_Receipt": {
"*": {
"#id": "exchangeRate.[&1].arrayKey",
"recieptId": "exchangeRate.[&1].id",
"Receipt_data": {
"id": "exchangeRate.[&2].extensionData.id"
}
}
}
}
}
]
{
"extensionData" : {
"application" : "PAYMENT.ORDER",
"debitAccount" : 1
},
"payeeDetails" : {
"extensionData" : {
"creditAccount" : 0
}
},
"exchangeRate" : [ {
"arrayKey" : "id",
"id" : "4160",
"extensionData" : {
"id" : "25"
}
}, {
"arrayKey" : "id",
"id" : "4260",
"extensionData" : {
"id" : "26"
}
} ]
}
In correspondence with extension data fields, the extension data can have any fields and values, so you can map as shown in above sample transformation.
You can use arrayKey in extensionData while it is being used inside an MultiRec field. The arrayKey field is used to identity to which product ID the extension data should be mapped to. Multirec is list of data and the arrayKey should be used to differentiate between the data .
In this topic