You are here: Home OpenERP Howto automate the creation of current cases you can install the email gateway
Search
Advanced Search…
E-Mail

Webmail: webmail.wyden.com

E-Mail Preferences: postfix.wyden.com/users

E-Mail Administration: postfix.wyden.com

Statistics
Total: 473
Total Pages: 286
Total Folders: 87
Total Files: 18
Total Links: 26
Last modification: 19.04.2012 15:21
 

automate the creation of current cases you can install the email gateway

by Wyden Silvan last modified 21.01.2010 10:43

The email gateway enables you to use Open ERP’s CRM without necessarily using the Open ERP interface. Users can create up-to-date cases just by sending and receiving emails. This system works with the major current email clients such as Microsoft Outlook and Outlook Express, Thunderbird and Evolution.

Installation and Configuration
To use the email gateway you must install it on your server. You can use a variety of methods to configure it. Described here is a simple and generic approach using the Fetchmail program under Linux. You’ll need a system administrator to carry out this work. To start with you have to create an email account (POP3 or IMAP) for each Section that you’ll want to connect an email to. If you have the support email address support@pop.mycompany.comyou’d use the following entries:

• POP server : pop.mycompany.com ,
• User : support ,
• Password : <mypass> .
You’ll also need to choose an Open ERP user that the gateway will use to access your database, such as:
• User Id : 3 ,
• Password : support .


Tip: Identifying a resource
Each resource on the Open ERP system has a unique identifier number. This corresponds to an identifier in the
underlying PostgreSQL database table, in the ID column for that resource. With the web client you can usually find this number by going to the form view of a resource and clicking the View Log button to the top right of the form. The ID is shown at the top of the Information dialog box. (This didn’t work in some of the earlier versions prior to 4.2.3.3.) You can also use the GTK client for this. Viewing any resource, such as a User, you can directly see its ID at the bottom left of the form.

 

Then specify the case section in Open ERP that you’ll use when this user is connected by email, for example, the Helpdesk and Support section. Install Fetchmail on your Open ERP server. You can download it from the address http://fetchmail.berlios.de/.

 

Create a fetchmailrc file that contains the following rules:
# fetchmailrc
poll pop.mycompany.com proto pop3:
username support password mypass mda "/path/to/terpmg/openerp-mailgate.py -u3 -padmin
-ssupport -esupport@mycompany.com"
Then start the fetchmail program, giving it a link to the configuration file that you just created:
fetchmail -f fetchmailrc

 

Creating and maintaining cases
Each time you start fetchmail it downloads all the emails and creates or updates the cases in CRM. You can turn fetchmail into a daemon to check all new emails every five minutes by using the command:

fetchmail -d 300
If you want to receive customer requests by email you must first create a rule that automatically assigns new cases to a specified user. You must then verify that this user possesses a suitable email address in the Address field within Open ERP. To find out if the new email should create a new case or update an existing case, Open ERP analyzes the subject line of the email. Existing cases are identified by the case number in the subject line, for example
Re: [101] Problem with ...
When a customer sends a new request by email the case is automatically created and the email is transferred by the gateway to the user responsible for new cases, changing the subject line to add the case identifier. The user can then respond by emailing or by using the Open ERP interface to the case. If the user responds by email the case can be automatically closed in Open ERP, keeping the responses in the history list. If the partner responds again, the case is reopened.