4

On the CiviCRM profiles you have the ability to set it update matching contact. I don't see this functionality with the Drupal webform CiviCRM Integration module. Is it there and I'm simply missing it? When I log in and fill out the form it simply creates a duplicate contact if that contact already exists. I would like to update the existing contact instead. Is this possible?

I still seem to be having an issue with duplicates being created. The unsupervised rule is set as such:

  • First name: 6
  • Last name: 3
  • Email: 4
  • Street address (First four characters): 1
  • The total for a match is 10

I had a contact in CiviCRM 'Janice Anderson' who did not have an associated Drupal account. Janice created a Drupal account and then went to the form and filled out the information on the webfrom and when she submitted the form it created a duplicate CiviCRM contact instead of merging what she was filling out and the existing contact.

I then ran the dedup rule and it found the two (the old one and the newly created one) CiviCRM contacts and stated that the total was 13. So CiviCRM knew they were possible duplicates based on the rule but it still did not merge them at from submission.

This seems to only be happening if the user is currently in CiviCRM and there is not an associated Drupal account for that user. I just tested by creating a CiviCRM user (Jon Doe, jon.doe@mydomain.com). I then created a Drupal account using that same email address and went to the webform and added the same first name, last name, and email address. CiviCRM created a duplicate contact. If I create the Drupal account first then use the webform it creates a CiviCRM contact. If I then go back to the webform while logged in and update information it updates the contact correctly without creating a duplicate.

Is this action to be expected or am I missing a setting somewhere?

  • Is anyone else having this same issue? Shouldn't the webform use CiviCRM's default unsupervised dedup rule whether the user's Drupal user account was created before or after the CiviCRM contact was created? If the there is a CiviCRM contact already created and the user then creates a Drupal user account then fills in the webform with matching information CiviCRM won't merge the two contacts, it creates a new one. – spinsheet Jul 21 '15 at 15:39
6

When you add the contact in the CiviCRM tab of the Webform, making sure you check the "Existing Contact" box:

Existing contact

From the help:

Gives many options for how this contact can be autofilled or selected. From the Webform tab you can edit this field to configure:

  • Widget: Determine whether to expose this field to the form as an autocomplete or select element, or hide it and pick the contact automatically.
  • Default Value: Select a contact based on the current user, relationships, or other options.
  • Filters: Limit the list of available choices from which this contact may be autofilled or selected.
  • Show/Hide Fields: Control which other fields the user is allowed to edit and which will be hidden.
  • Seems that I had a bad rule which is why I was having this issue. – spinsheet Jun 8 '15 at 14:46
  • I still seem to be having issues with duplicates being created. I edited my original post with the details. Any thoughts on what I might be doing wrong? – spinsheet Jul 6 '15 at 16:45
  • You don't seem to have commented on Colemans answer below where he explains how to set the Matching Rule. – petednz - fuzion Jul 6 '15 at 20:13
  • I just commented but I really don't think that's the issue as the webform should default to whatever CiviCRM uses as the unsupervised rule for deduping. Coleman's response, it seems to me, would just allow me to choose a different rule for that webform. – spinsheet Jul 7 '15 at 13:00
10

By default the Webform-CiviCRM module uses the default "Unsupervised" rule from CiviCRM to determine if an unknown contact is already in your database. If this is not happening for you, check your rule's criteria.

And as of v4.11 you can now specify the matching rule per contact.

You'll find this new option just under the "Contact Fields":

enter image description here

The help text says:

This determines how an unknown contact will be handled when the webform is submitted.

  • Select the "Default Unsupervised" rule for the same duplicate matching used by CiviCRM event registration & contribution forms.
  • Select a specific rule to customize how matching is performed.
  • Or select "- None -" to always create a new contact.

Note: Matching rules are only used if the contact is not already selected via "Existing Contact" field.

  • I have a previous version of CiviCRM that does not have the option of choosing the 'Matching Rule'. If I'm correct, this should not be an issue as the webform should just use whatever default dedup rule CiviCRM uses as the unsupervised rule. Is this correct? This still is not working if the Drupal account was created after the CiviCRM account (as I explained in my edit of my original post). It only seems to work if the Drupal account and the CiviCRM contact or 'linked'. – spinsheet Jul 7 '15 at 12:58
  • What are the criteria of your default unsupervised rule? – Coleman Jul 7 '15 at 14:05
  • First name: 6, Last name: 3, Email: 4, Street address (First four characters): 1. The total for a match is 10. When I run this dedupe rule it does find the duplicates so the rule's working. It's just doesn't seem to be run when the form is submitted. – spinsheet Jul 7 '15 at 14:33
  • Let me clarify that. It seems to run with the form is submitted by a user who's Drupal account was created before the CiviCRM contact record. If the user creates a Drupal account and fills out the form and there was a preexisting CiviCRM contact record that matches the dedup rule it acts as if the rule was never run as a duplicate is created. – spinsheet Jul 8 '15 at 16:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.