This tutorial explains what email adapter is and how to configure it. It also describe the process of setting the email service on Salesforce.
What is email adapter?
Email adapter is support-sending email to Salesforce using an attachment (source file) to carry the business data. The functionality is to pass parameters to the email subject and body. You can pass business data with the subject and body. As soon as the Email arrives, the data import is initiated automatically.
1. Create Email Services #
The configuration of email service on Salesforce
This section will be explained the process of configuring the Email-Service on Salesforce.
You can follow the steps given below:
- Log in to Salesforce and go to Setup then, click on Setup -> search in box ‘Email Services’ -> click ‘New Email Service’
- Create the ‘Email Service’
- There are some field you must know on Email Service Information Page:
– Email Service Name: E.g. Email_adapter
– Apex Class: search for “IAdapterEmailDataLoader”
– Accept Attachments: All
– Check icon ‘Active’
– On Failure Response Setting: Click on Dropbox field and configure how Salesforce response when an attempt to access this email service falls for the reason show
below.
– Click on “Save and New Email Address”
Note: If you did not Check icon ‘Active’ the Email Service is created deactivated in this case you can of the active manually.
- Continua to create the ‘Email Service Address’
Note: When creating an ‘Email Service Address,’ if you input an email address in the ‘Accept Email From’ box, you will be able to send records only for those specific emails into Salesforce.
- On the other hand, you can create the ‘Email Service’ without putting the email address in the ‘Accept Email From’ box as well.
Note: If we do not input the email address into ‘Accept Email From’ box, you will be able to send records for multiple emails into Salesforce.
- After click button ‘Save’
2. Create an Inbound Email Adapter #
Click on Adapter tab:-
- Fill: Name, Choose: ‘EMAIL’, Status: ‘Active’, Direction: ‘Inbound’
- Select File type as CSV and separator comma(,)
3. Create the Integration. #
4. Create Inbound Interface link with adapter. #
Note: The Interface API v2 supports file types such as CSV and XML, while the Interface API v3 supports file types including CSV, XML, and JSON.
- On the Integration, after creating Inbound interface and link with Email adapter.
5. Subject Line of your Email #
Accept the email address from salesforce.com by email. The subject line of the email should read as follows: integration=IntegrationName;Interface=Name_of_Interface
Note: Provide the IntegrationName and the name of the Interfaces.
– Attach the file of record that you want to import and send the email.
- After successful sending, it will create a message in the message monitor.
1. E-mail address generated by Salesforce (see page 1).
2. integration=your_IntegrationName;Interface=Name_of_Interface.
3. Record that you want to import (must be the same in structure implements our interface).
– In addition, send the email.
Note: Be sure to test the mapping of your integration first (manual upload). If this works, then get to work with the mail import