integration requirement for record creation, but duplication should be skipped

David Cross
Tera Expert

Hi All,

I have a 3rd party app where they are sending data to SNOW, Now i want the data to be added to the table [ XYZ ].
Now i have a field call [ AlphaNumber ], here the duplicate value should not be inserted but should be skipped.
Can you please help me how to perform this action 

i am using REST Api 

1 ACCEPTED SOLUTION

BillMartin
Mega Sage

Hi @David Cross ,

 

You can achieve your functional objectives by following six steps:

 

1. Build an integration with REST-API using Outbound REST Integration. Learn more about How to Integrate with ServiceNow Using REST-API.

 

Here is How: How to Integrate with ServiceNow Using REST-API

 

2. Create Script Includes to globally invoke the REST-API object. Check out ServiceNow Scripting: When to Use Script Includes.

 

Here is How: ServiceNow Scripting: When to Use Script Includes

 

3. Create a function using Script Includes using the table object (GlideRecord) if a record already exists.

 

4. Develop a function using Script Includes using the table object (GlideRecord) to create a record if it does not exist.

 

5. Ensure Data Policy is in place before implementing steps 1 to 4. Discover more about ServiceNow Best Practices: How to Verify Server Data Using ServiceNow Data Policy.

 

Here is How: ServiceNow Best Practices: How to Verify Server Data Using ServiceNow Data Policy

 

6. Lastly, create a call from a scheduled job depending on the real-time data needs of the business. Learn about ServiceNow Scheduled Jobs.

 

Here is How: ServiceNow Scheduled Jobs

 

These steps serve as a guide to help you achieve your functional objectives. Note that good coding practice, unit testing, and deployment are not covered here. Assuming that these parameters are implemented.

 

Mark this as helpful and accept it as a solution if you find this post beneficial. 😊🙏

View solution in original post

1 REPLY 1

BillMartin
Mega Sage

Hi @David Cross ,

 

You can achieve your functional objectives by following six steps:

 

1. Build an integration with REST-API using Outbound REST Integration. Learn more about How to Integrate with ServiceNow Using REST-API.

 

Here is How: How to Integrate with ServiceNow Using REST-API

 

2. Create Script Includes to globally invoke the REST-API object. Check out ServiceNow Scripting: When to Use Script Includes.

 

Here is How: ServiceNow Scripting: When to Use Script Includes

 

3. Create a function using Script Includes using the table object (GlideRecord) if a record already exists.

 

4. Develop a function using Script Includes using the table object (GlideRecord) to create a record if it does not exist.

 

5. Ensure Data Policy is in place before implementing steps 1 to 4. Discover more about ServiceNow Best Practices: How to Verify Server Data Using ServiceNow Data Policy.

 

Here is How: ServiceNow Best Practices: How to Verify Server Data Using ServiceNow Data Policy

 

6. Lastly, create a call from a scheduled job depending on the real-time data needs of the business. Learn about ServiceNow Scheduled Jobs.

 

Here is How: ServiceNow Scheduled Jobs

 

These steps serve as a guide to help you achieve your functional objectives. Note that good coding practice, unit testing, and deployment are not covered here. Assuming that these parameters are implemented.

 

Mark this as helpful and accept it as a solution if you find this post beneficial. 😊🙏