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
sssssssssssssssssssssss ssssssssssssssssssssssss s 

Check if a case is manually created, or email-to-case/web-to-case, or dataloader created

Hi Team,
I want to check if a case is manually created, or email-to-case/web-to-case, or dataloader created.

I am plannning to use process builder and LastModifiedBy.Alias = 'autocase' for email-to-case and web-to-case. Will this work fine?

What should I use for data loader created cases?
Andrew GAndrew G
Note that the LastModified field will be updated when someone edits the Case, so using the LastModified.Alias will fail after first edit by a user.

There is a field "Case Origin" which you can set when doing the Case Routing setup for Email-to-Case.
a snippet of the case routing setup page showing the Case Origin field
Web to Case has a similar setting.
Default Case Origin : Web

Next question would be who is using Dataloader?
If its just Admins, then add "Dataloader" to the picklist for Case Origin field and set it during the upload.
If others use dataloader and you can't be confident they will set the field correctly, you could play with a trigger on Case which uses the 
System.isBatch() to detect the bulk upload and set the Case Origin field accordingly.

That way you can check the single field for the various options.   If you are worried about it being changed, remove it from the page layouts.  You could use default settings to set it to a given value for internally created cases.



HTH
Andrew
sssssssssssssssssssssss ssssssssssssssssssssssss s
Please note that I want process builder to execute certain functionality when a Case is CREATED using email-to-case/web-to-case.
Also, if a user edits the email-to-case record, i am not worried because process builder would have taken care of what was expected at the time of case creation.

How do I filter out the manually created cases/dataloader from triggering process builder functionality?

In process builder I am able to filter out LastModifiedBy.Alias = 'autocase'.

Is this a robust way to handle both email-to=case & web-to-case?
John Manager Training DepJohn Manager Training Dep
I am also implementing in my organization. I am pretty sure that LastModifiedBy.Alias = 'autocase' is only for email-to-case and web-to-case triggered cases.
Correct me if wrong.
sssssssssssssssssssssss ssssssssssssssssssssssss s
Hi Team,

Any sugesstions?