After reading this article you will be able to
- Navigate to Setup
- Create the Email Service
- Setup Email Addresses
- Setup Intercompany Lead Routing entries
Salesforce has two different desktop user interfaces: Lightning Experience and Salesforce Classic. This article is designed for Lightning Experience.
Step One: Navigate to Setup Menu
1. Click the gear icon
2. Click Setup
Step Two: Create the Email Service
1. Type Email Services in the quick find box.
2. Click the Email Services
Note: If there is already an email service there that uses the EmailADFHandler Apex Class then click the Edit link next to it.
3. Click the New Email Service button.
4. Type a name in the Email Service Name field
5. Type EmailADFHandler in the Apex Class fields and click the lookup icon
6. Click EmailADFHandler link
7. Check Active checkbox
8. Check Enable Error Routing checkbox
9. Type the email address to send errors to in the Route Error Emails to This Email Address field
10. Click Save
Note: Get more information on setting up Email Services from Salesforce https://help.salesforce.com/articleView?id=code_email_services_editing.htm
Step Three: Email Service Address
1. Click the New Email Address button from the Email Addresses section of the Email Service details screen
2. Fill in the Required fields
Email Address Name: Name of the record for your reference.
Email Address: Enter the local part of the email address (the part before the "@") and the domain name part will get assigned automatically.
Active: Must be active to receive messages.
Context User: When the automation in the Email Service is run this is the user that it will process as.
Accept Email From: Leave blank unless you want to restrict the senders who may submit leads to this email address.
3. Click Save
Note: If you would like a shortened email address for sharing open a case and provide the full email address. We can provide a similar address with an @dealerteamapp.com domain.
Step Four: Intercompany Lead Routing
Intercompany Lead Routing entries are custom settings that direct each message received to the appropriate Location (including queue) and Lead Type. Each routing entry has a corresponding Email Address in the Email Service. For example, Finance leads for the San Francisco store would get an Intercompany Lead Routing entry and a related Email Address.
1.Type Custom Settings into the Quick Find box in the Setup screen
2. Click the Custom Settings link.
3. Find the Intercompany Lead Routing entry and click the Manage link.
4. Click New
5. Fill in required fields
Name: A descriptive title.
Company Number: The Company Number of the Location assigned to the Sales Up that gets created.
Lead Type: The value of the Lead Type field on the Sales Up that gets created.
Local Name: The same value as the Email Address field from the Email Service Address record (just the part before the "@").
RoutedEmail: The email address that the message was sent to. This will either be the full Email Service Address or a shortened email address that forwards.
NOTE: If you want to assign these newly created Sales Ups to a queue assign it on the Location object.
Learn More About ADF
Learn more about how to format Auto-lead Data Format (ADF) messages.