Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

How to configure SuccessResponse/unsuccessResponses REST Connector

mamta_juyal
New Contributor II
New Contributor II

Hi All,

 To create accounts in target system, we have Configured the REST connector. The API response code for both success and failure is 200. How can we configure success and unsuccess responses within CreateAccountJSON? Below is the response body which we are receiving from target:--

 The response body has a "Response_Type" field. How can we map this field in success responses?

 

    "message": {

            "rXML": {

                "Response": {

                    "Response_Details": {

                        "rXML": {

                            "Response": {

                                "Resp_Code": 502,

                                "Persistent_State": 2,

                                "Error_Type": 3,

                                "Response_Details": {

                                    "Application_Advice": {

                                        "Tran_Set_Identifier_Code": "",

                                        "Application_Ackg_Code": "TR",

                                        "Imported_Message_Id": "",

                                        "Transaction_Purpose_Code": 11,

                                        "Imported_Object_Id": null,

                                        "Response_Type": "Error",

                                        "Transaction_Date": "3/17/23 11:00",

                                        "Shipper_ID": "",

                                        "Imported_Object_Type": "User",

                                        "Business_Unit": "",

                                        "App_Advice_Errors": {

                                            "App_Advice_Error": {

                                                "App_Error_Text": "ompany does not exist in the system",

                                                "App_Err_Cond_Code": 75000021,

                                                "Error_Message_Tokens": {

                                                    "Error_Message_Token": "****S*ffer"

                                                }

                                            }

                                        }

                                    }

                                }

                            },

                            "Header": {

                                "Msg_Locale": "",

                                "External_Date_Time_Stamp": "",

                                "Action_Type": "",

                                "Version": "",

                                "Internal_Date_Time_Stamp": "2023-03-17 11:00:57",

                                "External_Reference_ID": "",

                                "Company_ID": ***,

                                "Internal_Reference_ID": 8010,

                                "Message_Type": "RESPONSE",

                                "Sequence_Number": "",

                                "Source": "***"

                            }

                        }

                    }

                },

                "Header": {

                    "Msg_Locale": "",

                    "External_Date_Time_Stamp": "",

                    "Action_Type": "",

                    "Version": "",

                    "Internal_Date_Time_Stamp": "2023-03-17 11:00:57",

                    "External_Reference_ID": "",

                    "Message_Type": "RESPONSE",

                    "Company_ID": ***,

                    "Internal_Reference_ID": ***,

                    "Reference_ID": "",

                    "Source": "***"

                }

            }

        },

        "statusCode": 200,

        "description": null,

        "status": "Success"

    }

}

5 REPLIES 5

sk
All-Star
All-Star

Instead of response code you can differentiate using response details

https://docs.saviyntcloud.com/bundle/REST-v23x/page/Content/Developers-Handbook.htm#top

Above content is the response body? If so try below

"response.message.rXML.Response.Response_Details.rXML.Response.Response_Details.Application_Advice.Response_Type": "Error"


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

mamta_juyal
New Contributor II
New Contributor II

Hi Sathvik,

Thank you for replying.

But it's not working. below is the exact response we are getting :-

mamta_juyal_0-1679245037653.png

I tried with below options, but no luck-

1. response.message.rXML.Response.Response_Details.rXML.Response.Response_Details.Application_Advice.Response_Type": "Confirmation"

2.call1.message.rXML.Response.Response_Details.rXML.Response.Response_Details.Application_Advice.Response_Type": "Confirmation"

3.message.rXML.Response.Response_Details.rXML.Response.Response_Details.Application_Advice.Response_Type": "Confirmation"

Thanks & Regards,

Mamta

 

 

 

 

 

mamta_juyal
New Contributor II
New Contributor II

Hi Experts,

Any updates on this ?

Thanks & Regards,

Mamta

vivek_kotagiri
Saviynt Employee
Saviynt Employee

Hi Mamta,

Try below it should work.

"rXML.Response.Response_Details.rXML.Response.Error_Type":[0]
 
 For the below response:
{
"rXML": {
"Header": {
"Source": "MANH_mda",
"Action_Type": "",
"Reference_ID": "",
"Message_Type": "RESPONSE",
"Company_ID": 1000,
"Msg_Locale": "",
"Version": "",
"Internal_Reference_ID": 8057,
"Internal_Date_Time_Stamp": "2023-03-31 02:45:49",
"External_Reference_ID": "",
"External_Date_Time_Stamp": ""
},
"Response": {
"Response_Details": {
"rXML": {
"Header": {
"Source": "MANH_mda",
"Action_Type": "",
"Sequence_Number": "",
"Company_ID": 1000,
"Msg_Locale": "",
"Version": "",
"Internal_Reference_ID": 8057,
"Internal_Date_Time_Stamp": "2023-03-31 02:45:49",
"External_Reference_ID": "",
"External_Date_Time_Stamp": "",
"Message_Type": "RESPONSE"
},
"Response": {
"Persistent_State": 2,
"Error_Type": 4,
"Resp_Code": 503,
"Response_Details": {
"Exception_Details": "Error on line 1: The entity name must immediately follow the '&' in the entity reference.\nException Occurred - Please check application server logs for more details."
}
}
}
}
}
}
}
​Vivek Kotagiri​
​Technical Lead | ​Professional Services

Hi Vivek,

Its working. Thank you.

Regards,

Mamta