SteadyPoint Helpdesk can be integrated with many different solution, using REST API which we will provide below.

But before you’re able to use this API, you need to communicate with SteadyPoint helpdesk, as creating a ticket on Helpdesk requires being logged in via a SharePoint Context. To do that, either follow your own authentication module before proceeding to use the API, or follow this guide we’re linking to here for a detailed explanation.


API’s for Creating a New Ticket

Name Value Type Required Description
Site URL String Yes The URL where the Helpdesk add-in is installed.
Title String Yes The subject of the ticket.  
AreaId Number Yes The ID from “Area” list used as lookup.
StringArea String Yes The title of the lookup item from “Area” list.
TypeId Number No The ID from “Type” list used as lookup.
StringType String No The title of the lookup item from “Type” list.  
SubTypeId Number No The ID from “SubType” list used as lookup.
StringTypeLevel1 String No The title of the lookup item from “SubType” list.  
Priority1 String Yes This specify the priority of the ticket; High, Normal and Low.
ShowVIP Boolean Yes Boolean used to enable or disable “VIP” feature.
VIP Boolean No Depends on the previous parameter, this declares the ticket as very high priority.
Description1 String Yes The description of the ticket.
Status String Yes The status of the ticket; New, Open, Waiting Verification and Closed. When creating the ticket, it must be “New”.
TaskName String Yes This column describes which task is pending on a specific ticket. When creating the ticket, it must be “Empty”.
AssigneeId Number No The current assignee of the ticket to interact with it.
TicketOwnerId Number Yes The owner of the ticket.
OwnerDepartment String No The department name of the owner of the ticket.
OwnerPhoneNumber String No The phone number of the owner of the ticket.
OwnerMobileNumber String No The mobile number of the owner of the ticket.
OwnerLocation String No The location of the owner of the ticket.
OwnerEmail String Yes The e-mail of the owner of the ticket.
ManagerStr String No The e-mail of the manager of the owner (from Active Directory).
ManagerPersonId Number No The manager of the owner (from Active Directory).
DiscussionID String No The ID of the discussion item used in this ticket.
DiscussionCTID String No The ID of the content type used in the discussion item.
TeamName String No The team of the current assignee.
HasTeam String Yes A Boolean in string is used to clarify if there is a team or not.
StringRoutingType Number Yes This defines which routing algorithm to use in the system, its value must be; 1, 2 or 3.
TicketSource String Yes This clarifies the source of the ticket created; Direct, Service Request and Email.
TemplateName String No The name of the template item from the defined “Templates” in the system.
TemplateItemId String No The ID of the template item in the “Templates”.
UTCTime Number Yes Number used to define the time zone.
TaskSLA Number Yes This is a hidden column used to calculate the period for escalations and reminders on the ticket, it must be just zero and the system will calculate it after creation of the ticket.
WorkingHours Number Yes This is a hidden column used to calculate the period working day hours, it must be just zero and the system will calculate it after creation of the ticket.
SiteLanguage String Yes The language of the site; “en”, “ar”, … etc.
TicketHaveClientID String Yes This Boolean in string is used to clarify if the system is using Client ID or not.

Syntax

var ticketUrl = SiteURL + "/_api/Web/lists/getbytitle('Tickets')/items";
var item = {
 "__metadata": { "type": "SP.Data.Pages_x002f_Lists_x002f_TicketsItem" },
 "Title": Title,
 "AreaId": AreaId,
 "StringArea": StringArea,
 "TypeId": TypeId,
 "StringType": StringType,
 "SubTypeId": SubTypeId,
 "StringTypeLevel1": StringTypeLevel1,
 "Priority1": Priority1,
 "ShowVIP": ShowVIP,
 "VIP": VIP,
 "Description1": Description1,
 "Status": "New",
 "TaskName": "Empty",
 "AssigneeId": AssigneeId,
 "TicketOwnerId": TicketOwnerId,
 "OwnerDepartment": OwnerDepartment,
 "OwnerPhoneNumber": OwnerPhoneNumber,
 "OwnerMobileNumber": OwnerMobileNumber,
 "OwnerLocation": OwnerLocation,
 "OwnerEmail": OwnerEmail,
 "ManagerStr": ManagerStr,
 "ManagerPersonId": ManagerPersonId,
"DiscussionID": DiscussionID,
"DiscussionCTID": DiscussionCTID,
"TeamName": TeamName,
 "HasTeam": HasTeam,
 "StringRoutingType": StringRoutingType,
 "TicketSource": "Direct",
 "TemplateName": TemplateName,
 "TemplateItemId": TemplateItemId,
 "UTCTime": UTCTime,
 "TaskSLA": 0,
 "WorkingHours": 0,
 "SiteLanguage": SiteLanguage,
 "TicketsHaveClientID": TicketsHaveClientID,
 };
$.ajax({
url: ticketUrl,
 method: "POST",
 headers: {
 "Accept": "application/json;odata=verbose",
 "content-type": "application/json;odata=verbose",
 "X-RequestDigest": $("#__REQUESTDIGEST").val()
 },
 data: JSON.stringify(item),
 success: function (data) {

 },
 error: function (jqXHR, textStatus, errorThrown) {

 }
});

Output

  1. Success (201) status, this indicates that ticket has been created successfully.
  2. Bad Request (400) status, this indicates that the query used is invalid.
  3. Not Found (404) status, this indicates that the URL used is wrong or the add-in is not installed.

Comments are closed.