Hello, I am attempting to convert this into Appian values, but I am having trouble.
What would be the best way to convert this?
Here is the raw response from an API:
{"response":"{\"requestId\":\"123456\",\"status\":0,\"description\":\"Success.\",\"response\":{\"transactionId\":\"12241094986\",\"payfoneAlias\":\"432432424\",\"phoneNumber\":\"324324324234\",\"lineType\":\"Mobile\",\"carrier\":\"T-Mobile USA\",\"countryCode\":\"US\",\"statusIndex\":\"51\",\"isBaselined\":true,\"score\":1000,\"phoneNumberVelocity\":0,\"portVelocity\":0,\"payfoneTenure\":{\"minimumDate\":\"2024-08-05T23:59:59.000Z\"},\"phoneNumberTenure\":{\"minimumDate\":\"2024-08-05T23:59:59.000Z\"}}}"}
a!localVariables( local!callService: rule!score( customerPhoneNumber: ri!phoneNumber, consentStatus: ri!consentStatus ).result.body, local!jsonArray: a!toJson( value: local!callService, removeNullOrEmptyFields: true ), local!jsonArrays: a!fromJson(local!jsonArray), local!jsonArrays )
Here is the result after testing above code:
[response:{"requestId":"123456","status":0,"description":"Success.","response":{"transactionId":"12241091363","payfoneAlias":"432432424","phoneNumber":"324324324234","lineType":"Mobile","carrier":"T-Mobile USA","countryCode":"US","statusIndex":"51","isBaselined":true,"score":1000,"phoneNumberVelocity":0,"portVelocity":0,"payfoneTenure":{"minimumDate":"2024-08-05T23:59:59.000Z"},"phoneNumberTenure":{"minimumDate":"2024-08-05T23:59:59.000Z"}}}]
Discussion posts and replies are publicly visible