How to save only the product ids in my custom table post saving all the product details after importing csv.

I have added custom entity type under system->import.

When i click on that, it should perform the same functionality as product import, but apart from that also the imported product ids must be saved to my custom table.

This is what i have done:


<preference for="Vendor\Module\Model\Import" type="Magento\ImportExport\Model\Import" />
<preference for="Vendor\Module\Model\Import\DataflowProfiles" type="Magento\CatalogImportExport\Model\Import\Product" />


<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_ImportExport:etc/import.xsd">
    <entity name="catalog_product" label="Custom Dataflow-Profiles" model="Vendor\Module\Model\Import\CustomDataflowProfile" behaviorModel="Magento\ImportExport\Model\Source\Import\Behavior\Basic" />


   namespace Magento\CatalogImportExport\Model\Import;

   use Vendor\Module\Model\Import\CustomDataflowProfile\RowValidatorInterface as ValidatorInterface;

   class CustomDataflowProfile extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
         ...same code as core...


same as core 

My custom table has columns: id , productid.

Now apart from saving the product details after import, i want my product ids to be saved in my custom table.

Updated error in comments

Please suggest!!

  • The problem is 1) its not overridding my customImport module, 2) if i give different entity name in import xml i get The input entity code is not equal to entity adapter code.
    – Sushivam
    Jul 30, 2016 at 14:49
  • Is my etc/di wrong? Or where is the code wrong in my model im clueless
    – Sushivam
    Jul 30, 2016 at 15:16

1 Answer 1


I think your di is wrong it should be:

<preference for="Magento\CatalogImportExport\Model\Import\Product" type="Vendor\Module\Model\Import\DataflowProfiles" />



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