Comment added from the portal is not fetching for integration

Joyal Robert
Tera Contributor

Hi All,

 

We are trying to push the comments to Webex through REST message, what we had observed is that when we add the comments added from portal it is showing in case form but not fetching them to push the comments to Webex space but through form and email it is fetching and showing the message in Webex.

This is the rest message:

var r = new sn_ws.RESTMessageV2('Webex', 'POST to Spark');
        r.setRequestHeader("Content-Type", "application/json");
        r.setStringParameterNoEscape('u_comments', message3);
        r.setStringParameterNoEscape('u_roomID', roomID);
        var response = r.execute();
        var responseBody = response.getBody();
        var httpStatus = response.getStatusCode();
        gs.log("Response:" + casenumber + " :" + httpStatus + responseBody);
 
JoyalRobert_0-1719480550388.png

 

Is there any way that we can fetch the comments from portal as well?

 

Please help on this on priority

 

Regards,

Joyal Robert

 

 

2 REPLIES 2

vishakhayadav24
Tera Guru

Hi @Joyal Robert  ,

when you are getting the data via email on your record then you are making the comments field updated right??

and the code which you have written have your tried to print the comments  because comments fields is journal entry .

and also try to post the data via postman just a manual check because i believe if you are passing the data via parameters everything is fine then it should work or processed to the target system if you are still getting the  error response from postman then you have to check the same with the target system what is  missing in the data  you are sending.

 

Thank you!!

Vishakha y

vishakhayadav24
Tera Guru

@Joyal Robert 

and you can simply try to send in application/json content type

var payload={};

payload.u_roomID="123";// pass a rommid whcih is available

payload.u_comments =current.comments.getJournalEntry(-1);

var inp = JSON.stringify(payload);

r.setRequestbody(inp);

add the above and try