Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Dev question

Highlighted
Leandro A. M. d
Super Collector

Dev question

Hello everyone.

I am developing some DB rules that were requested and one of these requests specifies the need to send a warning e-mail message to two independent workgroups.

There is the normal e-mail message to the workgroup for which the service call is being directed to and there would eb the need to warn a diferent group if certain conditions were met.

The problem is that I can't (or I don't know how to) send an e-mail to a specific workgroup.

Has anyone ever done anything like that before or is it even possible?

Thanks in advance.

- Leandro
4 REPLIES
Craig R Taylor
Collector

Re: Dev question

You would need to create a DB rule to do this. Here are the steps to create the rule under sp23. Other service packs will be very similar:

When you click new a box will open. It will will ask you when you want to apply the rule. Likely this will be when an incident is created or modified.

You would then enter your conditions in the next step. E.g. Priority equals Top

The next step is where you would enter the action. This is the step where you will set up the actual emailing.

Under the drop down menu is the option "Send e-mail message". Once that is selected, a new screen will pop up. (See screen shot that is attached). You enter in the name of the action. For "send to" you can put in the address explicitly or use a field e.g [Assignment; To Person; E-mail] The subject can also have fields entered to fill in so you can put the ID and description etc. The message body can be filled out in a similar fashion.

The rest is pretty straight forward.
You can observe a lot just by watching. - YOGI BERRA
Raman Shcharbak
Frequent Visitor

Re: Dev question

You can also try this:
keep in ServiceCall object hidden custom field of Workgroup type wich is set by template. (if this is the same goup for all servicecalls) and then in a rule use address of the group. So you will not edit address in a rule ,only address of a group in event of its change.
Leandro A. M. d
Super Collector

Re: Dev question

I'll try to give it a better explanation.

Helpdesk fills out a new service call. The call gets directed to X Workgroup and it gets a warning e-mail. But depending on how its classification is filled, I'll have to send another warning e-mail, this time to Y workgroup.

What I was able to do so far was to create a DB rule that would check the classification and would, according to it, send an e-mail, but I could only assign an indivial's personal e-mail address and it would not take a workgroup's ID as a means to send that e-mail to all of its members.

That suggestion about creating a hidden field in the Service Call template is interesting. But I was thinking about creating a hidden field that, by using a UI Rule, would check that classification field and set the appropriate group on that hidden field and I think I could use that with that other DB rule I created to send a warning e-mail to the selected workgroup.

The problem is that I don't know how to do it yet, or even if it is at all possible.

I hope the problem was more clearly described.
Meine de Vries
Regular Collector

Re: Dev question

To send an email to all the people in a workgroup use the following:

[Assignment;To workgroup]

Example:

When service call is created
OR When service call is modified
where ID equals 42926
Actions: Test message (Send e-mail message) , Send to: [Assignment;To workgroup], Subject: Test Message from Meine, Message: Test Message from Meine
//Add this to "OnDomLoad" event