You need to sign in to do that
Don't have an account?
Serghei Sleptov
Email alert if number of opened cases reaches certain value
How to created an email alert if total amount of opened cases reaches lets say 100 per day?
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
note that i've add the && cas.origin == 'Email'
if you were to do the incremental email alerts - i.e. 100 & 200 as i mentioned previously then you could put your if like this(including comments on what's going on.
All Answers
you should be able to do this with a trigger on insert.
i'll put something together but want to verify you only want 1 alert right - i.e. when you hit 100 - not an alert each time there after?
also are you happy with it being a trigger and workflow combined.
i.e. a field would be updated on the cases that would trigger a workflow - this should then allow you to customer the email message without having to touch the code.
let me know and i'll send you an example code..
Lets say we normaly receive 20 cases per day via email-to-case
If we started receiving signifincantly more I want to be notifed .
i've put 2 examples in here.
first step is create a field on your cases object - that is either a checkbox like I have done or a number field - number field you can reference in your email so you can see the extent of the issue.
then create a standard email template - then a workflow with an email alert that if SendAlert = 100 or true in my case, send the email.
i hope that makes sense.
dan
*** Deployment Log ***
Result: FAILED
Date: June 9, 2014 1:40:14 PM EDT
# Deploy Results:
File Name: triggers/Trg_TooManyCasesAhhhh.trigger
Full Name: Trg_TooManyCasesAhhhh
Action: NO ACTION
Result: FAILED
Problem: Expression cannot be assigned
did I understand it correctly?
when setting up the email alert work flow make sure you select for when created only.
cheers dan
// if this has helped mark it as the correct answer to help others..
my email-to-case sets Origin to be 'Email' but I think it will set it after the Trg_TooManyCasesAhhhh.trigger being executed.
note that i've add the && cas.origin == 'Email'
if you were to do the incremental email alerts - i.e. 100 & 200 as i mentioned previously then you could put your if like this(including comments on what's going on.
I created a new Origin and assigned it to case through email-to-case,
changed Line 11 in code above to be
if(numberofcases.size() == 1
to send email at 1st case created, however SendAlert__c wasn't set to true so workflow wasn't triggered.
Any idea?
Daniel,
Thanks a lot for your help!