Integrations
End to End Process while doing Integration:
1) we need a end point of 3rd party system
2) we need a Authentication : mainly we have to use 2 types of authentication
# Basic Auth : we have to provide User Id and password mainly we used this in
ServiceNow to ServiceNow Integration
# OAuth method : OAuth is an open standard for token based authentication.
It allows user access instance resources by obtaining Token rather than entering
login credentials with each resource request.
3) we have to select Rest Method(like post, put, get, patch, delete)
4) we have select a content body(like required passed data)
5) we have to create Br to Trigger Rest Integration pass the data through
Business Rule by using Sn_RestMessageV2.
syntax used in business rule : var request = new sn_ws.restmessagev2('rest msg
name', 'method name')
OAuth is an open standard for token based authentication.
It allows user access instance resources by obtaining Token rather than entering
login credentials with each resource request.
What is difference between SOAP and REST?
1. SOAP stands for Simple Object Access protocol whereas REST stands for
Representational State Transfer.
2. REST has SSL and HTTPS for security, on the other hand SOAP has SSL and WS
security due to which in the cases like Bank account password,
Card number etc. SOAP is preferred over REST.
SOAP allows only XML format REST allows other format as well e.g. JSON, XML.
4.SOAP requires more bandwidth REST requires less bandwidth.
5. Uses the envelope type of messages where message details are secured, REST
uses kind of postcard where URI exposes the business logic
What is scripted rest API?
The scripted REST API feature allows application developers to build custom web
service APIs.
We can define service endpoints, query parameters, and headers for a scripted
REST API, as well as scripts to manage the request and response.
How to trigger Rest Call?
We can write server side script by using below REST API class.
sn_ws.RESTMessageV2('rest_message_name','method_name');
Later we can use methods provided by above class to perform further operation.
What is ServiceNow Rest API explorer?
ServiceNow's REST API explorer is an application to construct and test API
requests to a ServiceNow instance.
The REST API explorer is available to users with the rest_api_explorer role
or admin role.
What is Table and Import Set API?
Table API allows us to perform create, read, update, and delete (CRUD) operations
on existing tables.
The Import set API allows us to interact with import set table.
What is OAuth method?
OAuth is an open standard for token based authentication.
It allows user access instance resources by obtaining Token rather than entering
login credentials with each resource request.
Types of http methods?
There are 5 basic http methods which are as follows,
GET : Retrieves information.
POST : Creates new records.
PUT : Updates the partial or specific records, it checks if resource exists then it
will update the record or else it creates record.
PATCH - > Updates record.
DELETE : Deletes record.
What is difference between PUT, POST and PATCH method?
POST is used only to create records whereas PATCH is used to only update the record
while
PUT is kind of combination both where if record exist then it will update the
record otherwise it creates new one.
Why we need MID server?
ServiceNow instance is hosted in the cloud. It can connect to other cloud based
systems to share data etc,
however your internal network is likely not wide open to connections from external
systems.
So the MID server acts as connection between your internal network and the
ServiceNow instance.
It can be used to send Discovery data that it collects on your network to the
ServiceNow instance.
It can also allow ServiceNow to connect to data sources that are on your network
(like SQL servers, internal APIs etc)
Mid server in servicenow
MID Servers help you to control and secure how ServiceNow communicates with your
organization’s systems, especially those behind a firewall. This supports four
primary use cases:
Integrations - Supporting LDAP, JDBC, REST, and SOAP based integrations to systems
on your intranet
Orchestration - Enabling orchestration with other systems via either workflow
activities or IntegrationHub spokes.
Discovery - Providing access to systems for traditional CI discovery and/or to
support discovery needed for service mapping
Attach Script File - MID Server Script Files can be used to communicate with
targeted devices (e.g., PowerShell, Javascript, .bat)
What is inbound integration in ServiceNow? Explain one of the inbound integration
that you have implemented?
Inbound integration is making call from third party application to ServiceNow's
REST API to get information from ServiceNow, or create/update records.
Note : If asked, you would need to explain practical inbound integration that you
have implemented
What is outbound integration in ServiceNow?
Outbound integration is making calls from ServiceNow to other applications API to
get information or create/update records.
Note : If asked, you would need to explain practical outbound integration that you
have implemented
Integration requires certain phases to follow in proper way. Example :
Assessment Phase:Understanding Requirements:
Meet with the project stakeholders to gather detailed requirements about the
integration. Understand the specific goals, functionalities, and data flows
required between ServiceNow and the 3rd party product.
Integration Scope:
Determine the scope of the integration: whether it's a one-way or two-way
integration, real-time or batch, and the frequency of data exchange.
Data Mapping:
Identify the data that needs to be exchanged between the systems. Create a data
mapping document that outlines how fields from one system correspond to fields in
the other.
Security and Authentication:
Assess the security requirements for the integration. Determine the authentication
method (e.g., OAuth, API tokens) and any encryption or data protection measures
needed.
Delivery Phase:
Technical Design
Development
Testing
Error Handling and Logging
Performance Optimization
Hypercare Phase :
To provide the support post deployment if everything is working fine as per
configuration or not.
Challenges:
Data Consistency:
Ensuring data consistency between systems can be challenging,
especially when dealing with large volumes of data and complex data models.
Security and Compliance: Integrations may raise security and compliance
concerns,
particularly when sensitive data is involved. Ensuring proper authorization and
encryption mechanisms is crucial.
Scalability:
The integration should be designed to handle increasing volumes of data over
time.
Scalability becomes essential to accommodate business growth.
Monitoring and Maintenance:
Ongoing monitoring is necessary to identify and address any issues that arise
post-deployment.
Vendor Support and Documentation:
Dependence on the availability of APIs and the quality of documentation
provided by the 3rd party product can impact the ease of integration
User Adoption and Training:
If the integrated solution introduces new workflows or processes, training and
change management efforts might be required to ensure user adoption.
Lets try to understand real time scenario, Suppose you have requirement to
integrate slack with ServiceNow So that it automatically creating an incident in
ServiceNow when a customer sends a message on Slack.
Error Handling:
1) So first you need to check Technical Compatibility between those 2 platform,
Like Check whether Slack provides APIs that allow you to monitor messages in a
specific channel and if ServiceNow's APIs allow for incident creation.
2) Verify that both systems can communicate securely over the internet.
3) Then check for Data Mapping Define how information from Slack messages will map
to fields in ServiceNow incidents. This could include mapping the customer's
message to the incident description and extracting relevant details like customer
name, urgency, and contact information.
Integration Strategy:
Opt for real-time API integration. Set up a process that listens for messages in
the designated Slack channel and triggers the creation of incidents in ServiceNow
via API calls.
Development: Develop a REST Message and script or use Integration hub that connects
to Slack's API and subscribes to the desired channel for message events. When a
message event occurs, your script should extract relevant information and use
ServiceNow's API to create a new incident.
Testing: Test the integration extensively. Send test messages in the Slack channel
and ensure that corresponding incidents are created in ServiceNow with accurate
information. Test different message formats and scenarios to account for various
situations.
Error Handling: Implement robust error handling mechanisms. If Slack's API is
unavailable or the ServiceNow incident creation fails, errors should be logged, and
notifications should be sent to administrators.
Documentation: Prepare detailed documentation that explains how the integration
works, including setup instructions, API endpoints, data mapping, and
troubleshooting steps. This documentation will be valuable for maintenance and
future reference. (This is for Best Practice So that others can understand)
LDAP Integrations
In an LDAP integrated ServiceNow environment, When the users try to log in, their
credentials are passed on to all the defined LDAP servers. The LDAP server, after
processing the credentials, sends a response providing the authorization status,
accordingly to which the access to ServiceNow application is granted.