Tracking COGS and Inventory
To track COGS and Inventory, you will need to set the item in both Xero and Shopify to have the same SKU.
In Shopify, this can be done in the Product screen, under Inventory.
In Xero, this is done by creating a "New item", in the "Products and services" section in "Business".
Once the product has been set up in Xero with the right accounts to post transactions to, you will need to enable the "Match Product SKUs" setting in "Setup - Xero" screen in the Post to Xero app.
Once that's been enabled, any orders for that particular item will automatically be matched and posted to Xero according to the Sales, COGS and Inventory accounts that have been set up in Xero for that item.