Last Updated 3 years ago
How to configure the parameter: Availability [availability]
GMC expects the value "in_stock" for availability. If for this value you are sending the product stock quantity from the module, below you will find instructions on how to convert the product stock into a value accepted by GMC.How to configure the XML export so that availability gets the value 'in_stock' if the product quantity is greater than "0", and 'out_of_stock' when the product value is "0"
In the availability field mapping, link it to the "Quantity" field, then use the Content Modifier and add two replacers:
1. Find value: /^[1-9]+[0-9]*$/
Replace with: in_stock
2. Find value: /^0$/
Replace with: out_of_stock
Google documentation: Google Merchant Center documentation: availability attribute