Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

WHEN Conditions (Triggers)

...

For the IF conditions a new condition called "SIL condition met" was added. This new condition will trigger a SIL script to confirm the issue matches the specified parameters and the automation should continue. Despite there only being one option for this the condition is backed by the full power of the SIL language. This means that extremely complex conditions can be created using SIL that would not otherwise be possible within Service Desk.

...

Condition Script

To create a SIL condition script simply return a true if the condition has been met and automation should continue or, optionally, return false if the condition was not met and the automation should stop.

Code Block
JComment com = getLastComment(key);

string commentUserEmailif(issueType == "Bug") {
	return true;
} else {
	return false;
}

Example

Lets say that whenever a customer from a very important client creates a request you would like the priority of the request to be set to "Highest". You can not always rely on the customer being associated with an organization because the customer could be new and the Service Desk agent may not have associated them to an organization. One possibility would be to check the domain of the customer to see if it matches the domain of your important client.

Code Block
string reporterEmail = userEmailAddress(com.authorreporter);


if(contains(commentUserEmailreporterEmail, "@companydomain.com")) {
    return true;
}

The code above will return true if the reporters email contains the test "@companydomain.com". It was not necessary to add a false condition in this example since the condition will not be met unless a true value is returned. To finish this example and set the priority to "Highest" requires the THEN condition to be configured.

THEN Conditions