E bonding
Create credentials basic/ oauth
Connections HTTP / JDBC

Roles itil, rest_service
In credentials give our creditials name just now
created
Connection Alias --- ServiceNow provided this
spoke—e bonding
Url of instance 2
Save
Click on Action Designer for flow \ integration hub
application
Selected trigger is Created
Table is Incident
Condition :
assignment group is xyz

Done
Go to Action
Select e bonding servicenow example

Save and activated
When you Created incident in instance 1 , created
incident in instance 2 also
Ebonding integration between two
ServiceNow instances involves several technical steps. Here's a summary:
1. **Identify the
Requirements**: Understand the data that needs to be shared between the two
instances. This could include incidents, change requests, users, etc.
2. **Design the
Integration**: Decide on the integration method. ServiceNow supports several
methods including REST, SOAP, and JDBC.
3. **Configure the
Outbound Integration**: On the source instance, configure the outbound
integration. This could involve creating a REST message, SOAP message, or JDBC
data source. - For REST/SOAP: Create an Outbound REST/SOAP Message, define the
endpoint URL, HTTP method, and headers. - For JDBC: Create a JDBC Data Source,
define the connection URL, username, and password.
4. **Configure the Inbound
Integration**: On the target instance, configure the inbound integration. This
could involve creating a REST/SOAP API or a JDBC table. - For REST/SOAP: Create
an Inbound REST/SOAP API, define the API path, HTTP method, and parameters. -
For JDBC: Create a JDBC Table, define the table schema.
5. **Map the Data**: Map
the data fields between the source and target instances. This could involve
creating a transform map or a script include.
6. **Test the
Integration**: Test the integration by sending data from the source instance to
the target instance. Verify that the data is correctly received and processed
on the target instance.
7. **Monitor and
Troubleshoot**: Monitor the integration for any errors or issues. Use the
system logs and error messages to troubleshoot any problems.
8. **Implement Security
Measures**: Implement necessary security measures such as mutual
authentication, encryption, and access control.
9. **Document the
Integration**: Document the integration process, configuration, and
troubleshooting steps for future reference.
10. **Maintain the
Integration**: Regularly maintain the integration by checking for any changes
in the source or target instances that could affect the integration.
Snow
to Snow Bidirectional Integration | DxSherpa
ServiceNow
to ServiceNow Integration - Step by Ste... - ServiceNow Community

LDAP INTEGRATION
STEP
1: DEFINE LDAP SERVER
You’ll need to
expose the LDAP Server to ServiceNow. Here are few different ways to do this:
OPTION
1 - LDAP SERVER WITH MID SERVER
This is the
most common method as it is the easiest to configure and doesn’t require much
effort from a company AD admin.
You’ll need to
setup a midserver to use this method. Please note
that you can’t authenticate (login) using this method and you can’t use a SSL
connection.
For
authentication, an SSO connection is
often configured. So you use the LDAP Integration to pull in users/groups and
SSO to authenticate (login).
OPTION
2 - LDAP SERVER WITH VPN
For this
method, you need to ask ServiceNow for a VPN Request though HI Support. This
method isn’t that preferred is that you are relying on the ServiceNow VPN to
work and other maintenance concerns.
Details from
HI Support:
ServiceNow
provides secure communications with customer networks over the public Internet
using IPSEC VPN technology. A clustered pair of Cisco ASA devices are used as
the termination point for encrypted IPSec tunnels. Please note, a site-to-site
VPN connection between ServiceNow and your network is only used for traffic
that is initiated by ServiceNow. Traffic destined for ServiceNow will always be
HTTPS, and will always use the internet as a transport. As your ServiceNow
instance is deployed into two ServiceNow datacenters for our Advanced High
Availability, we will be building two VPN tunnels to your network.
OPTION
3 - EXTERNAL IP ADDRESS
For this
method, you expose an external IP Address to ServiceNow.
Be sure a
network administrator configures the local firewall to allow the application
server to access the LDAP server. If the LDAP server is located within an
internal network, the firewall forwards (or NATs) the application server's IP
address through the firewall on the correct port.
OPTION
4 - LDAPS WITH PKI CERTIFICATE
Most companies
don’t have LDAPS (note the “S”). However for the companies that do, this is the
superior method to connect in my opinion.
STEP
2: CREATE LDAP SERVER
CREATE
LDAP SERVER RECORD
1.
Left
Navigator Bar > Create New Server
1.
Fill
in form fields. Field descriptions from the ServiceNow Documentation
2.

