- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2023 10:25 PM - edited 05-18-2023 10:29 PM
Hi All,
There is a requirement where we need to integrate with a 3rd party application where we need to send them a specific custom table's data, the current number of records in it is about 50k.
I'm a beginner when it comes to OOB integration implementations.
Please suggest a way forward to implement this functionality.
Looking forward to your expert advice! 🙂
Best Regards,
Pratyusha
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2023 11:19 PM
Hi @PratyushaBodepu ,
You can follow these steps:
Identify the custom table in ServiceNow that contains the data you want to send to the 3rd party application. Make sure the table has the necessary fields and data that need to be included in the integration.
Determine the endpoint or URL provided by the 3rd party application where you will be sending the data. Understand the expected data format or any authentication requirements specified by the 3rd party application.
Create a scripted REST API in ServiceNow to fetch the data from the custom table and format it according to the requirements of the 3rd party application.
If you prefer to use a scripted REST API, you can define the endpoint, HTTP methods, and authentication requirements directly in the ServiceNow platform. You can write JavaScript code in the scripted REST API to query the custom table and format the data accordingly.
Write the necessary logic in the REST API script or scripted REST API to query the custom table using a GlideRecord. Apply any filters or conditions if required to fetch the specific data you need. Iterate through the records and extract the necessary fields.
Format the data retrieved from the custom table into the desired format required by the 3rd party application. This could be JSON, XML, or any other format specified by the 3rd party application.
Send the formatted data to the endpoint provided by the 3rd party application using an HTTP request. You can use the sn_ws.RESTMessageV2 API in ServiceNow to send the request. Set the appropriate headers, payload, and authentication details as required by the 3rd party application.
Handle the response from the 3rd party application if necessary. You may need to parse the response and take appropriate actions based on the integration requirements.
Test the integration thoroughly to ensure that the data is being fetched from the custom table correctly, formatted properly, and sent to the 3rd party application without any issues. Monitor the integration for any errors or exceptions and handle them appropriately.
It's important to consider factors like data volume (50k records in your case) and potential performance implications. You may need to implement pagination or consider batch processing if the data size is large.
If you're new to integration development in ServiceNow, it can be helpful to refer to the below ServiceNow documentation:
Scripted REST API examples
If my response was helpful in resolving the issue, please consider accepting it as a solution by clicking on the ✅Accept solution button and giving it a thumbs up 👍. This will benefit others who may have a similar question in the future.
Thank you!
Ratnakar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2023 11:19 PM
Hi @PratyushaBodepu ,
You can follow these steps:
Identify the custom table in ServiceNow that contains the data you want to send to the 3rd party application. Make sure the table has the necessary fields and data that need to be included in the integration.
Determine the endpoint or URL provided by the 3rd party application where you will be sending the data. Understand the expected data format or any authentication requirements specified by the 3rd party application.
Create a scripted REST API in ServiceNow to fetch the data from the custom table and format it according to the requirements of the 3rd party application.
If you prefer to use a scripted REST API, you can define the endpoint, HTTP methods, and authentication requirements directly in the ServiceNow platform. You can write JavaScript code in the scripted REST API to query the custom table and format the data accordingly.
Write the necessary logic in the REST API script or scripted REST API to query the custom table using a GlideRecord. Apply any filters or conditions if required to fetch the specific data you need. Iterate through the records and extract the necessary fields.
Format the data retrieved from the custom table into the desired format required by the 3rd party application. This could be JSON, XML, or any other format specified by the 3rd party application.
Send the formatted data to the endpoint provided by the 3rd party application using an HTTP request. You can use the sn_ws.RESTMessageV2 API in ServiceNow to send the request. Set the appropriate headers, payload, and authentication details as required by the 3rd party application.
Handle the response from the 3rd party application if necessary. You may need to parse the response and take appropriate actions based on the integration requirements.
Test the integration thoroughly to ensure that the data is being fetched from the custom table correctly, formatted properly, and sent to the 3rd party application without any issues. Monitor the integration for any errors or exceptions and handle them appropriately.
It's important to consider factors like data volume (50k records in your case) and potential performance implications. You may need to implement pagination or consider batch processing if the data size is large.
If you're new to integration development in ServiceNow, it can be helpful to refer to the below ServiceNow documentation:
Scripted REST API examples
If my response was helpful in resolving the issue, please consider accepting it as a solution by clicking on the ✅Accept solution button and giving it a thumbs up 👍. This will benefit others who may have a similar question in the future.
Thank you!
Ratnakar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2023 09:04 AM - edited 05-19-2023 09:06 AM
Thank you @Ratnakar7 for such a detailed response! 😀
We haven't decided on how we'll proceed, to push the data or let them pick the data if we give them an endpoint. I initially created a Scripted REST API that will give the formatted data required that can be picked up by a GET request.
I'll have to explore more into how the data in turn can be sent from ServiceNow using Scripted REST API.