Organizations that use both ServiceDesk Plus and SolarWinds can now integrate the two applications to automatically log tickets in ServiceDesk Plus for alerts raised in SolarWinds. The ticket will get reopened whenever an alarm reoccurs and will get closed only when the alarm is reset.
Please note that currently only the cloud version of ServiceDesk Plus supports these functionalities; however, the on-premises version too will support them shortly.
Some of the key features included in this integration:
Log incidents automatically when an alert is triggered.
Acknowledge alert from ServiceDesk Plus ticket.
Update the ticket based on alarm status i.e, close the ticket when the alert is reset, reopen the ticket whenever an alert reoccurs.
Generate reports in ServiceDesk Plus to further analyze the alert-related ticket metrics.
Below screenshots show a ticket being created for an alert, reopened for a reoccurring alert, and resolved with a reset alert.



Configuring the Integration
For this integration to work, users need to configure the below in ServiceDesk Plus and SolarWinds respectively.
ServiceDesk Plus Configuration
In ServiceDesk Plus, go to Settings > Developer Space > Custom Functions.
Choose Callback Functions from the drop-down and click the New custom function button.


Provide a name, api name, and tick on the Publish check-box.
Choose Raw Data under Parameters.
Copy the code mentioned below and save the page.
body = body.toString();
/*Specify the portal of the request to which the note must be added*/
portal_name = "itdesk";
/*Input data provided is a raw data, which will come as a String so converting it to a Map, so that it will be available in the JS Object format*/
inputMap = body.toMap();
/*Provide the corresponding status name in SDP Cloud application, for the incident to reopen, when the same alert has been raised again*/
reopenStatus = "Open";
/*Provide the corresponding status name in SDP Cloud application, for the incident to be completed, when the reset alert has been raised*/
completedStatus = "Resolved";
/*Please provide the content to be added as the note, when the alert has been reset*/
resetContent = "Alert has been reset";
/*Please provide the content to be added as the note, when the alert has been reopen*/
reopenContent = "Alert has been reopened";
/*Please provide the additional field key of the alert id*/
alertIdUdfKey = "udf_char46";
//Code flow begins here
alertId = inputMap.get("alertId");
operation = "ADD";
if(inputMap.get("operation") != null && inputMap.get("operation") == "RESET")
{
operation = "RESET";
}
if(alertId != null)
{
requests = zoho.sdp.invokeurl
[
url :"/app/" + portal_name + "/api/v3/requests"
type :GET
parameters:{"input_data":{"list_info":{"search_criteria":{"field":"udf_fields." + alertIdUdfKey,"condition":"is","values":{alertId}},"row_count":1,"sort_fields":{{"field":"display_id","order":"desc"}}}}}
];
requests = requests.get("requests");
respone = Map();
if(requests.size() > 0)
{
requestDetails = requests.get(0);
requestId = requestDetails.get("id");
statusName = reopenStatus;
noteContent = "Alert has been reopened <br> " + body;
if(operation == "RESET")
{
statusName = "Resolved";
noteContent = "Alert has been reset <br>" + body;
}
addNote = zoho.sdp.invokeurl
[
url :"/app/" + portal_name + "/api/v3/requests/" + requestId + "/notes"
type :POST
parameters:{"input_data":{"request_note":{"description":noteContent}}}
];
response = zoho.sdp.invokeurl
[
url :"/app/" + portal_name + "/api/v3/requests/" + requestId
type :PUT
parameters:{"input_data":{"request":{"status":{"name":statusName}}}}
];
}
else
{
requestData = Map();
requestData.put("subject",inputMap.get("alertMessage") + " - " + inputMap.get("nodeName"));
description = "Node Name : " + inputMap.get("nodeName") + "<br>Alert Description: " + inputMap.get("alertDescription") + "<br>Alert ID: " + inputMap.get("alertId") + "<br>Alert Trigger Time: " + inputMap.get("alertTriggerTime") + "<br>Severity: " + inputMap.get("severity") + "<br>Alert Definition ID: " + inputMap.get("alertDefinitionId") + "<br>Alert Acknowledgement Link: <a href='" + inputMap.get("alertAcknowledgementLink") + "'>" + inputMap.get("alertAcknowledgementLink") + "</a>";
requestData.put("description",description);
/*If you want to store the alert data to the additional fields, the following is the format.*/
udfFields = Map();
udfFields.put(alertIdUdfKey,alertId);
/*adding the udf fields object to the request data*/
requestData.put("udf_fields",udfFields);
response = zoho.sdp.invokeurl
[
url :"/app/" + portal_name + "/api/v3/requests/"
type :POST
parameters:{"input_data":{"request":requestData}}
];
info response;
}
}
return response.toMap();

SolarWinds Configuration
In SolarWinds, go to Manage Alerts section and create a new alert or edit an existing alert for which an incident has to be created in ServiceDesk Plus.


Creating Trigger Actions
Using the trigger actions, you can configure actions to be performed when an alert is raised.
Go to Trigger Actions tab inside the alert.

Click Add Actions and select Send a GET or POST request to a Web Server option.

Provide an action name.

To get the URL, go to ServiceDesk Plus > Settings > Developer Space > Custom Functions and edit the configured custom function and copy the URL in the field URL to execute this Custom Function.

Choose 'Use HTTP/S POST' and copy the body text from SW-Trigger.txt file.
Please choose authentication as None and content type as application/json (as shown in the screenshot below) and save the changes.

Resetting Trigger Actions
Go to Reset Actions tab.
Click Add Actions button and select Send a GET or POST request to a Web Server option.

Provide an action name.

To get the URL, go to ServiceDesk Plus > Settings > Developer Space > Custom Functions and edit the configured custom function and copy the URL from the field URL to execute this Custom Function.

Choose 'Use HTTP/S POST' and copy the body text from SW-Reset.txt file.
Choose the authentication as None and content type as application/json (as shown in screenshot below) and save the changes.