Setting the Context User and Permissions
Receiving emails into Salesforce via an Apex Email Service requires a Context User, who must have a Salesforce and Email to Case Premium license. This article describes how to set the Context User and how to set the permissions necessary for your Context User's Profile to use Email to Case Premium functionality.
For the Context User, we recommend using a dedicated automated user with the System Administrator profile. The Context User will appear as the created by user for new email, case and comment records created by Email to Case Premium. In most instances, you will want to use the same User Account specified as the Automated Case User in Support Settings.
Setting the Context User
1. Navigate to Setup | Custom Code | Email Services and click on the Email to Case Premium email service utilizing the ProcessMessage Apex Class.
2. Click Edit next to the routing address you're using. Depending on your configuration, you may need to edit multiple addresses.
3. From this screen, you can select a new Context User and Save.
Assigning Permissions to the Context User
The following steps only apply to those who have chosen a Non-System Administrator profile for their Context User.
As mentioned earlier, we recommend using a dedicated automated user with the System Administrator profile. This is in an effort to reduce the chances of encountering issues due to limited permissions and/or your Organization-Wide Defaults for record sharing.
Step 1 - Navigate to Develop | Custom Code | Email Services, and click the ProcessMessage Apex Class.
Step 2 - Click Security.
Step 3 - Add the Profile of the Context User
Step 4 - Provide the Context User with Read, Create, Edit, View All, and Modify All on the Case object, and Read, Create and View All for the Contact Object.