TN-12:Automatically Creating Cases from Inbound Emails - The salesforce.com CRM On-Demand Platform
Many organizations depend on email communication with their customers for providing initial contact for customer support. While manually reading and managing email-based support requests works for some organizations, many companies prefer to have those inbound requests processed as cases, so that they can be automatically assigned to the appropriate support representative, and tracked will the full benefit of the CRM system. In this tech note, a solution for implementing inbound Email-to-Case via AppExchange will be explored.

Solution Details
Email to case (Email-to-Case) relies on a simple, reliable process for managing inbound support requests. This solution can be described by the following process; emails are sent to a given address (ie support@company.com), emails are processed by either a polling mechanism or procmail script, the email is converted into a supportforce.com cases via the AppExchange Web services API, and finally the new case is processed via supportforce.com workflow and assignment rules.

Email Processing
There are two basic options for designing the Email-to-Case integration. In the first model, called mailbox agent, a script is created that regularly (every 2-5 minutes) polls for new messages to the support email address via standard IMAP or POP3 protocols. In the alternative model, Unix's built-in email scripting capability, known as procmail, is used to fire the processing code whenever a new email is received. Essentially, the former option is polling driven, whereas the later is event driven. Either way, the only difference between the approaches is in how emails are passed to the core business logic; the rest of program is essentially the same.

Like all AppExchange applications, developers are free to choose which Web services development language and platform best suites their needs. Windows and Exchange developers will likely want to look at either .NET or VB based solutions, whereas their Unix developers may wish to look at the Perl or Java based alternatives. Consult the www.salesforce.com/developer site for toolkits and sample in the language of your choice.

AppExchange / Email Integration
Once the inbound email has been obtained, by either technique described above, the next step is to create the corresponding supportforce.com case. (Note for sake of simplicity, this document will only cover new case creation. While it is possible to update an existing case from an inbound email, the details will be left to the reader's imagination.) This process itself has two components; finding the appropriate supportforce.com contact from the inbound email address, and creating a new case associated with that contact.

With the introduction of SOSL in Apex API 2.0, looking up the contact ID for a given email address is a relatively easy - a simple SOSL statement can return the ID of the contact associated with a given email address. If not matching contact is not found, or if the email is associated with a lead and not a contact, its up to the developer to determine the best business process. The simplest approach is likely to associate all unresolved email addresses with a "dummy" contact, and have the support agent create or convert a new contact as appropriate.

With the contact ID, creating a new case via the AppExchange Web service is straightforward. Consult the API documentation and sample code for detailed examples. Note that is always good pratice to include the sender's email address in the body of the case to provide a return contact mechanism in the event that the sender cannot be identified as a contact in salesforce.com.

Configuring Case Handling Workflow
Thanks to the customizability of the salesforce.com application, you can further benefit by implementing Cass Assignment Rules. For instance, you can obtain the account that the contact belongs and determine what level of support they may have purchased. You can then set the appropriate value on the assignment rule trigger field to have that case assigned to the correct owner. Cases created using the Apex API will honor the implemented assignment rules in the salesforce.com application.

To provide assurance to your customer, it is recommended that once the email has been properly dispatched as a case, you generate a response email to the customer. Providing and acknowledgement of receipt that includes a case number for future reference will give your customer confidence that he/she is being serviced effectively. In the return email, and other relevant material can of course be included to optimized the customer experience.

Summary
Implementing the E-mail to Case solution using the AppExchange Web service API an automated way to increate inbound corporate emails with salesforce.com while leveraging all the business rules, searching and usability of Supportforce. Please consult the AppExchange message boards for help or advise in building your own Email-to-Case solutions.

  Privacy Statement | Security Statement   Salesforce.com: 1-800-NO-SOFTWARE  


© Copyright 2000-2007 salesforce.com, inc. Customer Relationship Management (CRM) • All rights reserved
Various trademarks held by their respective owners.