SlideShare a Scribd company logo
Dan Donin
Business Systems Analyst
Stalk me:
Dan.Donin@Jivesoftware.com
https://www.linkedin.com/in/danieldonin
Building a Pre-Lead Workspace
How to keep incomplete lists out of your lead object and not force people to work out of excel.
Forward-Looking Statements
Statement under the Private Securities Litigation Reform Act of 1995:
This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any
of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking
statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or
service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for
future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts
or use of our services.
The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our
service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth,
interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible
mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our
employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com
products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of
salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most
recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information
section of our Web site.
Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not
be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available.
Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
Incomplete Lists
• Everyone gets incomplete lead lists
• Loading these into the Lead object is a quick way to dirty data
• Working these lists in excel makes it difficult to track and measure metrics
How Do We Fix This?
A Pre-Lead Workspace Object
What makes up this
solution
• Custom Object
• Custom Fields
• Validation Rules
• Process Builder
• A small chunk of
Apex (Optional)
How it Looks to Users
We Call it “The Island”
• The only relationship
is to the user table
• Keeps dirty data out of
our lead object!
The Magic
Let PB do the heavy lifting
• Once enough data is collected it will flow
into the lead object on its own!
We want to check when the record is added
or updated
The Process!
We want to check when the record is added
or updated
We use customized logic in this case to make
sure that State is filled when the country is
United States
1 AND 2 AND 3 AND 4 AND 5 AND 6 AND 7
AND (8 OR (9 AND 10))
We just map the fields on the Lead object to
the reference fields from the PLW record!
All of it in Action!
Thank Y u
Details on building a
PLW of your own
Object Detail
Formula Fields Formula’s
Possible Existing Lead/Contact -
IF(Count__c > 1,
HYPERLINK('https://na35.salesforce.com/_ui/search/ui/UnifiedSe
archResults?searchType=2&sen=001&sen=00Q&sen=01t&sen=
003&sen=a14&sen=005&sen=006&sen=800&sen=701&sen=a2I
&sen=a0z&str='&Email__c,
'Multiple Dupes Found'),
IF( Possible_Dupe__c <> NULL,
HYPERLINK('https://na35.salesforce.com/'&Possible_Dupe__c,'h
ttps://na35.salesforce.com/'&Possible_Dupe__c), NULL))
Record Sync’d –
IF( TEXT(Status__c) = "SFDC Ready", "This Record has already
been sync'd. Please " +
HYPERLINK("/_ui/search/ui/UnifiedSearchResults?searchType=
2&str=" + Email__c, " find the new record") + " in
Salesforce.",IMAGE("/servlet/servlet.FileDownload?file=0154100
00001RFl","Requirements"))
trigger DupeIslandCheck on Pre_Lead_Workspace__c (beforeinsert, before update) {
/* Checks email address agaisnt Leads/Contacts for possible Dupes. This only does a simple email check.
* if it finds any matches it dumps the Lead/Contact ID into a field that then displays the salesforce URL on the record*/
//Thanks to Kevin Purdy for helping me on this he is a boss.
List<Pre_Lead_Workspace__c> sdrListLoad = new List<Pre_Lead_Workspace__c>();
// Quick lookup referencefrom email to record
Map<String, Pre_Lead_Workspace__c> sdrMap = new Map<String, Pre_Lead_Workspace__c>();
// Flat set of new emails coming in to check
Set<String> sdrEmails = new Set<String>();
//Now to check for Update vs Insert. On Update only check for Email Change on Insert check for Email Null
If(Trigger.isUpdate){
For(Pre_Lead_Workspace__c sdr : Trigger.New){
//Populate Trigger Old to compare
Pre_Lead_Workspace__c oldSdr = Trigger.oldMap.get(sdr.id);
//If Email is set to Null clear out SDR Count and Possible Dupe without a lookup.
If(oldSdr.Email__c != Null && sdr.Email__c == Null){
sdr.Count__c = 0;
sdr.Possible_Dupe__c = Null;
}
//Now check if Email Changed 4/27 Also added if the recordis older than a day not to fire if the Email is Null
Else If(sdr.Email__c != Null && oldSdr.Email__c != sdr.Email__c || sdr.Email__c != Null && oldSdr.LastModifiedDate < Date.today().addDays(-1)){
sdrMap.put(sdr.Email__c, sdr);
sdrEmails.add(sdr.Email__c);
sdr.Count__c = 0;
sdr.Possible_Dupe__c = Null;
}
}
} Else If(Trigger.isInsert) {
For(Pre_Lead_Workspace__c sdr : Trigger.New){
If(sdr.Email__c != Null) {
sdrMap.put(sdr.Email__c, sdr);
sdrEmails.add(sdr.Email__c);
}
}
}
//Map the matches 4/27 added in != NULL to try and fix a forever index
Map<String, Lead> leadMap = new Map<String, Lead>([SELECTId, Email FROM Lead WHERE Email IN :sdrEmails AND isConverted = FALSE AND Email != NULL]);
Map<String, Contact> contactMap = new Map<String, Contact>([SELECTId, Email FROM Contact WHERE Email IN :sdrEmails AND Email != NULL]);
//Iterate our duplicates and tie them back to the recordsthat triggered them
For(StringmysteryKey : leadMap.keySet()) {
Lead l = leadMap.get(mysteryKey);
Pre_Lead_Workspace__c sdrWithDupe = sdrMap.get(l.email);
// Do something with the duplicate
sdrWithDupe.Possible_Dupe__c = l.id;
if (sdrWithDupe.Count__c == Null) {
sdrWithDupe.Count__c = 0;
}
sdrWithDupe.Count__c++;
}
For(StringmysteryKey : contactMap.keySet()){
Contact c = contactMap.get(mysteryKey);
Pre_Lead_Workspace__c sdrWithDupe = sdrMap.get(c.email);
// Do something with the duplicate
sdrWithDupe.Possible_Dupe__c = c.id;
if (sdrWithDupe.Count__c == Null) {
sdrWithDupe.Count__c = 0;
}
sdrWithDupe.Count__c++;
}
}
@isTest
public class DupeIslandCheckTest {
static testMethod void DupeIslandCheckTest(){
Lead testLead = new Lead(FirstName= 'Testy', LastName= 'McTesterson', Email='FindThisDupe@abc.com',
Company = 'This Will be Found');
Lead testLead2 = new Lead(FirstName = 'Testy', LastName= 'McTesterson2', Email='DontThisDupe@abc.com',
Company = 'This Wont be Found');
Contact testContact = new Contact(FirstName = 'TestyMc' , LastName = 'Testerson', Title = 'TestyMcTesting',
Email = 'FindThisDupe2@abc.com');
Contact testContact2 = new Contact(FirstName = 'TestyMc' , LastName = 'Testerson2', Title = 'TestyMcTesting',
Email = 'DontThisDupe2@abc.com');
insert testLead;
insert testLead2;
insert testContact;
insert testContact2;
Pre_Lead_Workspace__c testSDR = new Pre_Lead_Workspace__c(First_Name__c = 'Lead1', Email__c='FindThisDupe@abc.com', Count__c = NULL);
Pre_Lead_Workspace__c testSDR2 = new Pre_Lead_Workspace__c(First_Name__c = 'Lead2', Email__c='DontFindAnything@abc.com', Count__c = NULL);
Pre_Lead_Workspace__c testSDR3 = new Pre_Lead_Workspace__c(First_Name__c = 'Lead3', Email__c='FindThisDupe2@abc.com', Count__c = NULL);
Pre_Lead_Workspace__c testSDR4 = new Pre_Lead_Workspace__c(First_Name__c = 'Lead4', Email__c='DontFindAnything2@abc.com', Count__c = NULL);
insert testSDR;
insert testSDR2;
insert testSDR3;
insert testSDR4;
testSDR.Email__c = 'DontFindAnything@abc.com';
testSDR2.Email__c = 'FindThisDupe@abc.com';
update testSDR;
update testSDR2;
testSDR.Email__c = NULL;
update testSDR;
}
}
Trigger
Test Class

More Related Content

Similar to Move Out of Excel and into a Pre-Lead Workspace by Dan Donin

Performance Tuning for Visualforce and Apex
Performance Tuning for Visualforce and ApexPerformance Tuning for Visualforce and Apex
Performance Tuning for Visualforce and Apex
Salesforce Developers
 

Similar to Move Out of Excel and into a Pre-Lead Workspace by Dan Donin (20)

Formula Ninja at Dreamforce 2014
Formula Ninja at Dreamforce 2014Formula Ninja at Dreamforce 2014
Formula Ninja at Dreamforce 2014
 
Modeling and Querying Data and Relationships in Salesforce
Modeling and Querying Data and Relationships in SalesforceModeling and Querying Data and Relationships in Salesforce
Modeling and Querying Data and Relationships in Salesforce
 
Performance Tuning for Visualforce and Apex
Performance Tuning for Visualforce and ApexPerformance Tuning for Visualforce and Apex
Performance Tuning for Visualforce and Apex
 
Improving Enterprise Findability: Presented by Jayesh Govindarajan, Salesforce
Improving Enterprise Findability: Presented by Jayesh Govindarajan, SalesforceImproving Enterprise Findability: Presented by Jayesh Govindarajan, Salesforce
Improving Enterprise Findability: Presented by Jayesh Govindarajan, Salesforce
 
ここまでできる!Salesforce Connect 最新機能 (Winter'17) のご紹介
ここまでできる!Salesforce Connect 最新機能 (Winter'17) のご紹介ここまでできる!Salesforce Connect 最新機能 (Winter'17) のご紹介
ここまでできる!Salesforce Connect 最新機能 (Winter'17) のご紹介
 
Salesforce1 Platform: Data Model, Relationships and Queries Webinar
Salesforce1 Platform: Data Model, Relationships and Queries WebinarSalesforce1 Platform: Data Model, Relationships and Queries Webinar
Salesforce1 Platform: Data Model, Relationships and Queries Webinar
 
Data Design Tips for Developing Robust Apps on Force.com
Data Design Tips for Developing Robust Apps on Force.comData Design Tips for Developing Robust Apps on Force.com
Data Design Tips for Developing Robust Apps on Force.com
 
A G S006 Little 091807
A G S006  Little 091807A G S006  Little 091807
A G S006 Little 091807
 
Mbf2 salesforce webinar 2
Mbf2 salesforce webinar 2Mbf2 salesforce webinar 2
Mbf2 salesforce webinar 2
 
Look Ma, No Apex: Mobile Apps with RemoteObject and Mobile SDK
Look Ma, No Apex: Mobile Apps with RemoteObject and Mobile SDKLook Ma, No Apex: Mobile Apps with RemoteObject and Mobile SDK
Look Ma, No Apex: Mobile Apps with RemoteObject and Mobile SDK
 
Using AI for Providing Insights and Recommendations on Activity Data Alexis R...
Using AI for Providing Insights and Recommendations on Activity Data Alexis R...Using AI for Providing Insights and Recommendations on Activity Data Alexis R...
Using AI for Providing Insights and Recommendations on Activity Data Alexis R...
 
Solving Complex Data Load Challenges
Solving Complex Data Load ChallengesSolving Complex Data Load Challenges
Solving Complex Data Load Challenges
 
Visualforce Hack for Junction Objects
Visualforce Hack for Junction ObjectsVisualforce Hack for Junction Objects
Visualforce Hack for Junction Objects
 
Lightning時代のService Cloud概要とカスタマイズ
Lightning時代のService Cloud概要とカスタマイズLightning時代のService Cloud概要とカスタマイズ
Lightning時代のService Cloud概要とカスタマイズ
 
Introduction to Apex for Developers
Introduction to Apex for DevelopersIntroduction to Apex for Developers
Introduction to Apex for Developers
 
Developing Offline Mobile Apps With Salesforce Mobile SDK SmartStore
Developing Offline Mobile Apps With Salesforce Mobile SDK SmartStoreDeveloping Offline Mobile Apps With Salesforce Mobile SDK SmartStore
Developing Offline Mobile Apps With Salesforce Mobile SDK SmartStore
 
Df12 Performance Tuning
Df12 Performance TuningDf12 Performance Tuning
Df12 Performance Tuning
 
Aan009 Contreras 091907
Aan009 Contreras 091907Aan009 Contreras 091907
Aan009 Contreras 091907
 
Apex 10 commandments df14
Apex 10 commandments df14Apex 10 commandments df14
Apex 10 commandments df14
 
Get ready for your platform developer i certification webinar
Get ready for your platform developer i certification   webinarGet ready for your platform developer i certification   webinar
Get ready for your platform developer i certification webinar
 

More from Salesforce Admins

More from Salesforce Admins (20)

Admin Best Practices: Dashboards for Every Admin
Admin Best Practices: Dashboards for Every AdminAdmin Best Practices: Dashboards for Every Admin
Admin Best Practices: Dashboards for Every Admin
 
Admin Best Practices: Building Useful Formulas
Admin Best Practices: Building Useful FormulasAdmin Best Practices: Building Useful Formulas
Admin Best Practices: Building Useful Formulas
 
Admin Best Practices: 3 Steps to Seamless Deployments
Admin Best Practices: 3 Steps to Seamless DeploymentsAdmin Best Practices: 3 Steps to Seamless Deployments
Admin Best Practices: 3 Steps to Seamless Deployments
 
Awesome Admins Automate: Integrate Flow with AI and Chatbots
Awesome Admins Automate: Integrate Flow with AI and ChatbotsAwesome Admins Automate: Integrate Flow with AI and Chatbots
Awesome Admins Automate: Integrate Flow with AI and Chatbots
 
#AwesomeAdmins Automate: Create Triggered Flows and Batch Jobs
#AwesomeAdmins Automate:  Create Triggered Flows and Batch Jobs#AwesomeAdmins Automate:  Create Triggered Flows and Batch Jobs
#AwesomeAdmins Automate: Create Triggered Flows and Batch Jobs
 
Admin Best Practices: Introducing Einstein Recommendation Builder
Admin Best Practices: Introducing Einstein Recommendation BuilderAdmin Best Practices: Introducing Einstein Recommendation Builder
Admin Best Practices: Introducing Einstein Recommendation Builder
 
Admin Best Practices: Remove Security Risk From Your Org with a User Audit
Admin Best Practices: Remove Security Risk From Your Org with a User AuditAdmin Best Practices: Remove Security Risk From Your Org with a User Audit
Admin Best Practices: Remove Security Risk From Your Org with a User Audit
 
Essential Habits for New Admins
Essential Habits for New AdminsEssential Habits for New Admins
Essential Habits for New Admins
 
Essential Habits for Salesforce Admins: Actionable Analytics
Essential Habits for Salesforce Admins: Actionable AnalyticsEssential Habits for Salesforce Admins: Actionable Analytics
Essential Habits for Salesforce Admins: Actionable Analytics
 
Essential Habits for Salesforce Admins: Security
Essential Habits for Salesforce Admins: SecurityEssential Habits for Salesforce Admins: Security
Essential Habits for Salesforce Admins: Security
 
Essential Habits for Salesforce Admins: Data Management
Essential Habits for Salesforce Admins: Data ManagementEssential Habits for Salesforce Admins: Data Management
Essential Habits for Salesforce Admins: Data Management
 
Essential Habits for Salesforce Admins: User Management
Essential Habits for Salesforce Admins: User ManagementEssential Habits for Salesforce Admins: User Management
Essential Habits for Salesforce Admins: User Management
 
Admin Best Practices: Explore the Power of Data with Tableau
Admin Best Practices: Explore the Power of Data with TableauAdmin Best Practices: Explore the Power of Data with Tableau
Admin Best Practices: Explore the Power of Data with Tableau
 
Essential Habits for New Admins
Essential Habits for New AdminsEssential Habits for New Admins
Essential Habits for New Admins
 
Admin trailhead Live: Leverage Einstein Search to Increase Productivity
Admin trailhead Live: Leverage Einstein Search to Increase ProductivityAdmin trailhead Live: Leverage Einstein Search to Increase Productivity
Admin trailhead Live: Leverage Einstein Search to Increase Productivity
 
Admin Best Practices: Reports & Dashboards
Admin Best Practices: Reports & DashboardsAdmin Best Practices: Reports & Dashboards
Admin Best Practices: Reports & Dashboards
 
Trailhead Live: Essential Habits & Core Admin Responsibilities
Trailhead Live: Essential Habits & Core Admin ResponsibilitiesTrailhead Live: Essential Habits & Core Admin Responsibilities
Trailhead Live: Essential Habits & Core Admin Responsibilities
 
Build AI-Powered Predictions with Einstein Prediction Builder
Build AI-Powered Predictions with Einstein Prediction BuilderBuild AI-Powered Predictions with Einstein Prediction Builder
Build AI-Powered Predictions with Einstein Prediction Builder
 
Trailhead Live: Build an Awesome Team of Admins
Trailhead Live: Build an Awesome Team of AdminsTrailhead Live: Build an Awesome Team of Admins
Trailhead Live: Build an Awesome Team of Admins
 
Semper Salesforce: Become a Salesforce Military Champion
Semper Salesforce: Become a Salesforce Military ChampionSemper Salesforce: Become a Salesforce Military Champion
Semper Salesforce: Become a Salesforce Military Champion
 

Recently uploaded

Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 

Recently uploaded (20)

Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
The architecture of Generative AI for enterprises.pdf
The architecture of Generative AI for enterprises.pdfThe architecture of Generative AI for enterprises.pdf
The architecture of Generative AI for enterprises.pdf
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Agentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfAgentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdf
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 

Move Out of Excel and into a Pre-Lead Workspace by Dan Donin

  • 1. Dan Donin Business Systems Analyst Stalk me: Dan.Donin@Jivesoftware.com https://www.linkedin.com/in/danieldonin Building a Pre-Lead Workspace How to keep incomplete lists out of your lead object and not force people to work out of excel.
  • 2. Forward-Looking Statements Statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
  • 3. Incomplete Lists • Everyone gets incomplete lead lists • Loading these into the Lead object is a quick way to dirty data • Working these lists in excel makes it difficult to track and measure metrics
  • 4. How Do We Fix This?
  • 5. A Pre-Lead Workspace Object What makes up this solution • Custom Object • Custom Fields • Validation Rules • Process Builder • A small chunk of Apex (Optional)
  • 6. How it Looks to Users
  • 7. We Call it “The Island” • The only relationship is to the user table • Keeps dirty data out of our lead object!
  • 8. The Magic Let PB do the heavy lifting • Once enough data is collected it will flow into the lead object on its own!
  • 9. We want to check when the record is added or updated The Process! We want to check when the record is added or updated We use customized logic in this case to make sure that State is filled when the country is United States 1 AND 2 AND 3 AND 4 AND 5 AND 6 AND 7 AND (8 OR (9 AND 10)) We just map the fields on the Lead object to the reference fields from the PLW record!
  • 10. All of it in Action!
  • 12. Details on building a PLW of your own
  • 13. Object Detail Formula Fields Formula’s Possible Existing Lead/Contact - IF(Count__c > 1, HYPERLINK('https://na35.salesforce.com/_ui/search/ui/UnifiedSe archResults?searchType=2&sen=001&sen=00Q&sen=01t&sen= 003&sen=a14&sen=005&sen=006&sen=800&sen=701&sen=a2I &sen=a0z&str='&Email__c, 'Multiple Dupes Found'), IF( Possible_Dupe__c <> NULL, HYPERLINK('https://na35.salesforce.com/'&Possible_Dupe__c,'h ttps://na35.salesforce.com/'&Possible_Dupe__c), NULL)) Record Sync’d – IF( TEXT(Status__c) = "SFDC Ready", "This Record has already been sync'd. Please " + HYPERLINK("/_ui/search/ui/UnifiedSearchResults?searchType= 2&str=" + Email__c, " find the new record") + " in Salesforce.",IMAGE("/servlet/servlet.FileDownload?file=0154100 00001RFl","Requirements"))
  • 14. trigger DupeIslandCheck on Pre_Lead_Workspace__c (beforeinsert, before update) { /* Checks email address agaisnt Leads/Contacts for possible Dupes. This only does a simple email check. * if it finds any matches it dumps the Lead/Contact ID into a field that then displays the salesforce URL on the record*/ //Thanks to Kevin Purdy for helping me on this he is a boss. List<Pre_Lead_Workspace__c> sdrListLoad = new List<Pre_Lead_Workspace__c>(); // Quick lookup referencefrom email to record Map<String, Pre_Lead_Workspace__c> sdrMap = new Map<String, Pre_Lead_Workspace__c>(); // Flat set of new emails coming in to check Set<String> sdrEmails = new Set<String>(); //Now to check for Update vs Insert. On Update only check for Email Change on Insert check for Email Null If(Trigger.isUpdate){ For(Pre_Lead_Workspace__c sdr : Trigger.New){ //Populate Trigger Old to compare Pre_Lead_Workspace__c oldSdr = Trigger.oldMap.get(sdr.id); //If Email is set to Null clear out SDR Count and Possible Dupe without a lookup. If(oldSdr.Email__c != Null && sdr.Email__c == Null){ sdr.Count__c = 0; sdr.Possible_Dupe__c = Null; } //Now check if Email Changed 4/27 Also added if the recordis older than a day not to fire if the Email is Null Else If(sdr.Email__c != Null && oldSdr.Email__c != sdr.Email__c || sdr.Email__c != Null && oldSdr.LastModifiedDate < Date.today().addDays(-1)){ sdrMap.put(sdr.Email__c, sdr); sdrEmails.add(sdr.Email__c); sdr.Count__c = 0; sdr.Possible_Dupe__c = Null; } } } Else If(Trigger.isInsert) { For(Pre_Lead_Workspace__c sdr : Trigger.New){ If(sdr.Email__c != Null) { sdrMap.put(sdr.Email__c, sdr); sdrEmails.add(sdr.Email__c); } } } //Map the matches 4/27 added in != NULL to try and fix a forever index Map<String, Lead> leadMap = new Map<String, Lead>([SELECTId, Email FROM Lead WHERE Email IN :sdrEmails AND isConverted = FALSE AND Email != NULL]); Map<String, Contact> contactMap = new Map<String, Contact>([SELECTId, Email FROM Contact WHERE Email IN :sdrEmails AND Email != NULL]); //Iterate our duplicates and tie them back to the recordsthat triggered them For(StringmysteryKey : leadMap.keySet()) { Lead l = leadMap.get(mysteryKey); Pre_Lead_Workspace__c sdrWithDupe = sdrMap.get(l.email); // Do something with the duplicate sdrWithDupe.Possible_Dupe__c = l.id; if (sdrWithDupe.Count__c == Null) { sdrWithDupe.Count__c = 0; } sdrWithDupe.Count__c++; } For(StringmysteryKey : contactMap.keySet()){ Contact c = contactMap.get(mysteryKey); Pre_Lead_Workspace__c sdrWithDupe = sdrMap.get(c.email); // Do something with the duplicate sdrWithDupe.Possible_Dupe__c = c.id; if (sdrWithDupe.Count__c == Null) { sdrWithDupe.Count__c = 0; } sdrWithDupe.Count__c++; } } @isTest public class DupeIslandCheckTest { static testMethod void DupeIslandCheckTest(){ Lead testLead = new Lead(FirstName= 'Testy', LastName= 'McTesterson', Email='FindThisDupe@abc.com', Company = 'This Will be Found'); Lead testLead2 = new Lead(FirstName = 'Testy', LastName= 'McTesterson2', Email='DontThisDupe@abc.com', Company = 'This Wont be Found'); Contact testContact = new Contact(FirstName = 'TestyMc' , LastName = 'Testerson', Title = 'TestyMcTesting', Email = 'FindThisDupe2@abc.com'); Contact testContact2 = new Contact(FirstName = 'TestyMc' , LastName = 'Testerson2', Title = 'TestyMcTesting', Email = 'DontThisDupe2@abc.com'); insert testLead; insert testLead2; insert testContact; insert testContact2; Pre_Lead_Workspace__c testSDR = new Pre_Lead_Workspace__c(First_Name__c = 'Lead1', Email__c='FindThisDupe@abc.com', Count__c = NULL); Pre_Lead_Workspace__c testSDR2 = new Pre_Lead_Workspace__c(First_Name__c = 'Lead2', Email__c='DontFindAnything@abc.com', Count__c = NULL); Pre_Lead_Workspace__c testSDR3 = new Pre_Lead_Workspace__c(First_Name__c = 'Lead3', Email__c='FindThisDupe2@abc.com', Count__c = NULL); Pre_Lead_Workspace__c testSDR4 = new Pre_Lead_Workspace__c(First_Name__c = 'Lead4', Email__c='DontFindAnything2@abc.com', Count__c = NULL); insert testSDR; insert testSDR2; insert testSDR3; insert testSDR4; testSDR.Email__c = 'DontFindAnything@abc.com'; testSDR2.Email__c = 'FindThisDupe@abc.com'; update testSDR; update testSDR2; testSDR.Email__c = NULL; update testSDR; } } Trigger Test Class

Editor's Notes

  1. Intro slide Talk about who I am, short and sweet.
  2. Key Takeaway: We are a publicly traded company. Please make your buying decisions only on the products commercially available from Salesforce. Talk Track: Before I begin, just a quick note that when considering future developments, whether by us or with any other solution provider, you should always base your purchasing decisions on what is currently available.
  3. Bullet One - Ask who has these type of lists and the different ways people work them/load them into SFDC (Marketing automation, DataLoader, etc…) Bullet Two – The ways that these lists can make data quality take a nose dive Bullet Three – Hard to measure metrics when things are done in excel or outside standard business processes
  4. TELL ME DAN HOW DO I FIX THIS?!
  5. Give a quick run over the object and how it is customizable to YOUR needs!
  6. The UI for end users. Again customizable to YOUR needs!
  7. This is how it fixes dirty data. The data is contained and cant talk to the rest of the system as it is related to NOTHING (other than the user table so records can be owned). This allows it to be the playground of incomplete data that excel lists are without having to worry about messing up Lead metrics, or creating dirty lead records.
  8. The demos