Proval Ticket Creation Template
Summary
This document establishes a new standard for creating tickets for our clients.
Implementation of this Script
Required Globals
- Set a global property named TicketCreateSubjectand populate it with the desired ticket subject line for tickets created from your script.
- Set a global property named TicketCreationCategoryand populate it with the desired ticket creation category that should be assigned to any ticket created by this script.
- Set a global property named TicketFinishUserNameand populate it with the desired username to be used when creating, commenting on, or finishing a ticket created by this script.
- Set a global property named DoNotCommentOpenTicketand populate it with a 1 or 0; setting this to 1 will disable commenting on open tickets, reducing noise in ticket management.
In the Script Requirements
- Set the following variable at the beginning of your script:
- Set a variable named TickID. It must be set as follows:SELECT IFNULL(MAX(Ticketid),0) FROM Tickets WHERE subject LIKE '@TicketCreateSubject@' AND status IN (1,2,3) AND computerid = '%Computerid%'
 
- Set a variable named 
- When you are in your resolved state (or success state), do the following:
- Set a variable check:
- If TickID = 0, then you should exit.
 
- If 
- Set a variable named TicketFinishBody; it should contain the constant value you wish to set as the body of a ticket when you finish it.
- Call a label named ticketing.
 
- Set a variable check:
- When you are in your problem state (failed state), do the following:
- Set a variable named TicketBody; it should contain the constant value you wish to set as the body of a ticket when you are creating or commenting on a ticket.- You can technically modify and add to this body if you desire by doing something like TicketBody = TicketBody + (add whatever you want here after).
 
- You can technically modify and add to this body if you desire by doing something like 
- Call a label named ticketing.
 
- Set a variable named 
- Set a label named ticketing:- Run the Proval Ticket Creation Template.
- Return from the call to ticketing.
 
Example Script
- The Proval Ticket Creation Template example can be referenced to see how to use this script.
- Sentinel One Settings Verification uses this script.
Variables
| Name | Description | 
|---|---|
| VarLog | A running variable to hold information on important steps in this script. | 
Output
- Adds to a variable VarLogto be displayed in a parent ticket.