Setup guide
From a copy of the sheet to your first push. Allow about fifteen minutes.
You need: a Google account, a WooCommerce shop that is reachable over HTTPS, and an administrator's sign-in to that shop to create API keys.
1. Make a copy of the sheet
Open the sheet's link from the order page and choose "Make a copy". The copy, and the script inside it, belong to you. Wait a few seconds after it opens, and a Stockrows menu appears next to "Help". If it does not, reload the page.
2. The warning on the first run
The first time you choose anything in the Stockrows menu, Google asks you to authorise the script, and shows a warning that reads roughly "Google hasn't verified this app".
This appears because the script lives in your own copy of the sheet and runs only in your Google account. Google's verification is for apps published to many users, and a copied sheet is not one.
Expect roughly these steps: choose your account, select Advanced, then Go to … (unsafe), then Allow. The permissions are: this spreadsheet only; connect to an external service (your shop and our licence service); show dialogs. After allowing, choose the menu item again.
We have not yet confirmed the exact wording of Google's screens on a test account. You can read the whole script first under Extensions → Apps Script.
3. Create WooCommerce REST API keys
- In your shop's WordPress admin, go to WooCommerce → Settings → Advanced → REST API.
- Select Add key.
- Give it a description you will recognise, choose a user with the right to manage products, and set Permissions to Read/Write.
- Select Generate API key. Copy the Consumer key (starts with
ck_) and the Consumer secret (starts withcs_) now: the shop shows the secret only once.
You can revoke the key on the same page at any time, which cuts the sheet off from the shop.
4. Enter the settings
In the sheet, open Stockrows → Settings and enter:
- the shop's address, starting with
https://; - the consumer key and the consumer secret;
- your licence key, if you have one. Leave it empty during the free trial.
Use the connection test in the settings. It reads one product and tells you how many the shop has. The keys are stored in your own Google account. They are not written into the sheet's cells, and are never sent to us.
5. Pull
Choose Stockrows → Pull products from the shop. The sheet fills with your simple products, your variable products and their variations. A large catalogue is pulled in steps. Keep the progress window open. If it stops or you close it, choose the same menu item again and answer Yes to continue where it stopped.
A new pull replaces what is in the sheet, so push or note your edits first.
6. Edit
You can change these columns:
- Regular price and Sale price: a number, or empty. Empty the sale price to end a sale.
- Stock quantity: a whole number. If the shop did not manage stock for that product, pushing a quantity turns stock management on for it, and the preview says so.
- Stock status:
instock,outofstockoronbackorder. While the shop manages stock for a product, it sets this itself from the quantity. - Status:
publishordraft.
ID, parent ID, type, name and SKU are read-only: changes to them are not sent. The row of a variable product carries its status and no price: prices are on its variations. Stock is on the variations too, with one exception. Where the shop counts the stock on the product itself, shared by its variations, change the quantity on the product's own row. A quantity typed on the row of a variation that shares its product's stock is not sent, and the preview says where to type it. Do not edit the hidden sheets.
7. Preview
Choose Stockrows → Preview changes. A sheet lists every change that would be sent: the row, the field, the old value and the new one. It also lists the rows that cannot be sent, and why, for example a price that is not a number or a sale price above the regular price. Nothing is sent to the shop by a preview.
8. Push
Choose Stockrows → Push changes to the shop and confirm the number of changes. Only changed rows are sent. Before sending, the tool reads the current values from the shop. A row that was changed in the shop since your pull is skipped and reported, and not overwritten. The Log sheet records what happened to every row. The free trial starts with your first push.
9. Undo
Every push writes the old values to the Undo sheet. To take a push back, choose Stockrows → Put back the last push's old values: it puts the last push's old values back into the sheet. Nothing is sent yet. Then Preview and Push again, as with any other edit.
Troubleshooting
- "401" or "cannot view"
- The keys are wrong, or were revoked. Or your host drops the "Authorization" header before it reaches WooCommerce: in that case open Settings, open More options at the bottom of the window, tick Send keys in the address and test again. If pull works and only a push answers 401, the keys are most likely Read only: in the shop, create a pair with Read/Write permission and enter it in Settings.
- "403", or the answer is a web page and not data
- A firewall or security plugin on the shop's side blocks the call. Calls come from Google's servers, and some hosts refuse those. Ask your host to allow requests to
/wp-json/wc/v3/, or to add an exception for it. - "404"
- The REST API was not found at that address. WooCommerce's REST API needs "pretty" permalinks: in WordPress, under Settings → Permalinks, choose anything but "Plain". Check also that the address is the one where WordPress is installed.
- The address is refused
- The shop must be reachable over HTTPS. Plain HTTP is not supported, because the keys would travel unprotected.
- A step takes long or times out
- Choose the same menu item again: pull and push resume. If it keeps happening, open Settings, then More options, and lower Products per pull step or Rows per push request.
- No menu
- Reload the sheet. The menu appears only in your own copy, when you are signed in with edit rights.
Still stuck? See the contact page. Never send us your shop's keys.