Need to create a bidirectional integration between two Snow instances by using OOB table API

shashank32
Giga Contributor

Hi 

I need to create a bidirectional integration between two Snow instances by using OOB table APIin 

ex if i create or update a incident in source instance it should create or update incident in target instance and viceversa.

Can anyone help me in doing this.

Thank You

Shashank  K S

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

You can use OOB Table API methods.

Refer below link for step by step instructions

ServiceNow to ServiceNow Integration using REST API and PUSH and PUT methods with Business Rule

You can also explore on Ebonding Spoke with less scripting

ServiceNow eBonding spoke

Refer the below link which has the approach with example shared by me.

Integration hub ebonding spoke

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

12 REPLIES 12

Jagadeesh1
Kilo Guru

Hello Shashank,

        I would suggest you to use Web Services instead of direct Rest API. You can create transform map and associate with the Web Service with a staging table to validate the data before inserting or updating the incident record in either of the instances. You can achieve you requirement in below steps.

1. Create Web Services in both the instances with transform maps. So that if in one instance if an incident is created or updated, you can use Rest API script to call web service in other instance and send the data.

2. Create Web Service users say A and B in respective instances.

3. Create insert or update business rule in incident record in both the instances make sure that the BR should not be triggered if the web service user updates or creates it. For example if from instance A an incident is created or updated, the BR in the instance A will trigger and will call Web Service in instance B and the credentials of instance B should be used. Once incident is created or updated in instance B and the User B has created or updated it, there will be similar Business Rule available on instance B as well. If this is triggered, the data will again go to instance A causing Looping affect. 

To avoid this if BR is present on instance A add a condition in BR that if Web Service User A has created or updated the BR should not trigger and same goes to instance B.

4. The purpose of BR in both the instance is to call the Web Service in another one.

5. Once BR is triggered and other instance's API is called, the incident data will be first stored in staging table in other instance. And the transform map will create or update the data. In the transform map make the incident number or any other unique field between the two incident records coalesce for updating

Thanks,

Jagadeesh

You have already discuss about a problem which I am facing.
your statement was: "To avoid this if BR is present on instance A add a condition in BR that if Web Service User A has created or updated the BR should not trigger and same goes to instance B."(point no. 3)

 

So what is right condition and how we can write??

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

You can use OOB Table API methods.

Refer below link for step by step instructions

ServiceNow to ServiceNow Integration using REST API and PUSH and PUT methods with Business Rule

You can also explore on Ebonding Spoke with less scripting

ServiceNow eBonding spoke

Refer the below link which has the approach with example shared by me.

Integration hub ebonding spoke

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader