Change an info in webhooks when new items added via template and stock tracking is disabled
I am writing to you because one of our mutual merchants Tom Manley (tom@tommanley.ca, Clover ID MX8YWYJT56AT1) reached out to us with the question of why products from their Clover account where the stock tracking is disabled sync to Ecwid as out of stock.
I made some tests in my Clover demo account (THK6Y6J0SY5J1) and noticed the following behavior:
if the stock tracking is disabled, when importing new products to Clover using the spreadsheet (with no values of stock quantity in the spreadsheet), after syncing with Ecwid, these items will be out of stock in Ecwid; an example: the 'MMMM added via template with disabled stock tracking' product, Clover ID 71CZ7VDXVYX4C
if the stock tracking is disabled and a new product is created right from the Inventory --> Items tab of the Clover Web Dashboard, it comes to Ecwid with unlimited stock (an expected behavior); an example: the 'LLLL added manually via Web Dashboard with disabled stock tracking' product, Clover ID HQ9V8RYKDMV3T
This happens because webhooks from cases 1 and 2 are different:
For the 'MMMM added via template with disabled stock tracking' product when the next sync is performed, it says that the item stock quantity is 0.0, though the stock tracking is disabled on the Clover side:
2023.02.22 15:25:07.816 clover 50819005 SyncMissedProdu syncStore - Start processing product com.ecwid.clover.to.CloverProductItemTO@1c8b1cf6id='71CZ7VDXVYX4C', hidden=false, name='MMMM added via template with disabled stock tracking', alternateName='null', code='', sku='', price=9999, priceType='FIXED', defaultTaxRates=true, taxRates=com.ecwid.clover.to.CloverTaxesTO@fe375f4, cost=3100, isRevenue=true, itemStock=ItemStock{quantity=0.0}, modifiedTime=1677079443000, modifierGroups=[], categories=com.ecwid.clover.to.CloverCategoriesTO@7df31ec4, itemGroup=null, options=CloverOptions(elements=[]) for owner 50819005.
For the 'LLLL added manually via Web Dashboard with disabled stock tracking' product when the next sync is performed, it says that the item stock quantity is null:
2023.02.22 15:25:08.413 clover 50819005 SyncMissedProdu syncStore - Start processing product com.ecwid.clover.to.CloverProductItemTO@443a6439id='HQ9V8RYKDMV3T', hidden=false, name='LLLL added manually via Web Dashboard with disabled stock tracking ', alternateName='null', code='null', sku='null', price=20000, priceType='FIXED', defaultTaxRates=true, taxRates=com.ecwid.clover.to.CloverTaxesTO@3c2e3a30, cost=7700, isRevenue=true, itemStock=null, modifiedTime=1677079344000, modifierGroups=[], categories=com.ecwid.clover.to.CloverCategoriesTO@1c1f1d41, itemGroup=null, options=CloverOptions(elements=[]) for owner 50819005.
So, basically, we put the 'MMMM added via template with disabled stock tracking' product as out of stock because of the webhook you send to us saying that itemStock=ItemStock{quantity=0.0}, when it should be always in stock as when one adds a product via Clover Web Dashboard.
Do you consider any changes in product import behavior when adding new products with your template in case the stock tracking is disabled in Clover?
If you could change the parameter itemStock=ItemStock{quantity=0.0} to itemStock=null for products created with your template in case the stock tracking is disabled, it would really help our mutual merchants a lot and they would not have to go from product to product and change their stock on the Ecwid side.