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

Using DB rule for sending email without criterion

Highlighted
David Edelman
Occasional Contributor

Using DB rule for sending email without criterion

SD 4.5, SP9, Win 2003

Would like to use a DB rule to send an email to a messaging queue any time a Service Call is created or modified. There should be no business logic in the DB rule, as the messaging queue will have the business rules and route the information to the appropriate places.

The problem I have is that I get 6 emails whenever I create a new Service Call. I tracked it down and I am getting 1 email for the create and 5 for the modify. Is there a way around this?

Thanks,
-David
4 REPLIES
Mark O'Loughlin
Honored Contributor

Re: Using DB rule for sending email without criterion

Hi David,

can you use the "Evaluate this rule..." option so the e-mail is only sent on certain modifications and not all modifications e.g. Only when priority changes or when information updates are added or when status changes are made(and not when minor changes are made)
David Edelman
Occasional Contributor

Re: Using DB rule for sending email without criterion

Mark -

The issue is that I'd like to send an email with no logic whatsoever, so that the messaging queue decides whether or not the data is important. But when I create a new ticket, 5 emails are sent for "modifications". Does the DB rule manager fire that many times during the creation of a new ticket?
Mark O'Loughlin
Honored Contributor

Re: Using DB rule for sending email without criterion

Hi David,

how many fields are you changing values or providing values for when you open a ticket.

Some of these changes / updates will cause the rule to fire more that once so some logic would be required in the DB rule to stop this happening.

I set up a rule as you described with no logic and am getting multiple emails for the same call.
Add som ebasic logis as mentions in the last post and I can control what is sent.

I hope this helps.
Robby De Naeyer
Regular Collector

Re: Using DB rule for sending email without criterion

Dear David,

I'm just guessing since i didn't test it, but this could be a solution if you would like to send 1 mail every time the call got modified or created.

create a custom field (boolean)
add a database rule:
if call created or modified
and new boolean is not yes
(do not evaluate rule when boolean has changed) => set new boolean = yes


Add a second database rule:
if call created or modified and new boolean is yes
(evaluate rule when boolean has changed) => set new boolean = no => send email


Hope this helps.
i'm sorry i did not check this before posting.

Best regards,
Robby De Naeyer.
//Add this to "OnDomLoad" event