Automatically Creating Cases From Inbound Emails
When a person sends an email message to a monitored email account, Sugar can automatically create a case and send a reply email to the sender.
Overview
Sugar® can be configured to monitor group email accounts and then perform a corresponding action. One of the most useful applications for this behavior is the email-to-case functionality. This article explains how to configure Sugar to automatically create a new case record when it receives an email message.
Emails sent to a monitored group mail account will be automatically converted into a Sugar case record related to the account that corresponds to the sender's email address. The new case will be assigned to a user on the preferred team in a round-robin fashion, or Sugar can assign the case to the user with the smallest caseload.
Beginning with version 9.1.0, each user's license type (e.g. Sugar Serve) determines what functionality is available as described in the License Types Matrix documentation. Please note that the Cases module is only available for Sugar Sell users on Sugar Sell 12.0 and higher.
Preconditions
There are several items that must be properly configured before setting up the email-to-case functionality:
- You must be an administrator user.
- A team must be set up whose members are the users you wish to be assigned to the created cases.
- Sugar's outbound email must be configured via Admin > Email Settings.
- Schedulers, specifically the Inbound Email Scheduler, must be running.
For more information on these configurations, please refer to the User Management, Team Management, Email, and Schedulers documentation.
Optionally, you may also want to create a template for automated email responses. When a person sends an email message to the monitored email account, Sugar can send a reply email notifying the sender that a case has been created as a result of their message. If you wish to use the auto-reply feature, you must first create the email template via Emails > Create Email Template. For more information on creating email templates in Sugar, refer to the Emails documentation.
Steps to Complete
-
Configure the inbound email account that Sugar will monitor by navigating to Admin > Inbound Email. From the actions menu, choose "New Group Mail Account".
- Configure the fields in the Mail Account Information section. All required fields are marked with a red asterisk in Sugar and must be completed prior to saving.
Note: If your mail account is using Gmail, click "Prefill Gmail™ Defaults" to populate many fields with default values that are specific to Gmail.
Field |
Description |
Name |
Enter a descriptive name for this group email account in the Name field. |
Status |
Set "Status" to "Inactive" until you have completely and accurately configured the group email account and are ready to start creating cases from emails. |
Mail Server Address |
Enter the monitored email account's incoming email server web address (this is often in the format "mail.example.com"). |
User Name |
Enter the username for the email account that will be receiving email messages. |
Password |
Enter the password for the email account that will be receiving email messages. |
Mail Server Port |
Enter the communication port number used for connecting to the email server. This option will pre-populate with the most common port number as determined by your protocol choice. If you are not sure what port number to use, then leave it set to this default port number. |
Mail Server Protocol |
Select the method used to access email. This option will determine how you will be able to interact with your email account once a message has been received.
For IMAP configuration only, you must select the existing mailbox folder that you wish to monitor from the Monitored Folders field, and specify which folders your email account uses for the Trash and Sent folders. Additionally, you must decide whether to select the Use SSL checkbox. If your email server supports secure socket connections, enabling this option will force SSL connections when importing email. If you are not sure whether your server supports SSL, then leave this field blank. |
- Configure the fields for the Email Handling Options section. All required fields are marked with a red asterisk in Sugar and must be completed prior to saving.
Field |
Description |
Assign To Teams |
Select the teams that should have access to this email account in Sugar. |
From Name |
For sent emails that may be triggered by an action, specify the display name that will appear in the "From" address section in the recipient's email client, such as "Customer Support". |
From Address |
Depending on your email service provider, you may be able to specify a unique email address to appear in the "From" address section of sent emails. Some email service providers do impose restrictions on this practice, in which case the email address defined in your system's outgoing email server will be used. |
Reply-to Name |
Enter the display name that you would like to appear for any replies to the auto-reply template. |
Reply-to Address |
Enter the email address that you would like to use to receive any replies to the auto-reply template. This should be a different email address than the From Address to prevent creating duplicate cases. |
Import Emails Automatically |
Select this option if you would like to automatically archive the received email to Sugar. Note: Even with this enabled, schedulers are still required to run routinely to import emails and create cases. |
Create Case from Email |
You must select this option to automatically create case records in Sugar from incoming emails. Selecting this option will reveal two additional fields.
|
Auto-Reply Template |
In addition to the "New Case Auto-Reply Template" explained above, you may also choose to send an automatic reply email letting the sender know that their email has been received. This field does not recognize the template as a new case reply and therefore does not insert case macro markup in the subject line. Be aware that this second auto-reply may cause confusion or be a nuisance to the sender if it is too similar to the new case responder. |
No Auto-Reply to this Domain |
If you would like to exclude a certain domain from receiving an automatic email response, enter that domain name here. For Sugar versions 13.0.0 and higher, you can enter multiple domains separated by commas. It is common to specify your organization's domain to prevent auto-replies from being sent to your organization's members. |
Number of Auto-Responses |
Enter the maximum number of times you want Sugar to send an auto-reply to a unique email address in a 24-hour period. |
- Before saving, click "Test Settings" to verify your entries. If the test is a success, the message "Connection completed successfully" will appear. If the test fails, go back and review your work until your test is successful. For help troubleshooting your mail settings, refer to the Inbound Email in SugarCRM section of the Knowledge Base or consult the IT department of your organization.
- Set the record's "Status" to "Active" (when ready) and then click "Save".
Application
When a customer sends an email to support@yourcompany.com, Sugar will create a new case record and notify the assigned user as well as the customer (optionally) that a case has been created. The subject line of the received email will be imported as the case "Name" and the text in the email body will be imported as the case "Description". The incoming email message will also be archived to the new case. If that email contains attachments, the attachments are included on the archived email record.
Note: To ensure that an account record is properly associated with the case at the time the case is created, the email address of the contact sending the email must be related to the account record (not the contact record).
To confirm that the email-to-case functionality is properly configured, send a test email to the email address you specified as the monitored group mail account. The next time the "Check Inbound Email Accounts" scheduler runs, Sugar will find the incoming message and create a case assigned to the appropriate user as determined by the distribution method. Navigate to the Emails list view to check that the case was created. You can confirm a case was created if [CASE:xxx] is in the subject line and there is a relationship between the email and case.
If Sugar does not create a case after you have sent a test email and you have confirmed that the scheduler has run, refer to the Troubleshooting the Inbound Email Scheduler article for assistance. If the scheduler is not automatically running, refer to the Troubleshooting Cron and Schedulers article for assistance.