3.
Example
LDAP Server
Make
sure to specify which LDAP Attributes to import. Without specifying the LDAP
attributes, the import set creates many fields, which can exceed the row size
limit during the import process.
Common Attributes
description,employeeNumber,managedby,department,division,description,dn,employeeID,givenname,mail,manager,member,memberof,mobile,objectguid,physicaldeliveryofficename,samaccountname,sn,source,telephonenumber,thumbnailPhoto,title,useraccountcontrol,userPrincipalName
3.
Click Submit
4. When set to Active, the connection is tested. Red is bad. Green is good!
ADDITIONAL NOTES
o
Configure Microsoft Active
Directory for secure LDAPS communication
STEP
3: LDAP BROWSE

In the
following step, you need to specify the RDN and Filters for the User and Group
accounts. The RDN and Filters, tell ServiceNow where to look for the data.
How do you
know where the data is stored in LDAP? Every LDAP directory structure is
different, so you need to Browse.
In the LDAP
Server you setup in the last step, use the Related link Browse to browse
the LDAP Server and find the data you want to pull.
STEP
4: LDAP OU DEFINITIONS
After you
determine the data you want to pull you update the LDAP OU Definitions (Located
in the LDAP Server record at the bottom of the form).
Click the
Browse button on the LDAP OU Definition after you set it up to verify it is
going to the right location.
Sometimes you
need to setup new extra LDAP OU Definitions if the data is in different
directories and not just parent/child directories.

LDAP OU
Definition (User)

LDAP OU
Definition (Groups)
STEP
4: DATA SOURCE
Under each
LDAP OU Definition, there is a data source. In the data source you can run the
import and see where what import set the data is being loaded into.
Click “Load
All Records” to load the data into import sets.
STEP
5: IMPORT SETS
Import sets are
temporary “staging tables” in ServiceNow that data sits before it is
“transformed” into actual ServiceNow data.
Out-of-the-box,
the user import set is ldap_import, and the group import is ldap_group_import.
LOOK
FOR TRUNCATED IMPORT SET DATA
Go review the
import set data and make sure the columns created for the data are big enough.
You may need to increase the size of a column in the import set if the data is
being truncated.
STEP
6: TRANSFORM MAPS
CONFIGURE
TRANSFORM MAP

When you get
to the Transform Maps, make
sure you are testing this work in development first!
The transform
maps convert the data from the import set into actual user an group records.
The LDAP User
Import transform map is the one you typically modify. Some common
configurations of the user transform map.
·
Coalesce Match. Important to choose a
coalesce in the field map so that you don’t get duplicate user records.
Companies often use samaccountname or objectguid for the coalesce field.
·
Additional fields. If you have
additional fields to map, here’s the place.
·
Import User Photo from LDAP. Here is an
article on how to Import User Photo from LDAP.
RUN
TRANSFORM
When you are
ready to transform, click the Transform Related Link in the Transform Map.
View the Log
after data load to see if any errors occur.
STEP
6: SCHEDULED LOADS
After your
data is imported correctly. Schedule that data loads. This is done under System
LDAP > Scheduled Loads. You activate the data import and set a run schedule.
Most companies run it daily in the evening.

Scheduled Data
Import
Additional
Domin components
OU – organization
Unit {users / Groups)
ON – Organizational
Name (venk..etc)
LDN – login distinguish
name
Forumsys.com

Enter server details
save

Enter LDN , PSWD and save
Attribute --- enter
fields
Come down LDAP OU
definition \ click on user \ filter option
RDN/ filter (uid=e*) save
Click on data source \
load all record
Create transform map \
map the fields
Browse – select
imported file, map the fileds
Transform

Ssl – port 636
In data source select
filename \ load all record

