function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sandy sfdcsandy sfdc 

Custom Fuzzy Logic

Hi,

we need to avoid duplicate insertion on Leads in Salesforce from 3rd party(PHP-application)

for this we implemented an UI which takes some configuration from end user
    
    like 
         select by them which Lead fileds they want to avoid duplication

          for example they selected 
          
               Company,street,phone,city..etc


for this we need to implement fuzzy logic on some fields(company or phone etc).But company names are existing in short form like (TCS,Tata consultancy services,Tata consultancy).
 Eg.
       existing Lead details in SF
      
             company=Tata consultancy services
             phone =213-255-6145
             state=New York

Sending Lead to SF
      
             company=TCS
             phone =(213)-255-6145
             state=NY

Can any one tell us(In Apex or PhP), How we compare company name with existing records when Company name having short forms ???