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 ...
cropredy's user avatar
  • 70.8k
9 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 ...
cropredy's user avatar
  • 70.8k
6 votes
Accepted

How to store (or ignore) Base64 images in emails processed by email-to-case?

Following trigger parses case description for base64 images and creates attachments for case. Email-to-Case functionality stores email body in case description. Let's assume we have next html: <...
Ilya Lepesh's user avatar
  • 4,115
6 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 ...
Doug Ayers's user avatar
  • 4,166
6 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 ...
sfdcfox's user avatar
  • 487k
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
Nishant Singh Panwar's user avatar
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: // ...
Christophe Vidal's user avatar
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 ...
sfdcfox's user avatar
  • 487k
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 ...
Santanu Boral's user avatar
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 ...
Thomas Taylor's user avatar
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 ...
Pranay Jaiswal's user avatar
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 ...
Austin Cutten's user avatar
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 '...
maniac coder's user avatar
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 ...
Kris Goncalves's user avatar
4 votes

Email2Case: How to stop OOO replies updating cases

To fix this issue at the root would be to have your mail server configured in such a way that emails which contain key words, such as 'Out of office', are ignored. Although that would typically be an ...
Andy Hitchings's user avatar
4 votes
Accepted

Workflow Email Alerts Not Log In Email Related list of Case

This is currently missing functionality from salesforce. there is currently an idea on the success.salesforce.com site for this - Salesforce Success The work around that we use here is to make sure ...
Benjy Hunt's user avatar
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 ...
cropredy's user avatar
  • 70.8k
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 ...
gNerb's user avatar
  • 9,471
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 ...
Robbert Dekker's user avatar
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 ...
Renato Oliveira's user avatar
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 ...
payamf1's user avatar
  • 197
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 ...
Jeferson Chaves's user avatar
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/...
Stephen's user avatar
  • 1,551
3 votes
Accepted

Limit for number of routing addresses that can be set up for email to case?

There currently isn't a limit as to the number of routing email addresses that can be set up to create a case, as per the docs. However, the general email limits still apply. So if you had a huge ...
Andy Hitchings's user avatar
3 votes

Case.Thread_Id, is Thread_Id a field on Case object?

There have been several iterations of the thread ID, see this idea, but you shouldn't be using a regular regex, because that may be bad. Here's my suggestion: public static String shortenID(String ...
sfdcfox's user avatar
  • 487k
3 votes

Reparent Attachments from Email record to parent Case Record following EmailtoCase

Since there is very little metadata on an Attachment that is editable (the title and description), it seems as if your issues would be Duplicate storage (if your customers send you big log files as ...
cropredy's user avatar
  • 70.8k
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 ...
Derek F's user avatar
  • 60.9k
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 ...
sfdcfox's user avatar
  • 487k
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 ...
sfdcfox's user avatar
  • 487k
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....
Javier García Manzano's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible