10
votes
how to deploy Email-to-case settings in other sandbox?
Email-to-Case Settings can be deployed using the Settings Metadata API Object specifically CaseSettings.
However, there are issues:
(As of V49)
No MDAPI support for the default recordtype - you would ...
10
votes
Accepted
How to obtain trigger log from Email2Case?
The running user for Email to Case is found in Setup | Customize | Cases | Support Settings under the field Automated Case User if you are using On-Demand E2C
The user listed in the Case History ...
7
votes
Accepted
custom Email Service - inline images appear as '[Image is no longer available]' upon Reply/ReplyAll
This is how I solved the problem, after saving off the attachments then I updated the message body to replace the cid references with URL to the files. For some magical reason, Salesforce will ...
7
votes
Accepted
Code optimisation on EmailMessage
Don't Skimp on Curly Brackets
You may think that you're saving some space/typing with:
if (em.Incoming)
caseIds.add(em.parentId);
But you're actually risking a very subtle bug. Commenting a ...
6
votes
Accepted
Who runs Email-to-Case
You can check the Support Setting and look for "Automated Case user" that user is used for Email-to-Case
5
votes
Case.Thread_Id, is Thread_Id a field on Case object?
Only reliable way to get the Thread Id at this time is when getting the result from Salesforce itself. You can do this by getting the result that Salesforce would generate when sending an Email:
// ...
5
votes
Accepted
Close Case If No Reply Within 48 Hours?
You can do this using nothing but configuration via the Process Builder.
Step 1: Create Timer Field
On the Case object, create a date time field with no default value.
Step 2: Create Process 1
In ...
5
votes
Accepted
Email to case issue: Finding actual email id for which case is getting created
Let's say, Email-to-Case set up is like this:
And user is sending single email to both the address [email protected] and [email protected].
So, there are 2 cases will be created and you if see any one ...
5
votes
Accepted
Changing Email service address after turning on My Domain
No, the email service addresses for email-to-case will not change. The org I work in now has My Domain, and a bunch of old email-to-case addresses that still work. (In fact, in checking, I realized ...
5
votes
how to deploy Email-to-case settings in other sandbox?
No, it looks like we can't deploy them via changesets and any other tool.
The best you can do is deploy via Force.com migration tool is EmailServicesFunction which contains EmailToCase and ...
5
votes
Accepted
Sandbox Email-to-Case service does not relate the received Email to existing Case
Substituting the right 11 characters from the org id doesn't always work. Use 10 characters instead. The reason is that the 5 and the 11 will overlap causing a double up of the 5th character!
Use ...
5
votes
Accepted
What is the proper usage of a field that is prefixed with "Source"? Ex: Source.ToAddress
In general terms, the 'Source' refers to the channel from where Case was created.
Technically the error is saying there is no Object Type for 'ToAddress'. However, 'ToAddress' is a standard field on '...
5
votes
Accepted
Is there a way to detect, via SOQL query or describe, whether Email-to-Case is turned on in an org?
You could look at EmailServicesAddress and EmailServicesFunction.
SELECT Id, FunctionName, isActive
FROM EmailServicesFunction
The above will return a row with the following info when E2C is ...
4
votes
Accepted
Email2Case - Create new case on replies after X amount of days
I can tell you how we do this.
We have a custom emailHandler that processes emails as they come in. Our email handler checks to see if the email relates to a closed case and re-opens it. It would be ...
4
votes
Accepted
Disable assignment rule(s) and default owner when using email-to-case?
I've solved this as follows
Recognize that triggers run before assignment rules and E2C will run assignment rules.
In before insert trigger, set custom field Bypass_Assignment_Rules__c to true for ...
4
votes
Email to Case (on demand) forwarding via Outlook rules
I think your issue might be with how you're handling the inbound email from Outlook/Exchange. If you're "Forwarding" the email to the unique SFDC email address, then it is in fact coming from your ...
4
votes
Email to case routing address wont create Case in salesforce
From the comments, it seems the issue is with Email-to-Case setup, not the routing. You can troubleshoot with this Salesforce knowledge article.
Troubleshooting Email-to-Case on Demand not creating ...
4
votes
Not able to query attachment coming from email to case
If you are on Lightning Experience, the attachments are being saved on a different object/table called ContentDocument.
The binary data itself is stored in a related object called ContentVersion, and ...
4
votes
Omni Channel Supervisor not showing assigned queues for an agent
This is due to the fact that one the User record you may not have "Service Cloud User" checked. You need to make sure both "Chat User" and "Service Cloud User" is checked ...
4
votes
Accepted
Insert Thread ID in the Email Subject option not visible on Email-to-Case
As far as I can see there is a new default for any org created after Winter'21 (which is the release being deployed by Salesforce).
Long story short: I think you cannot change it, if your org is ...
3
votes
Create case records from report or Spreadsheet?
You can use any of data loader tools.
There is the Apex Data Loader:
https://developer.salesforce.com/page/Data_Loader
The Data Import Wizard(in browser):
https://help.salesforce.com/apex/...
3
votes
FIELD_CUSTOM_VALIDATION_EXCEPTION
You are directly causing this error (if I recall, you were looking to create some unit tests for this trigger). As noted in the comments, the text of the error message matches the text that you're ...
3
votes
Accepted
How can I add a Case Comment to a case with email-to-case?
You should be using {!Case.Thread_Id} in your email templates. The formula in the link you provided was not provided by salesforce.com, but just a random customer that felt they wanted to demonstrate ...
3
votes
Accepted
Copy Values from Case Description Field to custom fields on Case
You're splitting on ':', so your key won't match. Change your values to exclude the ':':
'Media Request Type' => 'Media_Request_Type__c',
Alternatively, you might consider using a ...
3
votes
To Update fields on Case from email Body on Email to Case functionality?
I think your best option might be to set up a trigger in the Case object so everytime a case is inserted from the Email2Case service you can parse the body and populate the required fields as you wish....
3
votes
Can you sort a Case List View by date time of the latest received email?
You can't do this "out of the box," but you also don't need a custom page. Instead, you just need a custom field and a bit of configuration. First, create a new DateTime field on Case for "latest ...
3
votes
Accepted
Case Assignment rules not working when I use "Email Message: To Address"
Pankaj,
You are right about order of operations. I'm not sure of a an easy method without resorting to Apex.
This could also be accomplished using a custom InboundEmailHandler class (developer doc)...
3
votes
Accepted
Email-To-Case - how to find if it's enabled
Using the Metadata API, you can get CaseSettings.
If On-Demand Service is enabled you can use the following.
You can query EmailServicesFunction object to see if there is an entry for EmailToCase. ...
3
votes
One Email-to-case should assign to 2 queues
Email-to-case always runs Case Assignment rules so all you need is an assignment rule that inspects Subject using Contains operator for Electronic and assign to the new queue.
Note that a case can ...
3
votes
Accepted
Order of Execution when creating a case from email-to-case
The order is follows,
The case is created.
The email message is created with the parentId.
The case sourceId will be populated.
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
email2case × 445case × 106
email × 92
apex × 70
trigger × 51
apex-email-service × 33
emailmessage × 27
servicecloud × 25
case-object × 21
workflow × 14
email-template × 14
visual-workflow × 13
case-auto-response × 13
service-cloud-console × 12
attachment × 11
email-alert × 10
unit-test × 7
singleemailmessage × 7
casefeed × 7
visualforce × 6
process-builder × 6
before-trigger × 6
files × 6
service × 6
soql × 5