All articles

DocsCustomers and data

Import and export

Import members and points from another app's CSV, undo an import, award points for past orders up to 60 days back, and export your data as CSV.

Use Import & export to bring members and point balances over from another loyalty app or a spreadsheet, to give points for orders placed before you installed Thrice, and to download your data as CSV files.

Thrice reads one CSV format, and it recognizes the column names loyalty apps commonly use in their customer exports, so you can often upload your old app's export as it is. There is no importer made for a specific app: if a column isn't recognized, rename it to one of the names below.

Import members from a CSV

Columns

The first line must hold the column names. Case, spaces, underscores and punctuation don't matter (Customer ID, customer-id and CUSTOMER_ID all work as customer_id), and other columns are ignored.

Column Required Format
customer_id One of customer_id or email per row The Shopify customer ID, as digits or as gid://shopify/Customer/….
email One of customer_id or email per row The customer's email address. Used only when the row has no customer_id.
points Yes, the column must exist A whole number from 0 to 100,000,000, added to the balance. Digits only: spaces and underscores are ignored, commas are not allowed. An empty cell means 0.
birthday No MM-DD or YYYY-MM-DD. Only the month and day are kept. Replaces a birthday the member already has.
enrolled_at No YYYY-MM-DD or a full date and time. Not in the future and not before 1990. Used as the join date, only for customers who become members through this import.
referral_code No 4 to 32 letters, digits, - or _. Stored in upper case.
language No The member's language for loyalty emails, as a language code such as de or pt-BR. A value that isn't a language code, or an empty cell, leaves the member's language as it is. See Emails.

Thrice also reads these column names from other apps' exports:

Column Also read from
customer_id Customer ID, Shopify customer ID
email Customer email, Email address
points Points balance, Point balance, Current points, Available points, Loyalty points
birthday Date of birth, DOB. The dates must still be MM-DD or YYYY-MM-DD.
referral_code Referral code, Referral link code
language Locale, Language code, Customer language, Preferred language

A column named only Balance is not read as points, because some apps use that name for store credit. If two columns read as the same column, for example Email and Customer email, the check fails and names both: remove or rename one of them.

The file can be up to 5 MB and 50,000 rows. Larger files are refused: split them into smaller files. Download template gives you a file with the right columns.

Example

customer_id,email,points,birthday,enrolled_at,referral_code
7012345678901,,1200,03-15,2024-01-31,ADA2024
,jane@example.com,250,1990-07-04,,
,sam@example.com,0,,,SAM-10

Check, then import

  1. Choose your CSV file under Import members and choose Check file.
  2. Thrice checks every row's format and shows how many rows are ready, the first problem rows, how many rows will be skipped as already imported, and which of your columns it used and which it ignored. Nothing is written yet, and Shopify isn't contacted at this step.
  3. Choose Import followed by the number of ready rows, for example Import 250 rows, and confirm. The import runs in the background. Recent imports shows the last 10 files with their status (Checked, Queued, Importing, Done, Failed, Undoing or Undone) and updates while an import runs.
  4. When it finishes, the page lists the rows that failed on the real run, with the first 10 shown and the exact count, and how many rows were skipped as already imported.

How rows are matched

  • A row with a customer_id is matched to that Shopify customer. A row with only an email is matched to the Shopify customer with that email address.
  • Customers who don't exist in Shopify are skipped. The import never creates Shopify customers.
  • Customers who aren't members yet become members, even if enrollment is set to "Only customers who press Join". They don't get points from your sign-up or newsletter ways to earn: their balance comes from your file.
  • Customers with an excluded tag from Settings are skipped.

What happens to points, tiers and referral codes

  • Points are added to the member's existing balance, never set. Each import shows in the points history as "Imported" with the file name. Imported points count towards VIP tiers and restart the points expiry clock.
  • Tiers can't be imported. Thrice works them out again from the imported points (or from spend, if your tiers use spend) under your own thresholds. See VIP tiers.
  • Referral codes: a referral_code replaces the code Thrice generated for that member, so their Thrice referral link becomes https://your-store/?ref=CODE with their old code. A blank cell leaves the member's code alone. Links in your old app's own URL format are not redirected. See Referrals.

Customers get no emails from an import: no Welcome email, and no Tier upgrade or Reward available email for imported points. Members the import creates keep the email marketing consent they have in Shopify, so subscribers get loyalty emails from then on.

Uploading a file again

