User Tools

Site Tools


traxs_to_shopify_update

Traxs to Shopify update

The following product doesn’t seem to be updating Shopify stock correctly

https://advancedretail.freshdesk.com/a/tickets/188417

Documentation https://docs.google.com/document/d/1BuKGqLTF_m99pEdI5AttdhPkHOQTcnPOfJoSk7ndNEQ/edit https://docs.google.com/document/d/1zRxztBODFuRIWjR-_btyb2sUndu2mh4S4qXZPrdEwj8/edit https://docs.google.com/document/d/1VY6s_nYo65fU5Az8tEnady9-9s1_rIaSSU8cGie7rSw/edit

We record the last in-stock quantity set in Shopify byTraxs. When we see the current in stock value in Traxs change we re-update Shopify. ​ The last in stock value in Traxs was 40. I changed that value to zero to trick Traxs into thinking that an update was necessary and it has updated the stock to 40. This has updated correctly Shopify so that Shopify now shows 40 too.

 -- find value last set by Traxs
SELECT last_stock_refresh, last_stock_level, * FROM [websites].[vw_WebsiteInterfaceProducts_Stock] WHERE barcode = '2000001050033' AND site_no = 2

-- trick Traxs into re-updating Shopify
UPDATE [websites].[vw_WebsiteInterfaceProducts_Stock] SET last_stock_level = 0 WHERE barcode = '2000001050033' AND site_no = 2

The new code for relisting products will ensure that the stock levels are automatically resent. ​ As a double check I have just forced a resend on this and it updated back to 40 as expected.

-- force a change
UPDATE websites.vw_WebsiteInterfaceProducts_ProductPriceStockListing SET last_stock_level = last_stock_level - 1 WHERE product = 301455

-- check that it changes values after 60 seconds or so
SELECT * FROM websites.vw_WebsiteInterfaceProducts_ProductPriceStockListing WHERE product = 301455
traxs_to_shopify_update.txt · Last modified: 2022/05/04 09:17 by 212.42.166.188