I need to add custom attributes to the Customers Main File export (from the Import / Export admin page), but I can't seem to find a way to do it.

I believe I can create a preference to override \Magento\CustomerImportExport\Model\Export\Customer::_permanentAttributes[] to add the codes of my custom attributes, but it's not something I can do when there's hundreds of custom attributes, and new attributes are added and should be automatically available for export.

So is there a way to make it so that all custom attributes are available to filter and to export on this export page?

1 Answer 1


When you had created the custom attribute for customer make sure you made it visible for customer grid. Add these too line in your installData script

'is_used_in_grid'       => true,
'is_visible_in_grid'    => true,

Your can check this out for more : Add a custom attribute in grid customer magento 2

After that you can see your custom attribute in the coloum. Check your custom attribute and then export.

Magento 2 Coloumns

  • As I said, I was talking about the import / export -> Customer Main File grid and not the All Customers grid.
    – Tokipudi
    Commented Mar 8, 2022 at 9:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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