This is a dumb script to quickly take shopify order exports and reformat them to automatically be imported into my.amplifier.com
The following dependencies are required:
Or use the requirements.txt file
pip install -r requirements.txt
Currently the script looks for the default Shopify export format orders_export.csv
. Soon this will likely be any file with "orders" or "export" or "shopify" in the name with some sort of hierarchy, but not sure where it will land. If you're reading this, then that means it's still on the original file lookup.
- Clone or download script.
- Make an
output
directory. - Put exported shopify file in project root directory.
- Run Script.
- Take upload file that was created and import.
point terminal into this directly and run the following command:
python main.py
If for whatever reason you need to update the template for the Amplifier to Shopify column mappings, just throw the new template file in this directory and run the update:
python update_template.py
NOTE: that this will create a new mapping in the settings file. Any new columns that are added will be mapped to a null
in the columns.json file and will need their Shopfiy counterpart manually added instead of the null. Any existing columns on update will keep their shopify mappings, but if a new template no longer has a column in it, that mapping will be lost.
- Logging / overal script communication (number of orders, errors, etc...)
- Do something with orders that cannot be piped into amplifier template for whatever reason?
- Better CLI args for more dynamic file input. Maybe include .bat or .sh to DIY packaging.