improveit 360 has created an Object to allow you to easily map data coming in on an eLead record to other related records in improveit 360. Note: This is different than needing to parse data within a JSON string. If you need to parse nested data in a JSON string, please see: eLead JSON Field Mapping
- The mapping between eLead and other objects is determined by eLead Field Mapping records (custom metadata type)
- eLead Field Mapping custom metadata type records can be modified either in Setup or by going to the eLead Field Mapping tab
- improveit 360 currently only maps fields to the following Objects: Account, Contact, Lead Source, Address, Sales Opportunity, Inquiry and Sales Appointment.
Included in the Managed Package are the following standard eLead Field Mapping records:
To add additional Fields and mapping rows, first create the custom field on the eLead object as well as on the desired final location (Account, Contact, Lead Source, Address, Sales Opportunity, or Sales Appointment). We recommend naming the fields the same name to alleviate any confusion. Scroll down to the section on How to Add Custom Fields in this Article.
The following fields are Required to create the following types of records:
- Account - Primary Contact
- Contact - Last Name
- Lead Source - Source Type, Lead Source Name
- Address - Street Address, Zip/Postal Code
- Sales Opportunity - Interested In
- Sales Appointment - Address, Appointment Start (Date/Time), Duration
Must include first and last name, interest, source and lead source name and at least one form of contact (email, phone, or address). Appointment cannot be set without an Address.
What does the eLead Trigger do?
On insert of an eLead, the eLeadTrigger Apex trigger inserts a Contact, Account, Lead Source, Address, Sales Opportunity, and Sales Appointment using populated fields from the eLead. If 150 or more eLeads are inserted at once, a Batch (called eLeadBatch) will take over for the trigger.
The "eLead Field Mapping" custom metadata type is used during the eLead conversion process to map eLead field values to fields on other objects, such as Contact. Some elead Field Mapping records are included with the managed package (these mappings apply to the Contact and Address objects are outlined below, while the Lead Source fields listed below are populated programmatically without requiring eLead Field Mapping records). If customers wish for additional mappings, then additional eLead Field Mapping records will need to be created (these can be created from the "eLead Field Mapping" tab).
Duplicate Rules and Matching Rules are used during the eLead Conversion process to identify whether a Contact record matching the eLead already exists. If a duplicate is found, then the eLead will remain Unconverted and manual intervention is needed. Note that if there are no Duplicate Rule records in the system, the code will throw an exception, but the code will also handle this exception so that functionality continues to run uninterrupted. eLeads will need to be manually Converted if potential matches are found. Currently there is no Field Weighting or eLead Matching to existing Accounts and Contacts in the database.
Note that the Trigger Settings "eLead Automatic Conversion" in Custom Settings must be checked for the automated eLead conversion process to run.
eLead Trigger Design
- Contact
- Fields Populated
- First Name
- Last Name
- Phone
- Insert Logic
- eLead Created
- Fields Populated
- Address
- Fields Populated
- Street Address
- City
- State
- Zip
- Contact
- Insert Logic
- eLead Created
- Fields Populated
- Lead Source
- Fields Populated
- Start Date - Today's Date
- Name
- Source
- Source Type
- Trigger Query Logic
- Matching Source Name and Type
- Display End Date is either null, or greater than or equal to Today's date
- Start Date is less than or equal to Today's date
- Insert Logic
- eLead Created
- A new Lead Source is inserted if no matching Lead Source is found in the system.
- Fields Populated
Note: If the "Source" field value as been deactivated on the Lead Source object the eLead will have a Conversion Issue. If the Source value does not match the existing Lead Source record, a new Lead Source record will be inserted with a Source Type value of "Internet" and a Source value of "eLead." Be sure to check the values in the Source Type and Source fields, compared to the payload received on the eLead record.
Look in the eLead Conversion Issue field on the eLead record for more information about why an eLead did not Convert.
Step 1: Add a Custom Field to eLead
First navigate to Setup
Then to the Object Manager menu
Locate the eLead object
Then go to the Fields & Relationships menu
Click the New button
Select the appropriate Data Type.
Give your field a Label and add Help Text for additional context.
Click Next, Next, and Save.
Next, you will need to create the same Field type on the object where this data will eventually reside. In this example I would like the Project Budget data to be populated on the Sales Opportunity record, so this is where I will add the next field.
Step 2: Add a Custom Field to Sales Opportunity
From Setup
Navigate to the Object Manager menu
Choose the Sales Opportunity (or your desired object) then click the New button
Be sure to select the same Data Type you chose in Step 1.
Give your field a Label and add Help Text for additional context.
Click Next, Next, and Save.
Next we will need to create the eLead Field Mapping record which allows the data from the eLEad to be populated on the subsequent records that are created as part of the eLead conversion process.
Step 3: Create the eLead Field Mapping record
Navigate back to the improveit 360 App by using the App Launcher menu:
Now use the App Launcher to go to the eLead Field Mapping Tab
Scroll down to the bottom of the page and click Add New Row
Give your record a Name and select the Field on the eLead object, then select the related Object, then select the Field where the data should be populated.
In my example, I am mapping to the Project Budget field I created on the Sales Opportunity object.
Note: If you do not see your custom field in the drop down, you may need to wait for Salesforce to index your Organization (which typically happens every 24 Hours).
Comments
0 comments
Article is closed for comments.