Question

2
Replies
627
Views
SIMMR-1 Member since 2013 14 posts
PEGA
Posted: February 1, 2017
Last activity: February 2, 2017
Closed

REST JSON - Does Pega support complex request and response?

Below are sample JSON request/response that the client is being given for a new integration service call. The issue that we are running into is the complexity of the JSON structure. We have tried to create REST connectors using the JSON samples below without much success.

From what I can tell Pega has some issue with nested complex structures and being able to use that type of sample response to generate the data model through the wizard. In addition you cannot use a sample JSON request to define the request you must do that manually. For the samples outlined you will see that both the request and response are complex structures. Can anyone provide some insight/assistance in understanding how to handle this in Pega?

How can you craft a nested complex structure for the request? Attempting to use the response in the configuration of the connector always returns the message that it is not valid JSON. I have been able to use some online tools to convert it from JSON - XML - XSD, so it would appear that it is valid.

1.1 ADHOC CRR REQUEST SAMPLE

{

"header" : {

"callerSystem" : "dbCAR",

"requestID" : "21001224",

"requestTimeStamp" : "19/01/2017 14:20:01:0012"

},

"clientRiskRatingRequest" : [

{

"clientDetails" : {

"recordID" : "21001224-1"

"clientAdoptionCountry" : ["US-1"],

"riskRatingType" : "GLOBAL",

"dbBusinessline" : "GM"

},

"entityRiskType" : {

"typeKYCLegalEntity" : "Parent Exchange"

},

"industryRiskType" : {

"industryCode" : 3002001

},

"geoRiskType" : {

"countryOfOp": ["DE"],

"clientCountryReg" : "US-1",

"ultimateParentLocation" : "DE",

"ultimateParentRiskRating" : "LOW" ,

"ultimateBusinessOwner": [

{

"ownerType" : "UBO",

"countryOfDomicile" : "US-1"

},

{

"ownerType" : "LR",

"countryOfDomicile" : "DE"

}

]

},

"productRiskType" : [

{

"productName" : "TFCMC",

"subProductName" : "TF"

},

{

"productName" : "TAS",

"subProductName" : "SR"

},

{

"productName" : "TAS",

"subProductName" : "TF"

}

]

}

]

}

1.2 ADHOC CRR RESPONSE SAMPLE

{

"header": {

"responseId":"Response-21001224",

"requestId":"21001224",

"eventModelRunInstance":"I-AA",

"eventModelVersion":"IV-001.001",

"eventModelTimeStamp":"18/01/2017 15:46:57.6330"

},

"processStatus":{

"crreStatus":"Success",

"successfulRecords":1,

"errorRecords":0,

"warningRecords":0

},

"clientRiskRatingResponse":[

{

"recordID" : "21001224-1",

"riskRatingType" : "GLOBAL",

"overallRiskAssessment":{

"overallRiskScore":13,

"overallRiskAssessment": "Summary: Product Summary - Prod Name : 'TAS' Sub Product Name : 'TF' Adopted Location : 'US-1' Industry Summary - Industry Code : '3002001' Industry Name : 'Manufacture of Computers' Geography Summary - Country Code : 'US-1' Country Name : 'UNITED STATES OF AMERICA' Entity Type Summary - Legal Entity Type : 'E10' Legal Entity Name : 'Parent Exchange'.",

"overallRiskLevel":"HIGH"

},

"entityRiskType":{

"overallClusterScore":4,

"overallClusterRiskCategory":"MEDIUM",

"overallCauseForAllocation":"Legal Entity Type : 'E10' Legal Entity Name : 'Parent Exchange'"

},

"industryRiskType":{

"overallClusterScore":2,

"overallClusterRiskCategory":"MEDIUM",

"overallCauseForAllocation":"Industry Code : '3002001' Industry Name : 'Manufacture of Computers'"

},

"geoRiskType":{

"overallClusterScore":2,

"overallClusterRiskCategory":"LOW",

"overallCauseForAllocation":"Country Code : 'US-1' Country Name : 'UNITED STATES OF AMERICA'",

},

"productRiskType":{

"overallClusterScore":5,

"overallClusterRiskCategory":"MEDIUM",

"overallCauseForAllocation":"Prod Name : 'TAS' Sub Product Name : 'TF' Adopted Location : 'US-1'",

"riskClassification": [{

"clusterWeightedScore":5,

"allocatedRiskCategory":"MEDIUM",

"causeForAllocation":"Prod Name : 'TAS' Sub Product Name : 'TF' Adopted Location : 'US-1'"

}]

}

} ]

}

Data Integration
Moderation Team has archived post
Share this page LinkedIn