Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Saviynt integration is not working

chandan2212
Tera Contributor

Hi all , 

 

This script is not working fine and the output response  response and status is not showing :

 

gs.info('test_1234'+httpStatus in the logs is not coming anything

 

(function execute(inputs, outputs) {
    var phonenumber = inputs.phonenumber;
    var workphone = inputs.workphone;
    var accountname = inputs.accountname;

    try {
        var r = new sn_ws.RESTMessageV2('Saviynt rest message', 'post message');

        // If you're using parameters in the REST message body template
        r.setStringParameterNoEscape('phonenumber', phonenumber);
        r.setStringParameterNoEscape('workphone', workphone);
        r.setStringParameterNoEscape('username', accountname);

        // Alternatively, if you're building the body manually:
        // var requestBody = JSON.stringify({
        //     "phonenumber": phonenumber,
        //     "workphone": workphone
        // });
        // r.setRequestBody(requestBody);

        var response = r.execute();
        var responseBody = response.getBody();
        var httpStatus = response.getStatusCode();

        // Optionally log or output the response
        outputs.responseBody = responseBody;
        outputs.httpStatus = httpStatus;
        outputs.responseBody=responseBody;
        gs.info('test_1234'+httpStatus);
    } catch (ex) {
        var message = ex.message;
        outputs.error = message;
    }
})(inputs, outputs);
 
chandan2212_0-1760425039282.png

 

 

Response body and error showing nill , Can you advise me how to solve the problem.

 

Thanks and Regards,

Chandan Patra 

0 REPLIES 0