The community will be in read-only from Monday 11:59pm (PT) to Wednesday 7:30am (PT)
The community will be in read-only from Monday 11:59pm (PT) to Wednesday 7:30am (PT)
Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Service desk database rule ?

Highlighted
Andrej_19
Collector

Service desk database rule ?

Hello,

question on how to implement database rule:

A service call is opened and later priority and assignment to workgroup is set.
Asignment to person is NOT a mandatory field, but it is usually set, when a specific member of the workgroup assigns it on himself and begins solving the problem.

What I'd like to create is (I guess it must be) a scheduled dbrule, that would send a warning email to assigned workgroup OR to assigned person (only IF person of workgroup is already assigned).

What complicates matters further, is that occurence of warning mails is different, based on the priority of the service call.

For example;
1.)

When a case is in status New, with a priority Minor, hasn't been solved in 7 days a mail is then sent to assigned workgroup OR assigned person (IF assigned person already exist, send only to that person. If not, mail is sent to all members of workgroup).

2nd example

When a case is in status New, with a priority CRITICAL, hasn't been solved in 4 hours, a mail is then sent every four hours to assigned workgroup OR assigned person (IF assigned person already exist, send only to that person If not, mail is sent to all members of workgroup).

I was looking at DB rule, but I've come across, that multiple scheduled validations of the condition are not possible in one rule.

What this means is that I have to create rule for every specified priority and probably for every possible combination of priority and assigned persons / assigned workgroups;
workgroup exists and person not, person exists, different priority...

What would the easiest way to implement such a rule be ?

Best regards,

Andrej


1 REPLY
Robert S. Falko
Honored Contributor

Re: Service desk database rule ?

Andrej,

The principle is the same for both cases.

1) If the frequencies will vary according to the priority, then you will need a different rule for each priority (or you will need a set of rules to set a custom field with the frequency, according to the priority - which comes back to the same thing - at least one rule per priority).

2) Either you mail both the assigned person and the assigned workgroup, or you have 1 rule for assigned persons, and 1 rule for assigned workgroups.

3) Basically, set your rule to mail the assigned person or workgroup. The rule is triggered to run a X hours/days/etc. after a given time. That given time should be set in a custom field. Suppose I want to send an email every 4 hours, as long as the status is not Closed.
a) I create the item at 12:00: initialize that custom field to current time (12:00).
b) The rule is triggered to run 4 hours later (at 16:00).
c) At 16:00, if the status is Closed, the rule is not triggered and everything ends.

However, if the status is NOT closed, the rule is executed. It must do 2 things: send the email, and update some other field (create a custom field for this purpose).

d) When that second custom field is updated, this triggers another DB rule. The DB rule updates the 1st custom field with the current time (16:00).

e) Because the 1st custom field is update, the first DB rule is scheduled again, to be run at 20:00.

This continues until the status is Closed.

Remember that the 1st rule must execute only once.

Does this sound complicated? You bet it does. Does it work? Yup. Will H-P add this VERY BASIC FUNCTIONALITY to OVSD in the future? I sure hope so.

Good luck,
Josh
//Add this to "OnDomLoad" event