With a few code changes, you can use the Dataflow Import Customers profile to import customer data including the entity_id.
There are two places in the Magento Core (version 1.9) code that prevent the entity_id from being stored during an Dataflow import:
- 'entity_id' is one of the fields that have been set to be ignored during import.
- 'entity_id' is skipped during the import because it does not have an attribute model associated with it.
The first problem is easily solved: In app\code\core\Mage\Customer\etc\config.xml change the value from 1 to 0 on line 45. That is:
<config>
<admin>
<fieldsets>
<customer_dataflow>
<entity_id>
<system>1</system>
<ignore>0</ignore>
</entity_id>
To solve the second problem, you should extend the saveRow($importData) function in app\code\core\Mage\Customer\Model\Convert\Adapter\Customer. (line numbers conform to the original Core file.)
Lines 496 to 529 should be put within the following conditional statement:
if ($field != 'entity_id') {
{{lines 496-529}}
} else {
$setValue = $value;
}
Then you need to save the customer model before adding the addresses. So on line 537 insert:
if (isset($importData['entity_id']) {
$customer->save();
}
I haven't tested what happens if you try to save the customer model with an entity_id that already exists. My guess is that a MySQL error will be thrown.
I hope this is helpful!