Hi,
I am having trouble with a certain Web-API response not being what I expected.
For example : Pass the following response to Genesys Cloud
{
"returnCode": "00",
"returnProgramID": "99999999",
"dataNumber": "002",
"target": [
{
"clientNo": "12345678901",
"contractNo": "1234567890123456"
},
{
"clientNo": "92345678901",
"contractNo": "9234567890123456"
}
]
};
When this is received in a Genesys Data Action, it would be expressed as follows.
{
"contractNo": [
"1234567890123456",
"9234567890123456"
],
"clientNo": [
"12345678901",
"92345678901"
],
"returnProgramID": "99999999",
"returnCode": "00",
"dataNumber": "002",
}
Can you please advise why this is happening?
The settings for this Data Action are as follows -
Input Contract >
{
"title": "PaymentAcceptanceInformationAPI",
"type": "object",
"properties": {
"copeCode": {
"type": "string"
},
"transactionId": {
"type": "string"
},
"contractNo": {
"type": "string"
},
"clientNo": {
"type": "string"
}
},
"additionalProperties": true
}
Output Contract >
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"returnCode": {
"description": "returnCode",
"type": "string"
},
"returnProgramID": {
"description": "returnProgramID",
"type": "string"
},
"dataNumber": {
"description": "dataNumber",
"type": "string"
},
"target": {
"description": "target",
"type": "array",
"items": [
{
"title": "clientNo",
"description": "clientNo",
"type": "string"
},
{
"title": "contractNo",
"description": "contractNo",
"type": "string"
}
]
}
},
"additionalProperties": true
}
Configuration(Responsee) >
{
"translationMap": {
"contractNo": "$.paymentAcceptanceInformation[*].contractNo",
"clientNo": "$.paymentAcceptanceInformation[*].clientNo",
"returnProgramID": "$.returnProgramID",
"returnCode": "$.returnCode",
"dataNumber": "$.dataNumber"
},
"translationMapDefaults": {},
"successTemplate": "{\"returnCode\": ${returnCode},\"returnProgramID\": ${returnProgramID},\"dataNumber\": ${dataNumber},\"clientNo\": ${clientNo},\"contractNo\": ${contractNo}}"
}
Kind Regards,