Answers.Body: <p>You will not be able to do that with the GUI since it lists the matched pairs but does not allow to export it in a configurable way.</p>
  
  <p>Your best bet will be to use the API (that means programming in PHP), and specifically the entity Contact, action duplicatecheck. Here is a sample code:</p>
  
  <pre><code>$result = civicrm_api3('Contact', 'duplicatecheck', array(
    'sequential' =&gt; 1,
    'dedupe_rule_id' =&gt; 4,
  ));
  </code></pre>
  
  <p>This will return a list of matched contact pairs with the dedupe rule 4.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-28T15:23:10.167Z
Answers.Text: It seems like there isn't quite enough here to return the list.  There seems to be get statement that is necessary also.  I've yet to see it working correctly, via the API Explorer.
Answers.UserDisplayName: G H
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-23T14:30:45.010Z
Answers.Text: Sounds like a very useful addition, especially for those that do it all the time, to export a CSV at the end of the batch processing.  Beyond where I am programming wise, but seems like a logical step to the new merge capabilities.
Answers.UserDisplayName: G H
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-23T03:26:51.603Z
Answers.LastActivityDate: 2016-06-23T03:26:51.603Z
Answers.UserDisplayName: cividesk
Body: <p>I need to do a de-dupe on a set of records.  Two groups were brought in with different External ID's for each contact.  I need to merge the contacts, but export the External ID that was kept and the External ID that was dropped.  Having the First Name/Last Name would be bonus.  This way, when I bring in additional data linked to an external ID, I can pre-write the corrected existing external ID from the map.</p>
  
  <p>Contact A has an External ID of 123. Contact B has an External ID of 456. Contact A and B are the same person, but has two different External ID's from separate systems. I need to create a mapping, an exported CSV file, that maps 456 to 123, so that when I later bring in Note C related to Contact B via External ID 456, I can re-write the External ID to 123 and have Note C imported to Contact A with External ID 123.</p>
  
  <p>Unfortunately, I don't see any kind of Export on the de-duping pages. I'm hoping that I am just missing it.  Any ideas how one might accomplish such a task without going line by line and copy/pasting to an Excel file?  (We're talking thousands here.)</p>
  
  <p>Clear as mud yet?</p>
  
  <p>Wordpress 4.5.3, CiviCRM 4.7.8
  (Yes, I'm aware of the current de-dup flipping bug that is being fixed in 4.7.9.)</p>
  
Tags: <wordpress><export><duplicate-contacts><field-mapping>
Title: Exporting deduped information
ThreadText: # Exporting deduped information
  
  (Asked by: username_0 on 2016-06-22)
  
  I need to do a de-dupe on a set of records. Two groups were brought in with different External ID's for each contact. I need to merge the contacts, but export the External ID that was kept and the External ID that was dropped. Having the First Name/Last Name would be bonus. This way, when I bring in additional data linked to an external ID, I can pre-write the corrected existing external ID from the map.
  
  Contact A has an External ID of 123. Contact B has an External ID of 456. Contact A and B are the same person, but has two different External ID's from separate systems. I need to create a mapping, an exported CSV file, that maps 456 to 123, so that when I later bring in Note C related to Contact B via External ID 456, I can re-write the External ID to 123 and have Note C imported to Contact A with External ID 123.
  
  Unfortunately, I don't see any kind of Export on the de-duping pages. I'm hoping that I am just missing it. Any ideas how one might accomplish such a task without going line by line and copy/pasting to an Excel file? (We're talking thousands here.)
  
  Clear as mud yet?
  
  Wordpress 4.5.3, CiviCRM 4.7.8
  (Yes, I'm aware of the current de-dup flipping bug that is being fixed in 4.7.9.)
  
  **Tags:** wordpress, export, duplicate-contacts, field-mapping
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-06-23. Score: 2 | Accepted answer
  
  You will not be able to do that with the GUI since it lists the matched pairs but does not allow to export it in a configurable way.
  Your best bet will be to use the API (that means programming in PHP), and specifically the entity Contact, action duplicatecheck. Here is a sample code:
  $result = civicrm_api3('Contact', 'duplicatecheck', array(
    'sequential' => 1,
    'dedupe_rule_id' => 4,
  ));
  
  This will return a list of matched contact pairs with the dedupe rule 4.
  
  > **Comments:**
  > **username_0**: Sounds like a very useful addition, especially for those that do it all the time, to export a CSV at the end of the batch processing.  Beyond where I am programming wise, but seems like a logical step to the new merge capabilities.  
  > **username_0**: It seems like there isn't quite enough here to return the list.  There seems to be get statement that is necessary also.  I've yet to see it working correctly, via the API Explorer.  
  
  ---
  
  