How do I get the Correlation Display and Correlation ID's between 2 instances

Stacy1
Mega Guru

I am sending a request from one ServiceNow instance to another.   I am trying to send my sys_id and number from my 1st instance to the second using the following:

content.correlation_id = current.sys_id.getDisplayValue();
content.correlation_display = current.number.getDisplayValue();

I see the values in my log, however they are not showing up in the 2nd instance.

Also my response is sending me back the request_number and request_id which is great, accept it is the REQ number and I need the RITM number as I want to pass state/status updates from the 2nd instance back to the 1st.   My status in the 2nd is on the RITM not on the REQ.

Does anyone know how I can get the RITM Correlation ID's to pass between the 2 instances?

Thank you in advance for your help.

Stacy

2 REPLIES 2

larstange
Mega Sage

Hi



Could you share some more details of how you pass the information from one instance to the other - are you using direct webservices, rest API..something else.


I suspect that the issue is on the receiving end...


Hi Lars,



I am using Rest.   I am sending content.correlation_id = current.sys_id in my content.



This works fine on the incident table but it was not working on the requested item table.



So it will not post it there.   So what I have done as a work around:   I receive back the REQ correlation display and ID from the instance I am sending the request to.   So I do a get to retrieve their RITM number and sys_id and then update my record with that information and then I turn around and post to their RITM number and sys_id my current number and sys_id.   It works, just seems like I should not have to go so far to get my data over there.



Thanks,


Stacy