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
msmithey13msmithey13 

How to autodelete spam cases?

I am now at the point that I have accepted that Spam will get thru.  In response I have set up a series of actions to combat the spam cases generated by Email to Case.
Step 1:  New custom picklist field which is a rule sets it to "Spam" if certain conditions are met.  This works fine and the field is set properly in response.
Step 2:  I createded a process in Process Builder.  My "criteria" is simply if the Spam field is set to "Spam".  True to action of Delete Records.  Action is to call Apex and the Apex Class is an Invocable Method.Apex Class Invocable Method
and the Apex Variables are CaseIds Reference {Case}.Id

This does NOT work and I am at a loss on how to fix it.
Can anyone out there see what is wrong here and assist?

Thanks in advance for the help!!