Create transform \
enter name \ select target file name \ map the fields
Save
Colesec
Click on transform
Check transform history
https://www.servicenow.com/community/developer-forum/ad-attributes-import-issue/m-p/1394559
Scripted REST API in ServiceNow Inbound
Integration solution with Custom Responses.
May this article will helps you to gain knowledge
on the scripted REST API and you can build some custom APIs on
your own.
Using the scripted REST API feature
you can build custom web service APIs.
Using this define service endpoints, query
parameters, and headers for a scripted REST API, as well as
scripts to manage the request and response.
Using this scripted REST API you
can have full control over the data. You can add custom response messages as
per business need.
Use case:
1.
In this article you will see the
integration with the incident table take this as reference and
implement with the required tables in ServiceNow.
2.
Here in the Script section
checking the 3 scenarios.
- If it is a new request from the Source
system(SAP, ServiceMax, AX, Sales force, D365 or other) then in Target
system(ServiceNow) will create a new incident with the
received data.
- If the incident already created then
will update the data for existing incident in the ServiceNow.
- Last one if Source system sending invalid
data then ignore and will not create in ServiceNow.
Steps:
1. Create
the new scripted REST API using the new button as shown below.

2. Complete the form and provide the Name and
API ID will populate accordingly. Save the form.
End Point or URL will extend the
https://instancename.service-now.com + Base API path +Relative path
Base API path you can see below but Relative path will be
available on Resource
Refer below one to create scripted API.

3. On related list on Resources create new
Resource. Give name and select HTTP method as POST and save
the form.

4. Once you save form will look like below and
Relative Path is empty and you can see the Resource Path
Imp Note: Resource path = Base API path + Relative path

5. In below you can compare the Resource path after
providing the Relative path.
Relative path will append to the Resource path.

6. In the script section we can push the request
and response objects to the script include and we can implement the integration
logic there but I am implementing it on script section itself to understand it
easily.
7. Script: You can add fields as per your business requirement but here I am
integrating few fields of incident table.
(function process( /*RESTAPIRequest*/ request,
/*RESTAPIResponse*/ response) {
this.status =
'200';
var respObj = {};
//declare the response object
var payload =
request.body.data; //retrieving the JSON body
var number =
payload.number; //getting the number from JSON
var callerid =
payload.callerid;
var state =
payload.state;
var category =
payload.category;
var impact =
payload.impact;
var urgency =
payload.urgency;
var
short_description = payload.short_description;
var description = payload.description;
var grinc = new
GlideRecord("incident");
grinc.addQuery("number", number);
grinc.query();
if (grinc.next())
{ // To update data on the existing incidents
grinc.caller_id =
callerid;
grinc.state = state;
grinc.category = category;
grinc.impact = impact;
grinc.urgency = urgency;
grinc.short_description = short_description;
grinc.description = description;
grinc.update();
this.status = '200';
respObj.body = {
"message": "Updation Success!",
"detail": "Incident " + grinc.number + "
updated successfully"
};
} else if
(callerid) { //create incident if when callerid is not empty
grinc.initialize();
grinc.caller_id = callerid;
grinc.state = state;
grinc.category = category;
grinc.impact = impact;
grinc.urgency = urgency;
grinc.short_description = short_description;
grinc.description = description;
grinc.insert();
this.status = '200';
respObj.body = {
"message": "Creation Success!",
"detail": "Incident " + grinc.number + "
created successfully"
};
} else { //ignore the creation if
there is no caller info
this.status = '400';
respObj.body = {
"message": "Incident Ignored",
"detail": "Caller email is not received from
Request"
};
}
if (this.status == '200') {
response.setBody(respObj);
response.setStatus(this.status);
return response;
} else {
var
setError= new sn_ws_err.ServiceError(); //this API used to set the custom
error messages
setError.setStatus(this.status);
setError.setMessage(respObj.body.message);
setError.setDetail(respObj.body.detail);
return setError;
}
})(request, response);
8. JSON Format: Below is the JSON format which will test using the
postman.
{
"number": "",
"callerid": "",
"state": "1",
"impact": "2",
"urgency": "2",
"category": "database",
"short_description": "Test short description",
"description": "Test description "
}
9. Once API creation is completed on Related List
of Resource we have Explore
REST API link click on that.
Refer the below screen.

10. It will open the new tab and will look as
below.

11. If you scroll down to Request Body on
Raw section provide JSON data and refer below screen .

12. Create Incident: On above JSON
not including the incident number so it will create the incident as per our
script.
Once you click on send then will get the popup if
you click on Ok. Then response section will look like below.
Below you can the status code and custom response
with incident number.
Response:

