You can find the source code here: https://github.com/Frog911/Sitecore.Commerce.ImportExport
I would add two buttons for importing and exporting Price Books to PriceBooks Dashboard.
It will be required to create PopulateImportPricingDashboardActionBlock:
After that, I would create GetPricebookExportViewBlock, which will build a view with a Download File component. It will be possible to provide the path where the exported file should be saved.
For supporting File Upload, we have to create another ViewBlock. It will provide a possibility to select file for import process.
Now we have to create DoActionPricebookImportBlock, which will be responsible for reading the imported file stream and starting the import of Price Books. The importing process will run as a long running operation. As a result, it will send the response TaskId. From the BizFx website on the front end side a call will be triggered to check the status by TaskId with an interval of few seconds.
In addition, we have to register our created blocks as our last step:
That is all what we have done from the Sitecore Commerce Engine prospective.
In the next blog post, I will explain how to extend BizFx website to support this logic.
Stay tuned!