Next Topic

Previous Topic

Book Contents

IF-ELSE-STEP Service Desk Commands

The following is a summary of IF-ELSE and STEP statements used in Service Desk procedures.

IF-ELSE Statements

checkVariable()

Evaluate a given variable.

else

Adds an else command underneath a corresponding if command.

isDuplicateRequest()

Compares inbound email to determine if it is a duplicate of an existing ticket.

inReopenTicket()

Tests whether the ticket is a reopened ticket.

isTicketClosed()

Tests whether a ticket is closed.

isWithinCoverage()

Tests whether a ticket or KB article is currently within the coverage schedule.

testIncidentCustomField()

Compares a custom field value in a ticket to a specified value or variable.

testIncidentProperty()

Compares the value of a field in a ticket to a specified value or variable.

testTicketProperty()

Compares the value of a field in an inbound email to a specified value or variable.

STEP Statements

addNote()

Adds a note to the ticket being processed by the procedure.

addNoteWithTime()

Adds a note and time to the ticket being processed by the procedure.

assignCustomField()

Assigns a value to a custom field in a ticket.

assignCustomObjectField()

Assigns a value to the custom field of a new ticket created using the createTicket() command.

assignObjectProperty()

Assigns a value to the property of a new ticket created using the createTicket() command.

assignTicketProperty()

Assigns a value to the property of the current ticket.

cancelTicketCreation()

Cancels the creation of the ticket.

comment()

Adds a one line comment to the procedure.

createTicket()

Creates a new ticket in a specified service desk.

deleteTicket()

Deletes the ticket being processed by the procedure.

executeExternalScript()

Executes a script written in VB or C#.

executeShellCommand()

Executes a shell command on the Kaseya Server.

executeSqlNonQuery()

Executes an SQL non-query command on the Kaseya Server SQL Server database.

executeSqlQuery()

Executes an SQL select query command on the Kaseya Server SQL Server database.

executeSubProcedure()

Starts another procedure.

exitProcedure()

Exits the current procedure.

failCurrentTicketTransaction()

Changes made to a ticket are not saved to the database.

getAgentInfo()

Returns a selected property value from the last audit of the agent machine associated with the ticket.

getVariable()

Gets a entered value or a value from a file stored on the Kaseya Server.

linkTickets()

Associate another ticket with the ticket being processed.

pauseStageGoal()

Pause counting elapsed time against the stage goal.

pauseTicketGoal()

Pause counting elapsed time against the ticket goal.

reOpenTicket()

Reopens a closed ticket.

resumeStageGoal()

Resume counting elapsed time against the stage goal.

resumeTicketGoal()

Resume counting elapsed time against the ticket goal.

scheduleProcedure()

Runs a selected agent procedure for a specified machine.

sendEmail()

Sends an email to one or more recipients.

sendMessage()

Sends a message to the inbox of a user.

sendMessageToPool()

Sends a message to the inbox of each user included in a pool.

setEscalationTime()

Sets the time a ticket is escalated.

setGoalTime()

Sets the time a ticket or stage goal is scheduled to be completed.

setTicketGoalTime()

Set the due date for the entire ticket.

writeProcedureLogEntry()

Writes an entry to System > Application Logging.

Where Used

These IF-ELSE and STEP statements are used by the following types of Service Desk procedures.

IF-ELSE Statements

Stage Entry or Exit

Ticket Change

Ticket Request De-Dup

Ticket Request Mapping

Ticket Goals

Ticket Escalations

Sub-Procedures

checkVariable()

else

isDuplicateRequest()

 

 

 

 

 

 

inReopenTicket()

 

 

 

 

 

isTicketClosed()

 

 

 

 

 

 

isWithinCoverage()

 

 

testIncidentCustomField()

 

 

testIncidentProperty()

 

 

testTicketProperty()

 

 

 

 

 

 

STEP Statements

Stage Entry or Exit

Ticket Change

Ticket Request De-Dup

Ticket Request Mapping

Ticket Goals

Ticket Escalations

Sub-Procedures

addNote()

addNoteWithTime()

assignCustomField()

assignObjectProperty()

 

 

assignTicketProperty()

cancelTicketCreation()

 

 

 

 

 

 

comment()

createTicket()

 

 

deleteTicket()

 

 

executeExecuteScript()

executeShellCommand()

executeSqlNonQuery()

executeSqlQuery()

executeSubProcedure()

 

 

exitProcedure()

failCurrentTicketTransaction()

 

 

getAgentInfo()

getVariable()

linkTickets()

 

 

pauseStageGoal()

 

 

pauseTicketGoal()

 

 

reOpenTicket()

 

 

 

 

 

 

resumeStageGoal()

 

 

resumeTicketGoal()

 

 

scheduleProcedure()

sendEmail()

sendMessage()

sendMessageToPool()

setEscalationTime()

 

 

setGoalTime()

 

 

setTicketGoalTime()

 

 

writeProcedureLogEntry()

IF-ELSE in Detail

checkVariable()

Enter the name of the variable in the format #var_name#. It can be a global variable or a procedure variable that was defined earlier in the current procedure or a parent procedure. If a global variable, then the global variable's Set value must be compatible with the procedure being run. See Procedure Variables and Working with Variables for more information about variables.

Enter a string comparison operator. The same string comparison options are available for all IF commands. See String Comparisons and Date/Time Comparisons.

Then enter a second value to compare against the first value. Instead of a value you can also enter a property variable in the format [$objectname$] or a global variable or procedure variable in the format [=var_name=]. See Ticket Properties and Variables for a list of property variables.

If the test is true, IF steps are executed. If the test is false, ELSE steps are executed.