Skip to main content
edited tags
Link
Andie Hunt
  • 7.5k
  • 15
  • 35
edited tags
Link
Andie Hunt
  • 7.5k
  • 15
  • 35
Added code to the questions and changed and did some type's
Source Link

Make the Contact create API duplicate checking not behave like UI in the way in checks for duplicates

I am creating a contact using civicrmCiviCRM API, what iI have noticed that the duplicate checking looks inaccurate compared to the check done when entering new contacts via the User Interface.

Under the civicrmCiviCRM API, it's only a match if the given parameters are exactly the same like "John Smith of [email protected]" does not match "Johnathan Smith of [email protected]", for example, but in the UI, simply entering a matching e-mail address throws a warning.

Is there a way to make the civicrmCiviCRM API dupe check behave more like the UI ?

I am passing the parameter dupe_check = true. The complete call is:

$result = civicrm_api3('Contact', 'create', 
          array( 'sequential' => 1,
                 'contact_type' => "Individual",
                 'first_name' => "raj", 
                 'last_name' => "l", 
                 'dupe_check' => 1, 
                 'api.Email.create' => array('email' => "[email protected]"), )
           );

Contact create API duplicate checking not behave like UI

I am creating contact using civicrm API, what i have noticed that the duplicate checking looks inaccurate compared to the check done when entering new contacts via the User Interface.

Under the civicrm API, it's only a match if the given parameters are exactly the same like "John Smith of [email protected]" does not match "Johnathan Smith of [email protected]", for example, but in the UI, simply entering a matching e-mail address throws a warning.

Is there a way to make the civicrm API dupe check behave more like the UI ?

Make the Contact create API behave like UI in the way in checks for duplicates

I am creating a contact using CiviCRM API, what I have noticed that the duplicate checking looks inaccurate compared to the check done when entering new contacts via the User Interface.

Under the CiviCRM API, it's only a match if the given parameters are exactly the same like "John Smith of [email protected]" does not match "Johnathan Smith of [email protected]", for example, but in the UI, simply entering a matching e-mail address throws a warning.

Is there a way to make the CiviCRM API dupe check behave more like the UI ?

I am passing the parameter dupe_check = true. The complete call is:

$result = civicrm_api3('Contact', 'create', 
          array( 'sequential' => 1,
                 'contact_type' => "Individual",
                 'first_name' => "raj", 
                 'last_name' => "l", 
                 'dupe_check' => 1, 
                 'api.Email.create' => array('email' => "[email protected]"), )
           );
Source Link
MH9
  • 31
  • 1
Loading