The CreatorCon Call for Content is officially open! Get started here.

Steps to Integrate two ServiceNow instances using REST?

Rahul J
Mega Expert

G'day all,

I'm trying to integrate two SN instances such that as soon as an Incident record is created in instance 1 it should also replicate in instance 2. For instance, if  I've created an Incident INC0001 in instance 1 then it should also be visible in instance 2. dynamically using REST.

Can someone please provide me the steps to achieve this requirements.

Cheers,

Rahul J

1 ACCEPTED SOLUTION

Business rules get triggered after an action on the server, such as on Insert of the record...so as mentioned, you'd want to create a Insert BR for Incident table and then trigger your outbound REST with all the details. Then pick that up in your other instance, parse through it and then insert new record there.

Is there a reason why they need to be replicated in both instances, basically live like that? Are you all merging over to another instance or something? Do you have experience with web services/REST?

Regardless of my curiosity though, the basic gist of everything is above.

Please mark reply as Helpful/Correct, if applicable.


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

10 REPLIES 10

DScroggins
Kilo Sage
Hi, If you have IntegrationHub activated on your instance then you can use the ebonding spoke with Flow designer to create the duplicate incident in second instance. Otherwise you can use an after business rule to fire an outbound rest message to communicate with the incident table API in the second instance. Hope this helps. --David

Hi David, 

I reckon I'll proceed with the REST message technique to achieve my req. For this purpose as of now I've created a Business Rule on Incident table of Instance 1 but just wondering how this can be achieved by Script Include rather than BR.

Thanks in advance.

Cheers-

Rahul J

You can use a script include but you will still need to "trigger" the code to execute once the incident is created. If it needs to be dynamic then you will need the BR to call the script include method. Using the script include though you can make it more reusuable therefore allowing you to "sync" other table records to another instance should the need arise.

Would you mind helping me with Script Include script please. Cause I'm fairly new to SN and been working on it since last one month. Though I've got idea about BR and Client Script but I'm finding Script Include bit daunting.

 

Business rules get triggered after an action on the server, such as on Insert of the record...so as mentioned, you'd want to create a Insert BR for Incident table and then trigger your outbound REST with all the details. Then pick that up in your other instance, parse through it and then insert new record there.

Is there a reason why they need to be replicated in both instances, basically live like that? Are you all merging over to another instance or something? Do you have experience with web services/REST?

Regardless of my curiosity though, the basic gist of everything is above.

Please mark reply as Helpful/Correct, if applicable.


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!