Importing subscription plans
Use the Subscriptions app's import system to create new subscription plans from a CSV file. You can also assign existing ShopWired products and product variations to those plans. Each plan and product assignment has its own row in the file.
The import does not create products, update existing plans or contracts, take payments, or activate the new subscription system. A plan can be imported without any product assignments, but customers cannot subscribe to a product through that plan until the product is assigned.
Prepare an import file
Prepare an import file
- Open Apps > Subscriptions in your ShopWired account
- Open Import and export and select the
Import plans and productstab - Select
Download template - Open the template in spreadsheet software and keep its 12 column headings in the same order
- Add a
create_planrow for each new plan - If you want to assign products during the import, add an
add_assignmentrow for each product or variation below its plan row - Save the file as a UTF-8 CSV file
The template contains an example plan row and an example product assignment row. Replace the example values with your own information before importing.
Import the file
Import the file
- On Import and export, select the
Import plans and productstab - Choose your CSV file in the CSV file area
- Select
Check file - Review the Check the file results, including the Errors count and any row messages
- If any rows have errors, correct the CSV file and select
Check fileagain - When every row is valid, select
Import plans and products - Select
Check progressor open History to follow the import - In History, select
View resultsand check the result of every plan and product row
Checking a file does not import anything. Every row must pass the file check before the import button becomes available. Select Download errors if you need a file listing the rows that failed the check.
Imports are processed as jobs, so you do not need to keep the page open while a job runs. Use Refresh history to update the list. You can select Download results when the result file is available.
Import column definitions
Import column definitions
The first row of the CSV file must contain these column headings in this exact order. Enter a value in every column where the row requires one, and leave unused columns empty. Keep the commas for empty columns when editing a CSV file directly.
| Column | Plan row (create_plan) |
Product row (add_assignment) |
|---|---|---|
action |
Enter create_plan |
Enter add_assignment |
plan_key |
Enter a unique code for this plan in the file, such as monthly-box |
Enter the matching code from a valid plan row above, or leave it empty to use the most recent valid plan row |
plan_name |
Enter the plan name, up to 100 characters | Leave empty |
enabled |
Enter true or false |
Leave empty |
interval |
Enter day, month or year |
Leave empty |
interval_count |
Enter a whole number from 1 to 9,999, such as 1 for every month when interval is month |
Leave empty |
cycle_limit |
Enter 0 for no limit, or a whole number up to 9,999 |
Leave empty |
trial_days |
Enter 0 for no trial, or a whole number up to 999 |
Leave empty |
price_modifier_type |
Enter none, fixed_price or percent_discount |
Leave empty |
price_value |
Leave empty for none; enter a VAT-inclusive amount without a currency symbol for fixed_price, or a number above 0 and up to 100 for percent_discount |
Leave empty |
product_id |
Leave empty | Enter the existing ShopWired product's numeric ID |
sku |
Leave empty | Enter that product's or variation's exact SKU, including its letter case |
Use a different plan_key for each plan row. A key can contain letters, numbers, dots, hyphens and underscores, up to 100 characters. It links rows within the file and is not the plan's ShopWired reference number.
The product_id and sku are separate values. Check both against the product in ShopWired rather than assuming that its SKU is also its product ID. For a variation, enter the variation's exact SKU with its parent product's ID. A SKU can contain up to 128 characters and must not start or end with a space.
A fixed price is entered including VAT, without a currency symbol. It can have up to four decimal places in the file and must use no more decimal places than your shop's currency supports. The app checks it against your shop's VAT and currency settings before creating the plan. A percentage discount must be greater than 0 and no more than 100.
The file must be no larger than 1 MB and contain no more than 1,000 data rows. Each row must use the same 12 columns as the template.
Resolve import problems
Resolve import problems
A product row asks for a plan above it
Add a valid create_plan row before the add_assignment row. Enter that plan row's plan_key on the product row, or leave the product row's key empty to use the most recent valid plan row. The import only adds products to plans created earlier in the same file. To add products to an existing plan, open the plan in Plans and use its product assignment controls.
A plan fails because a product cannot be found
Check the product_id and exact sku on every product row for that plan against the product in ShopWired. The app checks all of a plan's product rows before creating the plan. If a product cannot be confirmed, the plan is not created and its product rows are skipped. The result in History identifies the failed plan row; use the original CSV to check its associated product rows.
An import says the plan was already imported
Check History and Plans before submitting the file again. Importing the same file can return its earlier job instead of creating another one. An earlier import that created a plan, or still has an unresolved plan row, can also block a new file using the same plan_key or plan name. If the plan exists, add any missing products from its page rather than importing another copy.
A job needs review or a row is not confirmed
Check History and open the affected plan in Plans before retrying. ShopWired may have saved the row without confirming the result to the app. The import stops at that point, so later rows may not have been sent.
If the import button remains unavailable after every row passes the file check, read the reason shown under the button and check the app's Connection page. The app must allow plan changes and, if the file has product rows, product assignment changes.