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
SalesForce_52436SalesForce_52436 

match()

Hello,

I am trying to use the match() method on the SOAP API, I am new to Soap API concepts. i am trying to use this method like this. My requirement is i have custom object with Name and Date fields. I want to get the Records based on the Lead matching rule specified. In the matching it will check Name Fuzzy match and Date field. 

public class TestCallout {
    
    public void GetDuplicates(){
        List<SObject> Orders = [select Id,Patient_Name__c,Patient_DOB__c from SRP__c];
        MatchOptions matchotpt = new MatchOptions();
        matchotpt.Fields = 'Name,DOB__c';
        matchotpt.Rule = 'Lead_Matching_Rule';
        matchotpt.SobjectType = 'Lead';
        List<Datacloud.MatchResult> callResults = new connection.match(Orders,matchotpt);
        system.debug('--results--'+callResults);
    }
    
}
I am trying to save this class i am getting these errors,
Invalid type: MatchOptions
Variable does not exist: matchotpt
Invalid type: connection.match

This is ref link : https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_match.htm

Please help me?
SwethaSwetha (Salesforce Developers) 
HI Satyasairam,

Unfortunately, there isn't much information around the match() I could find. Since you are working on callout, the article https://salesforce.stackexchange.com/questions/56511/trigger-to-make-future-callout-to-the-data-com-match-api might add value .

Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you