ServiceNow Integration

ServiceNow Integration

SDP-Servicenow integration can be achieved using Python scripts by installing Python runtime in builds older than 11120 but with newer builds, it can be done with Deluge scripts and the built-in Deluge runtime.

Deluge does not support username-password encoding.  Hence it has to be manually encoded and updated in the configuration file.[FileName: global_function_4-ServiceNow_Configurations.txt]

For builds older than 11120, check the procedure in this link.,


Creating a ServiceNow ticket when a SDP ticket is created

Create an additional field in ServiceDesk Plus:
1. We need to create two additional fields
ServiceNow Id --> For storing the ticket Id from ServiceNow
Go to Admin > Incident - Additional fields > Add field > Create a single line additional field and note down the API Field Name



ServiceNow sys_id --> For storing the ServiceNow incident sys_id (By using sys_id we can close the ticket in ServiceNow using API)
Goto Admin > Incident - Additional fields > Add field > Create a single line additional field and note down the API Field Name




2. Add the newly created additional fields to the incident template.


Creating Additional Field in ServiceNow:

1.  We need one additional field to hold the ServiceDesk Plus ticket id.

2.  Login to ServiceNow and search Incidents > Click the incidents tab > Click New button as shown below


3.  Click on Additional Actions > Configure > Form Layout


4.  Create a new additional field called "SDP Ticket ID" and make sure created field is available under Selected fields


5.  Once additional field is created, we need to find out the ID to make API call.  Create a dummy incident request > Edit the request > Inspect element and get the additional field id




Creating a ServiceNow ticket when a SDP ticket is created
Steps to configure:
1.  ServiceNow configuration informations are stored in servicenow_config.json

2.  For Python:
  • Download and extract the python_integration.zip 
  • Move create_servicenow.json, functions.py, configuration.json, create_servicenow_ticket.py,servicenow_config.json files to MangeEngine/ServiceDesk/integration/custom_scripts folder
  • Edit configuration.json and update url and technician_key
  • Edit servicenow_config.json and update servicenow configurations like url,username,password
    • url >> ServiceNow server url (sample : https://dev79461.service-now.com%29/
    • username >> SeriviceNow username
    • password >> ServiceNow password
    • update api_fields >> fields mapping between SDP to Servicenow

3.  For Deluge: 
  • Download the attached scripts.  Copy the contents into request custom functions.
    • Goto Admin > Request Custom Function > Custom Function > New > Paste the custom function content
    • Goto Admin > Request Custom Function > Global Function > New > Paste the global function contents.

4.  Create a Custom Trigger to get executed when a request is created.
Criteria: ServiceNow_ID is Null
Action Executor:  
Python: py create_servicenow_ticket.py  $COMPLETE_V3_JSON_FILE
Deluge:  Select the create - custom function 

5.  If a ticket is created with required criteria, the ServiceNow script gets executed and the respective additional fields gets populated.

Closing a ServiceNow ticket when a SDP ticket is closed
Steps to configure:
1.  Create a Custom Trigger in SDP as shown below

2.  Move close_servicenow_ticket.py file to MangeEngine/ServiceDesk/integration/custom_scripts folder
3.  Resolution notes, Resolution code are mandatory for closing a ServiceNow ticket.
4.  We can either move the SDP Resolution and Request Closure Code to ServiceNow or we can use the static content in the script directly
Note: ServiceNow Resolution code and SDP Request Closure Code must be same in order to close the Servicenow ticket.
Dynamic Content:


Static Content:


5.  If the custom trigger/menu gets executed, the respective Servicenow ticket will also be closed.

                  New to ADSelfService Plus?

                    • Related Articles

                    • Integration with other helpdesk tools

                      Please note that, we do not have direct integration of SDP MSP with other HelpDesk tools like ServiceNow. However if any HelpDesk has APIs for all Create, Update, Close operations, then you can make use of the our APIs and custom triggers to achieve ...
                    • ServiceDesk Plus On Premise : Integrate with ServiceNow using Zoho Flow

                      This document will guide you through the steps to integrate ServiceDesk Plus with ServiceNow upon Zoho Flow. The pre-requisites for this integration : Make sure the Zoho Flow Agent is up and running in the machine in which the ServiceDesk Plus server ...
                    • Dynatrace Integration using Script - v1

                      Dynatrace to SDP Integration Tool – Configuration Guide What this Integration Does This integration automatically connects Dynatrace with ServiceDesk Plus to keep your CMDB up to date. It regularly reads information from Dynatrace about your servers, ...
                    • MS Intune Integration using Script - v1

                      This article guides you through the process of integrating Intune data into SDP using a Python script. Prerequisites: - Python 3.6 or above Ensure Python is installed and added to your PATH. Use python --version or python3 --version to verify. ...
                    • Slack Integration

                      This is a sample python script that is used to post request details from ServiceDesk Plus into Slack.Slack is a cloud-based team collaboration tool that allows team members to communicate without the use of emails or group SMS. Use Case: Lets assume ...