function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Shannon.ax1730Shannon.ax1730 

Help with a formula please...sending surveys based on closed cases

Hello!

I need help with a formula for surveys. I want to send a survey for every 10 cases closed. The cases considered would have a particular record type(s) and contain and email address. I have a case custom formula field that currently registers either true or false:
 
IF(MOD(VALUE(CaseNumber), 10) = 0, "True", "False")

If the result is true, an email is sent with the survey link.
 
It was suggested that I might need to create an Apex trigger. I need help with this since I am quite a novice with Apex. 

I appreciate the help,

Shannon

 

T-HanT-Han

Shannon,

 

Need some more clarity of y u need Apex Trigger?

 

Your case:

10 Cases Closed ( Particular RT + an email addrs-mandatory) - then email should be sent out?

OR

According to your formula  its (If 10 Cases are closed Email is sent) - More info needed.

 

Brief your design, and lets see if there is a chance you can do this with Config with Count of Records and other Fields.

 

Lemme know

 

Shannon.ax1730Shannon.ax1730
Thanks T-Han,

The first scenario is what I need. I need a survey email sent out for every 10 cases closed of particular record types AND has an email.

Someone suggested an Apex trigger, but I would be happy to have a formula within the custom formula field I created. The current formula (IF(MOD(VALUE(CaseNumber), 10) = 0, "True", "False")) is triggering the email workflow to send an email regardless of the record type or whether it has an email.

Does that make sense?

Thanks!
Shannon


Shannon Andreas Call Center Technical Manager
Stanley Black & Decker, Inc.

701 East Joppa Rd., Towson, MD 21286
Phone: (410) 329-9322
Shannon.Andreas@sbdinc.com
www.stanleyblackanddecker.com
T-HanT-Han

Shannon,

 

RecordType.Name = 'Case RT' is the formula to include the record type.. 

 

Using Work Flow Rule : -

 

Criteria: Created&Edited to meet the criteria.

 

For Criteria met : You can drop down and select the <<Case: Case RT equals - ur RT, Case:Email equals - leave the val blank, Case Status (Relevant field of urs which says Closed) equals Close>>

 

Save it then Add WF Action and include the Email template you created. Should work..

Shannon.ax1730Shannon.ax1730
Thanks again T-Han...how would the formula look if I added Record Type?

Formula now:

IF(MOD(VALUE(CaseNumber), 10) = 0, "True", "False")



Shannon Andreas Call Center Technical Manager
Stanley Black & Decker, Inc.

701 East Joppa Rd., Towson, MD 21286
Phone: (410) 329-9322
Shannon.Andreas@sbdinc.com
www.stanleyblackanddecker.com
T-HanT-Han

Shannon,

 

I am assuming you are using a WF Rule here, in tat case Criteria I mentioned would work apt to ur need than the Formula. 

The Formula you have will focus on Closing of Record and E mail addrs wouldn't be a factor.

 

<< RecordType.Name = 'Case RT'  >>- Add it to ur formula along with the AND && Operator to your formula