A row is skipped as already imported when its member already got the same number of points from an earlier import that wasn't undone. Uploading the same file twice, or a corrected file after some rows failed, therefore doesn't add anyone's points twice. These rows are counted apart from errors.

The check counts the rows it can recognize without asking Shopify: rows with a customer_id, and emails that match a member's email in Thrice. The real run can find a few more. A different number of points for the same member is a new grant and is imported.

To give the same points twice on purpose, for example the same bonus a second time, turn on Add the points again for members who already got the same points from an earlier import when you confirm. It's off by default.

Undo an import

In Recent imports, a finished import that added points has Undo this import. The confirmation says how many points it takes back from how many members.

  • Thrice takes back, in the background, what that import added to each member. The import shows as Undoing, then Undone.
  • A member who has already spent some of those points goes down to 0, never below. The import's row then says how many members this happened to.
  • Undoing is safe to retry: no member loses the points twice.
  • Members the import created stay members, and the birthdays and referral codes from the file stay. Customers get no emails.
  • Each take-back shows in the points history as "Imported" with a negative amount and the note "Import undone:" with the file name. Tiers are worked out again.
  • An undone import no longer counts for "already imported", so you can fix the file and import it again.

Row errors

Error What to do
needs a customer_id or email Fill in one of the two.
customer_id isn't a Shopify customer ID Use the numeric ID from Shopify, not the old app's ID.
email isn't valid Correct the address.
points must be a whole number of 0 or more Remove decimals, commas, signs and text.
birthday must be MM-DD or YYYY-MM-DD Fix the date format, for example 07-04.
enrolled_at must be a past date (YYYY-MM-DD) Use a past date from 1990 on.
referral_code must be 4 to 32 letters, digits, - or _ Remove spaces, dots and other characters, or leave the cell empty.
this referral code appears more than once The second row with the code is skipped. Codes are compared without case, so ada1 and ADA1 are the same code.
this customer appears more than once Only the first row for a customer is imported. Merge the rows.
no Shopify customer found Only on the real run. Check the ID or email in Shopify.
this referral code already belongs to another member Only on the real run. The whole row is skipped, points included. Choose another code and import the row again.
customer has an excluded tag Remove the tag in Shopify or leave the customer out.
couldn't be imported Something went wrong on that row. Try the row again in a new file.

Import past orders

Import past orders gives points for orders placed before you installed Thrice, or orders Thrice missed.

  1. Choose Orders from the last 7, 30 or 60 days. Thrice can't read orders older than 60 days.
  2. Choose Preview. It shows how many paid orders Thrice hasn't recorded yet, from how many customers, how many of them aren't members yet, and about how many points your purchase ways to earn would give (bonus rules and tier multipliers aside). Above 500 orders it shows "at least" numbers.
  3. Choose Import orders.

Only paid and partially refunded orders that aren't cancelled are imported, and orders Thrice already has are skipped, so running it again is safe. Imported orders follow the same rules as new orders, including your exclusions. Customers who aren't members join if enrollment is automatic. Customers get no emails for imported orders.

Export your data

Under Export, choose Members, Points history, Redemptions or Orders to download a CSV file.

Export Columns
Members customer_id, email, first_name, last_name, points, tier, orders, total_spent, last_order_at, enrolled_at, birthday, referral_code, marketing_consent
Points history date, customer_id, email, type, points, note, order_id, redemption_id
Redemptions created_at, customer_id, email, reward, points_spent, code, status, used_at, expires_at
Orders processed_at, order, shopify_order_id, customer_id, member, currency, total, subtotal, refunded, discount_codes, loyalty_reward, referral_code, cancelled_at, email_touch_at, email_touch, widget_touch_at

In the Orders export, email_touch_at is when the shopper clicked a loyalty email's button and email_touch is which email it was (for example MONTHLY_SUMMARY); widget_touch_at is when they last used the rewards widget. All three are empty when nothing was tracked before the order, which includes every order from before Thrice tracked them. See Emails and Widget and loyalty page.

From and To limit Points history, Redemptions and Orders to whole days in UTC, both days included. Leave them empty to export everything. The Members export always contains every member. To export one segment's members, use Export CSV on the segment's page. See Customers and segments.

Dates are in UTC. Text that starts with =, +, - or @ gets a leading apostrophe so spreadsheet apps don't run it as a formula.

Every export is recorded in the access log. Team members with the Viewer role can't export. See Team and sign-in.