Best answer

How to adjust Shopify product inventory by -2

  • 19 April 2021
  • 6 replies

I have tried using the formatter in all sorts of ways such as *-2,  *2,  x2, and *2 on their own and both in front of the line item quantity and following it etc. In the formula below it just adds 12 to the inventory because there is a 1 and a 2! If 2* is placed in front of the Line Item Quantity it adds 21 to the inventory. I have also tried using the Spreadsheet Style formula in the same ways and the output is always zero. One thing that does work is selecting the Make Negative option, so that it half way to multiplying by -2! I have also tried using these formulas directly in the Update Inventory Quantity in Shopify as per the 2nd image below. A minus sign in front of Line Items Quantity makes 1 into -1, but otherwise the output is always 0. Please help.







Best answer by Troy Tessalone 19 April 2021, 16:57

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

6 replies

Userlevel 7
Badge +14

Hi @zaperian 

Try this...add [Line Items Quantity] on the first input and “2” on the second input below.



It actually worked. I tried something like that but maybe *2 or -2. Surely I tried 2 but maybe didn't click test or something. But anyway, 2 works and then I'm doing a separate format to make it negative. So, thank you.

I have tried and tried but why is it that using the title, product id or inventory quantity id it comes up with the following message when trying to reduce the inventory -2?


Userlevel 7
Badge +11

Hi @zaperian!

It sounds like you’re trying to use a custom option instead of choosing a specific product. When you do that, the value that the app is expecting is the one you see under the item name when you open the dropdown:


What’s blurred out is the product title, and not what the app wants to see when you’re sending a custom value. It’s the smaller, lighter text under the title that needs to be used. So if you’ve got a lookup step of some sort before the Update Inventory step, make sure that those IDs are included :)

Hi. Those numbers are product IDs and I see now that they do work when a specific one is entered. As you said I might, I do have a lookup step that looks up in google sheets the product ID and product variant of the "mate” as I called it. So, it looks up the SKU in column A (not actually a product ID) and returns the columns to the right. The google sheets cells are formatted as numbers. I have even tried formatting the IDs to numbers in Zapier using by using formatter and extracting the numbers (out of the numbers). It has the same error message. Any ideas?



Userlevel 7
Badge +11

Hi @zaperian!

I see that you’ve been in touch with our Support team, possibly in relation to some different issues. I’d say they’ll be your best bet since they can jump right into your Zap and check our logs as well. I’m sure there are some minor things that aren’t quite lining up. What you’re trying to do is definitely possible :) 

If you haven’t already, maybe see if one of the current Customer Champions helping you out can shine some light on this. If you think of it, we’d love to hear about the solution once you get things resolved!