How to close tickets in FocalScope using the SOAP API
This article demonstrates how to use the 'CloseTicket' SOAP API function and also provides a C# code sample to demonstrate implementation.
Closing tickets in FocalScope with a SOAP call
To use SOAP to close a ticket in FocalScope, do the following:
- In the [Main menu], select [Screen > Administration]
- Select the [Advanced properties] tab
- Select the [External API > SOAP API] folder
- Click the [Obtain] button to generate a security token.
- Copy the [Security token], you will need to to run the 'CloseTicket' function
- Click the [Open] button to launch the SOAP API test page
- Click the [CloseTicket] link to run the function
- The 'CloseTicket' function uses the following parameters:
- secToken - security token as generated in point 4 in the previous section
- nTicketNumber - number of ticket to be closed
- sReason - reason for closing the ticket. To skip specifying a reason, set value to: null, ""
- fDiscardReminders - flag for discarding FocalScope Reminders. To discard, user any of the following: false, true, 0, 1, null, ""
- ReopenDate - date and time at which to reopen ticket in the future. Use the following format: YYYY-MM-DD HH:MM:SS. To disable reopening the ticket, use: null, ""
Please note: Parameter values for the 'CloseTicket' function must match the above examples precisely. Also, the security token is mandatory and must not have expired.
Figure 1 - Generating a SOAP query
static void Main(string args)
SoapService.SoapApi soapService = new SoapService.SoapApi();
soapService.Url = "http://localhost/emm/net/soapapi.asmx";
string secToken = "25ae61684c265be470bb57e6b2cad01a";
string TicketNumber = "10001";
string sReason = "No reason";
string fDiscardReminders = "1";
string ReopenDate = "2014-03-24 15:57";
soapService.CloseTicket(secToken, TicketNumber, sReason, fDiscardReminders, ReopenDate);