https://github.com/commercetools/commercetools-customer-export
https://github.com/commercetools/commercetools-customer-export
audit-import-export
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/commercetools/commercetools-customer-export
- Owner: commercetools
- License: mit
- Created: 2016-02-19T14:33:49.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-11-17T12:09:58.000Z (over 1 year ago)
- Last Synced: 2026-02-02T03:58:32.716Z (5 months ago)
- Topics: audit-import-export
- Language: CoffeeScript
- Homepage:
- Size: 857 KB
- Stars: 2
- Watchers: 26
- Forks: 6
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
🚨 Non-maintainable 🚨
Starting January 1, 2025, we will no longer provide maintenance or updates for the CLI ImpEx tools. After this date, this tool will no longer receive bug fixes, security patches, or new features.

# Customer export
[](http://travis-ci.org/mmoelli/commercetools-customer-export) [](http://badge.fury.io/js/sphere-customer-export) [](https://coveralls.io/r/mmoelli/commercetools-customer-export) [](https://david-dm.org/mmoelli/commercetools-customer-export) [](https://david-dm.org/mmoelli/commercetools-customer-export#info=devDependencies)
This module allows to export customers to CSV, with SFTP support.
## Getting started
```bash
$ npm install -g sphere-customer-export
# output help screen
$ customer-export
```
### SFTP
Exported customer can be automatically uploaded to an SFTP server.
When using SFTP you need to provide at least the required `--sftp*` options:
- `--sftpCredentials` (or `--sftpHost`, `--sftpUsername`, `--sftpPassword`)
- `--sftpSource`
- `--sftpTarget`
### CSV Format
Customers exported in CSV are stored in a single file
> At the moment you need to provide a `--csvTemplate` with headers in order to export related fields (see [examples](data)).
```csv
id,customerNumber
```
The following headers can be used in the CSV template
- `id`
- `customerNumber`
- `externalId`
- `firstName`
- `middleName`
- `lastName`
- `email`
- `dateOfbirth`
- `companyName`
- `vatId`
- `defaultShippingAddressId`
- `defaultBillingAddressId`
- `customerGroup`
- `isEmailVerified`
- `addressed.*` - eg. `id`, `streetName` or `additionalStreetInfo`
In general you can get access to any property of the customer object. Find a reference in our [API documentation](https://docs.commercetools.com/api/projects/customers).
> Note that when at least one `addresses` header is given the resulting CSV contains a row per address. Otherwise it only contains one row per customer.
## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).
More info [here](CONTRIBUTING.md)
## Releasing
Releasing a new version is completely automated using the Grunt task `grunt release`.
```javascript
grunt release // patch release
grunt release:minor // minor release
grunt release:major // major release
```
## License
Copyright (c) 2015 commercetools
Licensed under the [MIT license](LICENSE-MIT).