Price vs Cost for Margin

trying to auto tag products that have a bad margin. i see the option to compare using price but i see no options to access product cost or margin

I don’t think margin is a variable in the API, you would need to calculate it. I see a unit cost for each inventory item: https://shopify.dev/docs/api/admin-graphql/2024-04/objects/InventoryItem#field-inventoryitem-unitcost