Move Incidents from servicenow A to another servicenow B instance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2024 01:40 PM
Hello Team,
We have scenarion, our team creates incidents in daily basis in my instance. When ever incidents creates in my instance, we need to move tjose incidents to another instance. This leads to integrate within the 2 instances.
Could you please provide the steps to impelement this functionality.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2024 02:08 PM
Hi @Kanna12
There are 2 things
Do you want trun time integration or
You want to just move all Incident at end of day to Instance B and then both Instance Incident has separate life cycle.
In both case the steps are different.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2024 03:08 PM
@Kanna12 Please check below and see if helpful.
Please mark my answer correct and helpful if this works for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2024 09:45 AM - edited 12-28-2024 09:48 AM
First point : determine what type of authentication needs to be used
if basic : Create a user with 'itil' role on target instance where your incident should be posted
if Oauth : Create a Oauth profile (system oauth >> application registry) , get client secret, client id etc
Easiest way to get code for integration :
Go to rest api explorer in target instance :
select 'create a record(post)' and table name as incident
in request body use builder and build sample payload
Now go to bottom and client on 'Servicenow script' copy the code and use it in BR of you instance.
condition for BR - after insert on incident table
Sample :
var request = new sn_ws.RESTMessageV2();
request.setEndpoint('https://dev000000.service-now.com/api/now/table/incident');
request.setHttpMethod('POST');
//Eg. UserName="admin", Password="admin" for this code sample.
var user = 'admin';
var password = 'admin';
request.setBasicAuth(user,password);
request.setRequestHeader("Accept","application/json");
request.setRequestHeader('Content-Type','application/json');
request.setRequestBody("{\"short_description\":\"test\",\"description\":\"ok\"}"); // replace test, ok with current.short_Description and current.description
var response = request.execute();
gs.log(response.getBody());
Above is one way of doing it , you can also create a rest message and call it in BR. Please let me know your case in detail
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2024 11:44 AM
Thank you all inputs!
Can we install data replicate Plugin in instance A to replicate data in instance B, by using IDR functionality?
Can any one help me, very much appreciate!