Loading
Agentforce Contact Center
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Email-to-Case Considerations

          Email-to-Case Considerations

          Review considerations and limitations for Email-to-Case.

          Required Editions

          View supported editions.

          How Email-to-Case Treats Long Emails

          Email-to-Case automatically shortens email body text to 131,072 characters. Email headers have a maximum length of 32,000 characters.

          The 131,072 limit includes HTML encoding and newlines in addition to the text of the email. So when an email is truncated, service reps typically see fewer than 131,072 characters of the email in the email composer or case feed.

          How Email-to-Case Treats Inbound Emails Sent by Salesforce Auto-Response Rules

          Inbound auto-response emails from Salesforce aren’t attached to cases. If an inbound email is identified as an auto-response, Email-to-Case ignores it, regardless of whether it came from the same Salesforce org or a different one. The inbound email isn’t attached to the related case and doesn’t create a new case.

          EmailMessage Status Field

          The status of a sent email will initially be set to Sent regardless of whether the action was reply or forward. This status may be updated later if the email is replied to or forwarded. The status is a representation of the latest action that occurred on that email.

          Inbound Email To and CC Address Storage

          Addresses for inbound email exhibit these behaviors.

          • Duplicate email addresses, including email addresses with different display names, are removed so that each email address stored in the EmailMessage record is unique.
          • The original ordering of email addresses from inbound and outbound email can change. Customizations you build, as well as variations in the way email data is stored and displayed, can all cause changes in the ordering.
          • BCC addresses aren’t stored for inbound emails because those addresses aren’t available to the recipient.

          Using Multiple Support Addresses

          Tip
          Tip Sending an email to multiple Email-to-Case routing addresses isn’t recommended.

          If you set up more than one email routing address, ask your customers to email only one address at a time, and include only one routing address in their email thread. Sending an email to more than one routing address isn’t recommended because Email-to-Case creates duplicate cases but threads only to the case with the most recent email activity.

          A better approach is to have your customers send emails to a single routing address. That way, each customer issue gets its own case, and email responses are threaded to that case as expected. If your intent in using multiple addresses is to engage multiple support teams, consider setting up case teams. Or create tasks or use a custom object on your cases to track related work items.

          Order of Record Creation in Email-to-Case

          When developing custom code, it helps to understand the order in which Email-to-Case creates records.

          When an incoming email is sent to a support address, Email-to-Case determines if it’s associated with an existing case. When there’s no matching case:

          1. Email-to-Case creates a Case record and populates case fields.
          2. Email-to-Case creates an EmailMessage record for the received email.
          3. Email-to-Case creates a Task record if Create Task from Email is enabled for the routing address.
          4. Email-to-Case creates Attachment or ContentDocument records if the email includes attachments. If the option is selected to create attachments as Salesforce files, Email-to-Case creates ContentDocument records for the attachments. A ContentDocumentLink record links the ContentDocument record to the EmailMessage record.

          For an outbound email message, the Email Message record is created after the email is sent. While you can use Apex triggers to update stored Email Message records, you can’t use them to modify sent emails.

          How Email-to-Case Handles Processing Errors

          If Email-to-Case receives a Salesforce platform or database error when processing an incoming email, it retries multiple times over a 30-hour period. If Email-to-Case still can’t process the email, it notifies the automated case user.

          Email-to-Case doesn’t retry for these errors.

          • Errors that result from configuration issues or custom code, such as validation errors, Apex trigger errors, or duplicate value errors.
          • Non-recoverable errors, such as an invalid email address in the incoming email.
          • Errors that stem from exceeding Salesforce email limits, such as Email-to-Apex limits.
          • Errors that result from an external or Salesforce email infrastructure because they occur before the email reaches Email-to-Case.

          Using the Gmail Integration with Email-to-Case in Salesforce Classic

          When you relate an email to a case, the email is added as an activity. The email appears in the Emails and the Activity History related lists. If you unrelate the email in Gmail, the email is no longer in the Email related list, but it remains in the Activity History related list.

          Using the From Field in the Email Quick Action

          All users can use a verified Email-to-Case service email address in the From field on the Email quick action. For example, if you add support@mycompany.com as a routing address, all service reps can select that address in the From field when emailing a customer.

          The From address picklist is sorted in this order:

          1. Current sender primary email address, followed by the return address if it’s different from the primary email address.
          2. Allowed Email-to-Case addresses, ordered by email display name.
          3. Allowed Org-wide email addresses, ordered by email display name.

          The From email address is replaced with the Reply-To email address if two conditions are met: 

          • The From email address of an EmailMessage is the same as a routing address in the org.
          • The Reply-To email address is not blank.

          If other email addresses in an org, such as a user’s address or an org-wide address, are the same as an Email-to-Case routing address, the From address picklist shows only the Email-to-Case routing address. Even if the other addresses have different display names, the picklist shows only the routing address. Similarly, if a user address and an Org-wide address are the same, the picklist will show only User emails. This behavior is limited to Lightning Experience.

          Tip
          Tip Using the same email address for Email-to-Case routing and for other purposes isn’t recommended because doing so can result in email loops.

          Some Email Addresses Are Stripped Out on Email-to-Case Replies

          When replying using Email-to-Case, some email addresses can be stripped from the To and Cc fields. Salesforce removes these types of email addresses when replying.

          • Email-to-Case routing addresses
          • Organization-wide addresses
          • The email address of the logged in Salesforce user replying to the email

          This functionality was implemented to reduce redundancy on the Case record and to prevent email loops from occurring.

          Automate Bulk Email with the QuickActionRequest Class

          You can send a maximum of 250 emails per hour using Email-to-Case. If you need to send more than 250 emails per hour, automate emails with the QuickActionRequest class. Use the QuickActionRequest class to send emails programmatically without reaching the hourly limit.

          Differences When Using Email-to-Case in Trial Orgs

          In trial orgs, the Routing Name of a routing address is set as your email address and can’t be edited.

           
          Loading
          Salesforce Help | Article