13. Update Incident:
Here providing the JSON with Incident number which
created above.
Please see the updated JSON which is provided
below.

Response:

Incident form Updates:

14: Error Message:
On the JSON request if the callerid and number is
empty then it will not create incident in ServiceNow
It will ignore the record and will get error
response.
JSON:

Response:

The Microsoft SCCM
integration is a one direction import of SCCM data into the ServiceNow Configuration
Management Database (CMDB).
Scheduled imports bring
relevant SCCM data into the ServiceNow instance from an
SQL Server database and map it to tables in the CMDB. You can configure either
a full or incremental data import. The import is achieved using a JDBC
connection via the MID Server. The integration keeps the ServiceNow CMDB synchronized
with the SCCM SQLServer database, so that only relevant data is imported from
the SCCM database to the CMDB. The SCCM database is considered an authoritative
source and is not written to.
Importing data from Microsoft SCCM
requires a connection to the SCCM database via a JDBC data source and a
schedule that tells the MID Server when to fetch the data.
Before you begin
You must have sufficient credentials to query the SQL Server that
contains the SCCM database. Create a SQL Server account in order to connect to
the SCCM database on the MID Server to use the data sources.
Connect to your SCCM SQL Server and configure the following:
1. Create a new login user name and password for SQL Server authentication.
2. Choose the SCCM database that ServiceNow data sources will
connect to.
3. Assign the 'db_datareader' role membership to the new user.
Role required: admin
About this task
The system uses the details of the database connection you create in
this procedure to configure the default SCCM data sources automatically.
Note: If you want to configure the JDBC data
source to authenticate on your SQL Server database using the Windows MID Server
service user, select the Use integrated authentication box on
each of the existing data sources.
Procedure
1. Navigate to All > Integration - Microsoft
SCCM <version> > Setup.
2. Complete the required fields to configure connection to the SCCM SQL
database.
Make sure
to include a valid MID Server that has access to the SQL database server.SCCM
data import setup
3. Under Related Links, click Test data source connections to
test the connection to the SCCM database.
4. If the data source connects to the SCCM database, navigate to Integration
- Microsoft SCCM > Scheduled Import.
The
Scheduled Data Import form appears for your version of the SCCM integration.
The Computer Identity data source runs first. The other data sources listed on
the form run in sequence, based on their default order.

5. Select a calendar interval (Day, Week, etc.) in the Run field
and specify the time of day the import should run.
Your
selection displays additional fields required to complete the schedule.
6. Click Update to schedule the import or click Execute
Now to perform the import immediately.
After the instance imports data using
the SCCM <version> Computer Identity data source,
the other data sources run in the order configured to retrieve the remainder of
the SCCM data.
Resolution
Microsoft SCCM 2016 plugin is required for integration.
- If the query is to understand a case, if
there are 10 licenses that was not used for the last 6 months and if you
wish to uninstall that software from the client machine, will it work
directly by creating a request with Servicenow as SCCM is already integrated
with it ?
- The response to the above is, we don't
believe there is such feature as of now with SCCM
Integration. With this SCCM Integration,
customer can put all the relevant CI data and update or create them in the
respective CMDB_CI tables.
On top of it, if the customer wishes to integrate the target CI and then
install or uninstall a software, then it is not a part of this integration.
- With SCCM integration, only discovery data
is populated in the Servicenow tables.
- During the SCCM Integration,
customer will be providing the information like SQL
database URL along with a Password.
This will query the target SQL database with the SQL source provided in
the import sets. Using JDBC connectivity,
calls will be made via the Mid Server and
all the information from the SQL database will be pulled and then placed
in the respective CMDB_CI tables.
- License comes as part of the "Software
Asset Management Professional" plugin which cannot be
mixed with the SCCM Integration.
- With SCCM Integration,
we can only pull the data from the SQL database and can push them into the
respective CMDB tables.
- Using SCCM Integration to
install or uninstall a software which is not in use for a long time, can
be achieved integrating SCCM with "Orchestration" plugin,
where in one can create their own "Workflows" to
based on their requirement (either install or uninstall a software). When
the "Orchestration" plugin is
activated, "Client Software Distribution" plugin
gets added using which "Reclamation" can
be performed.