To create an exporter for a PIM the aem-importer-api project is provided (com.elasticpath.aem:ep-aem-import-api). This defines the transport classes that you are required to convert your PIM data to:
To create a custom importer you first need to implement ProductImporter provided by the AEM Commerce API. The AEM Commerce API does ship with some classes designed to provide basic import functionality.
Avoid using these classes in all but the most simple use cases. If you wish to create a custom importer for your project you need to create a page in /etc/importers/yourproject, depending on how your importer works you will eventually need to submit your request to /libs/commerce/product