KQL query to pull tickets created by staff with 'As a user' or 'Send an email' option

When creating a new ticket, the agent has the option of creating it 'As a user' or 'Send an email.' You may wonder if a report can be generated to show this data.

New ticket window

A KQL query can be generated to pull tickets created by staff with 'As a user' or 'Send an email' option. This article provides the steps on how to generate this report using a custom KQL query.

To generate the report:

  1. Log in to your GFI HelpDesk Staff Control Panel, that is, https://yourdomain.gfihelpdesk.com/staff.
  2. On the Staff Control Panel, go to Reports, and then click New Report.
  3. New report navigation

  4. On the New Report form, type in the desired Title.
  5. On the Primary Source, select Tickets from the drop-down list.
  6. Select a Category of your choice.
  7. New report window

  8. Click Next, and enter the following KQL query.
    SELECT 'Tickets.Ticket ID',

    IF('Tickets.Creator' = 'User', 'As a User', 'Send an email') AS METHOD

    FROM 'Tickets'

    WHERE 'Tickets.Creation Mode' = 'Staff Control Panel'

    Enter the KQL query

  9. Click the Run Report button.

The report should look like the one shown below. You may print, export, or schedule when to run this report as desired.

Report of tickets created by staff