/

Importing Data

Learn how to import data from other providers to your installation of Donation Store

Introduction


If you are moving from another provider, chances are you probably have some sort of data that you would like to import into Donation Store. Right now we support importing payment data. To allow for one single unified way to import data into Donation Store, there is an example CSV file of how the data should be structured. Depending on the provider, you will more than likely have to manually format some columns to ensure consistency.

Download Example of the CSV file you need to provide here

Linking IDs


One of the main things that people want to achieve by importing data is connecting their customers with the packages they have previously bought so that Donation Store will limit what packages they can and can't buy. Most providers won't let you export package information and when they do, they mention that the data cannot be used to construct the same information on another service.

To solve this issue, we recommend creating all of your packages on Donation Store first and get the IDs of those packages from the "Packages" section of the Control Panel. Then find and replace those package IDs in your CSV file that match up to the packages that were previously created in the other provider

Timeouts and Crashes


When you upload the CSV file to Donation Store, it performs file operations on the data by opening and closing the CSV file. These operations, in any technology can be slow as the data is being read and written to and from the disk respectively. Because of this, the page may try and time out if you provide a file that is large enough. To combat this, before you upload, you will have to configure Gunicorn to not timeout and to just wait. This can be achieved using the --timeout flag set to some high number like 10000

This can be edited on the Donation Store daemon by visiting the following file

vim /etc/systemd/system/donationstore-app.service

Once you've opened it, you should see the service declaration. On the ExecStart line, after --bind [your_ip], add the following timeout flag. The finished file should look like

[Unit]
Description=donationstore daemon
PartOf=donationstore.service
After=donationstore.service

[Service]
User=donationstore
Group=www-data
WorkingDirectory=/home/donationstore/env
ExecStart=/home/donationstore/env/bin/gunicorn DonationStoreV2.wsgi:application --bind [yourIP]:8000 --timeout 10000 --error-logfile /var/log/donationstore/error.log --access-logfile /var/log/donationstore/access.log

[Install]
WantedBy=donationstore.service

Reload the Daemon and Restart Donation Store

systemctl daemon-reload
service donationstore restart

And that's it. When you are done, remove the timeout and restart again

Imports Failing


It is widely known that if you open a CSV file with a tool like Excel, it can add some unknown special characters around certain pieces of text within the CSV file. This can stop the import from working correctly as the special characters can then be used when looking up packages by ID. To fix this, please open your CSV file using a plain text editor to see if those special characters have been added.


Have Questions? Open a Support Ticket

View Common Issues on the Knowledgebase

Video Guides on YouTube

Other clients and Donation Store developers hang out on our Discord server, where you can ask for support in #ds-chat, or if you are a Client and you don't uet have your Client role on Discord, let us know and we can add it. Once added you get access to our private Client's support channel.