Working with Variables
The following guidelines apply to any service desk procedure.
- Global Procedure Variables - Global procedure variables are defined using Service Desk > Procedure Variables.
- The same global variable can be applied to any procedure run by any service desk.
- The Check a Variable command tests the value of a variable in a procedure.
- The value of a global variable can be changed within a procedure using the Get a Variable command, but that value persists only for the duration of the procedure.
- Within a procedure, a global variable is referenced in text by bracketing its name with the
[= and =] . Example: [=varname=] . - Global variables are defined by name and set type. For example, a global variable could be called
varname and use the set type All. The set type All means the global variable can be used in any procedure. If a variable is defined using a set type for a specific procedure, it can only be used in procedures matching that set type. For example, a variable defined using the Goal set type can only be used in Ticket Goals procedures. - A global variable of any set type can be associated with a policy. Policies ignore the set type assigned to the global variable.
- Procedure-Specific Variables - Within a procedure you can create a procedure-specific variable using the Get a Variable command and assign it a value.
- Unlike global variables, the scope of a procedure variable applies only to the procedure it was created in.
- Like global variables a procedure variable is referenced in text by bracketing its name with the
[= and =] . Example: [=varname=] .
- Property Variables - Property variables reference the values of fields within the VSA.
- Property variables are distinguished by bracketing their names in text with
[$ and $] . Example: [$machine$] . - Types of property variables include
[$TicketId$] or [$Organization$] or [$Status$] . See Standard and Custom Property Variables for a list of property variables. - Like global variables and procedure variables, the values of property variables can be tested with IF statements.
- Setup for the
[$Manager$] property variable:- Create an Organization.
- Create a Department within that Organization.
- Create a first Staff member assigned to that Department.
- Create a second Staff member assigned to that Department.
- There is a field named Supervisor in the Staff record. Assign the second Staff member as the Supervisor of the first Staff member.
- Create a ticket and assign the first Staff member to the ticket, the one who has a Supervisor. The Supervisor name does not display in the ticket.
- Save the ticket.
- Any associated procedure such as stage entry or ticket change can now test for the ticket's
[$Manager$] property variable being equal to the name of the first staff member. - Custom fields property variables are supported.
- Case Sensitivity - All three types of variable names are case sensitive.
- Where Used - Once variables are created you can include them, in their bracketed format, in any text entry field displayed by an IF-ELSE dialog box.
- Message Templates - Property variables, global variables and procedure variables can be resolved in message templates.
- Any user name included in the To field of a message template is automatically converted into that user's corresponding email address. For example, if the user
jsmith has a corresponding email address of jsmith@acme.com , then the same message template—with jsmith in the To field—can be used by a sendMessage() step to send a message to jsmith and also used by a sendEmail() step to send an email to jsmith@acme.com . Email addresses for each user are maintained using System > Users.
- Note Templates - Property variables, global variables and procedure variables can be resolved in note templates.
|