Help center

View helpful articles, tutorials and FAQs on the set-up and configuration

of the FocalScope omnichannel suite, according to best practice.

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.

Tutorial

Closing tickets in FocalScope with a SOAP call

To use SOAP to close a ticket in FocalScope, do the following:

  1. In the [Main menu], select [Screen > Administration]
  2. Select the [Advanced properties] tab
  3. Select the [External API > SOAP API] folder
  4. Click the [Obtain] button to generate a security token. 
    1. Copy the [Security token], you will need to to run the 'CloseTicket' function
  5. Click the [Open] button to launch the SOAP API test page
  6. Click the [CloseTicket] link to run the function
  7. The 'CloseTicket' function uses the following parameters:
    1. secToken - security token as generated in point 4 in the previous section
    2. nTicketNumber - number of ticket to be closed
    3. sReason - reason for closing the  ticket. To skip specifying a reason, set value to: null, ""
    4. fDiscardReminders - flag for discarding FocalScope Reminders. To discard, user any of the following: false, true, 0, 1, null, ""
    5. 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

Sample code

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleSoapClient
{
    class Program
    {
        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);
        }
    }
}

Additional Information

How to use FocalScope categories as custom fields and retrieve the associated tickets using SOAP API



Let us help

If you have any questions, or need further support, please don’t hesitate to reach out.