🎧 Listen to this article: English
🌍 Read this in your language: हिंदी · தமிழ் · తెలుగు · ಕನ್ನಡ · മലയാളം · ଓଡ଼ିଆ · 日本語 · 中文
Managing a WooCommerce store can be a rewarding experience, but it comes with its own set of challenges. One common issue is keeping track of inventory accurately. If you run a small WooCommerce store, you might be using a Google Sheet to track your stock. However, without the right setup, you could end up with discrepancies between your sheet and your actual inventory. Today is November 25, 2026, and understanding how to automate this process is essential for smooth operations in your online store.
The Problem
When an order comes in, it usually gets logged into a Google Sheet, and stock levels are adjusted accordingly. However, as time goes on, you might notice that your Google Sheet says you have 12 black T-shirts in size M, while your shelf only has 10. This mismatch can lead to confusion and extra work, as someone might need to manually count the stock and overwrite the numbers.
The good news is that most of these mismatches stem from two common mistakes that are easy to avoid once you know what they are.
The Two Rules to Follow
To prevent these discrepancies, you need to follow two essential rules:
Rule 1: Only Paid Orders Move Stock
WooCommerce creates an order when a customer reaches the checkout, often with a status of "pending payment." Many of these orders are never paid, meaning that if your automation fires on every new order, it will reduce stock levels for orders that never actually completed. To avoid this, ensure your automation only triggers on orders that are marked as "processing" (paid but not yet shipped) or "completed" (paid and shipped).
Rule 2: Each Order is Recorded Exactly Once
An order can pass through multiple statuses: pending, processing, and completed. If your automation listens for order updates, it might see the same order multiple times. This can lead to double counting. To fix this, implement an idempotency check. Before writing any data to your Google Sheet, check if the order ID already exists. If it does, skip the entry; if it doesn’t, log the order.
Setting Up Your Automation with Make.com
To log WooCommerce orders to Google Sheets without double counting, you can use Make.com (formerly known as Integromat). Here’s how to set it up step-by-step:
Step 1: Prepare the Google Sheet
Create two tabs in your Google Sheet:
- Ledger: This will record each stock movement. Create columns for
order_id,sku,quantity,status, andlogged_at. - Inventory: This will contain product details. Create columns for
sku,opening_stock, andcurrent_stock. In thecurrent_stockcolumn, use a formula like=B2-SUMIF(Ledger!B:B, A2, Ledger!C:C)to calculate the current stock based on the ledger.
This setup ensures that each stock movement is tracked individually, making it easy to identify discrepancies.
Step 2: Create a Data Store in Make.com
In Make.com, go to the Data stores section and create a new data store called processed_orders. Use the order_id as the key. This will help you keep track of which orders have already been logged. This step is crucial for preventing duplicate entries in your ledger.
Step 3: Set Up the Trigger for Orders
Start your scenario with the WooCommerce "Watch Orders" module. This module will monitor new or updated orders in your WooCommerce store. This is crucial for ensuring you catch all relevant orders as they come in. You can configure it to check for new orders at regular intervals, ensuring that no orders are missed.
Step 4: Filter for Paid Orders
After the trigger, add a filter to process only orders that have a status of "processing" or "completed." This ensures that only paid orders are considered, adhering to Rule 1. This step is essential to prevent unpaid orders from affecting your stock levels. You can set this filter in the Make.com interface by selecting the appropriate fields from the WooCommerce order data.
Step 5: Check for Existing Records
Next, add a Data store module to check if the order_id already exists in the processed_orders data store. If it does, filter out the order to prevent duplication, following Rule 2. This check is what prevents double counting in your ledger. You can configure this in Make.com by using a conditional filter that checks the existence of the order ID before proceeding.
Step 6: Split the Order into Line Items
Add an Iterator module to process each item in the order’s line_items array. This allows you to handle multiple products in a single order effectively. For example, if a customer orders three different T-shirts, this step ensures that each T-shirt gets logged individually. This is important for maintaining accurate inventory records.
Step 7: Write to the Ledger
For each line item, add a Google Sheets module to write a new row in the Ledger tab. Map the relevant details: order_id, sku, quantity, status, and the current timestamp for logged_at. This step creates a clear record of each stock movement. You can use the mapping feature in Make.com to connect the order data to the appropriate columns in your Google Sheet.
Step 8: Mark the Order as Recorded
After writing the row to the ledger, add a Data store module to add or replace the record in the processed_orders data store using the order_id as the key. This step ensures the order is only marked as recorded after the rows are successfully written. This is a critical step to maintain the integrity of your data. By doing this, you prevent the same order from being processed again in the future.
Step 9: Enable Sequential Processing
In the scenario settings, enable sequential processing. This ensures that if two webhooks for the same order come in at the same time, they are handled one after the other, preventing any race conditions. This is important for maintaining data accuracy. Sequential processing can be enabled in the scenario settings within Make.com, ensuring that your automation runs smoothly even under heavy load.
Testing Your Setup
Once you have everything set up, run a test order through your WooCommerce store. Change the order status from "processing" to "completed" and check your Ledger tab in Google Sheets. You should see the order logged only once, confirming that your setup is working correctly. This testing phase is crucial to ensure everything functions as expected before going live. You can also run multiple test orders to ensure that the system handles various scenarios without errors.
Edge Cases to Consider
While the steps above will fix most issues, there are some edge cases worth thinking about:
- Incomplete Runs: If a run stops halfway through a multi-item order, Make.com might retry the run, leading to double entries. To avoid this, consider a safer key that combines
orderIDandlineItemID. This way, each item is tracked individually. This ensures that even if an error occurs, you won't lose track of which items were processed. - Simultaneous Deliveries: If two deliveries arrive at the same second, both runs might check the data store before either has written anything. Keeping sequential processing enabled helps mitigate this. This is especially important during peak shopping seasons.
- Refunds and Cancellations: Your setup does not automatically restore stock for refunds or cancellations. Instead, record returned stock as a new ledger row with a positive quantity once the item is back on the shelf. This ensures that your inventory reflects the actual items available. You can also add a separate process to handle refunds in your automation.
- Unknown SKUs: If an order contains a SKU not listed in the Inventory tab, the SUMIF formula will ignore it. Add a check to alert you via email instead of silently failing. This way, you can address any discrepancies immediately. You can set up email notifications in Make.com to alert you of any unknown SKUs.
Conclusion
By following these steps and implementing the two essential rules, you can effectively log WooCommerce orders to Google Sheets without double counting. This setup will help you maintain accurate inventory levels and avoid the headaches that come with mismatched stock. With a reliable system in place, you can focus more on growing your business and less on manual inventory checks.
Merits
- Streamlines the order logging process.
- Reduces inventory discrepancies and errors.
- Easy to set up with Make.com.
- Provides a clear ledger for tracking stock movements.
- Automates the process, saving time and effort.
Demerits
- Requires familiarity with Make.com and its interface.
- Potential costs associated with Make.com credits for running scenarios.
- Does not automatically adjust stock for refunds or cancellations, requiring manual intervention.
Caution
This article is for educational purposes. Ensure you replace any placeholder values with your actual data. Always verify claims against the original source before relying on them.
Frequently asked questions
- What is Make.com? — Make.com is an automation platform that allows you to connect different apps and services to automate tasks without coding.
- How do I create a Google Sheet for WooCommerce orders? — You can create a Google Sheet with two tabs: one for the ledger and another for inventory, as described in the article.
- What are the common mistakes when logging WooCommerce orders? — The two main mistakes are logging unpaid orders and recording the same order multiple times.
- Can I automate refunds in WooCommerce? — This setup does not automate refunds; you need to manually record returned stock.
- What if my order has unknown SKUs? — You should implement a check that alerts you if an order contains SKUs not listed in your inventory.
- How can I test my automation setup? — Run a test order in WooCommerce and check the Ledger tab in Google Sheets to verify if it logs correctly.
Tags
#woocommerce #googlesheets #automation #inventory #stockmanagement #makecom #ecommerce #onlinestore
Prompt-Injection Defense Checklist
The controls that actually reduce the blast radius when your app feeds untrusted text to an LLM. Enter your email — you'll get the PDF instantly, plus new posts on AI, security & Linux.
Free. No spam — unsubscribe in one click.


Responses
Sign in to leave a response.