This is a tool written in Go for exporting customer data from multiple Shopify stores.
- Export customer data concurrently from multiple Shopify stores
- Save the exported data in JSON format
- Support pagination for handling large amounts of customer data
- Error handling and logging
- Make sure you have Go 1.22.6 or higher installed.
- Clone this repository:
git clone https://github.com/pseudomonarchia/shopify-customer-dump.git
- Navigate to the project directory:
cd shopify-customer-dump
- Install dependencies:
go mod tidy
In the project directory, create a file named config.shopify.yaml
and add the following content:
shopify:
- name: storename
accessToken: "your_access_token"
Run the following command to start the program:
go run main.go
Or use the binary file:
./shopify-customer-dump
The exported data will be saved in the .cache
directory, with each store having its own subdirectory.
main.go
: Main entry point of the programinternal/
: Internal logic implementationconf.go
: Configuration file readingdump.go
: Data export logic
config.shopify.yaml
: Configuration file
github.com/bold-commerce/go-shopify/v4
: For interacting with the Shopify APIgopkg.in/yaml.v3
: For parsing YAML configuration files
Under stable network conditions, a single store can handle at least 200,000 records per hour. Actual processing speed may vary depending on network conditions, device specifications, API limitations, etc. This is not a guaranteed result, but a reference.
- Ensure that your Shopify access token has the necessary permissions to read customer data.
- Exporting large amounts of data may take a considerable amount of time, please be patient.
- Errors and progress information during the export process will be logged in the
logs.txt
file.
Feel free to submit issues and suggestions for improvements.