Element g:availability#

Basic information#

The g:availability element indicates whether a product is in stock. It is a required element in the feed for Google Shopping.

Possible availability values are:

  • in_stock — the product is available in stock; customers can order it and orders can be fulfilled.
  • out_of_stock — the product is no longer available for ordering; orders are not accepted.
  • preorder — the product has not yet gone on sale but can already be pre-ordered. This value requires the g:availability_date element to also be present, indicating when this brand new product will be released.
  • backorder — the product is currently out of stock but can still be ordered as a back-order. This value requires the g:availability_date element to also be present, indicating when the product will be available again.

Elements related to g:availability that can also be used in the feed:

  • g:availability_date — product availability date
  • g:custom_label_0-4 — custom labels for creating filters in Google Shopping campaigns

Frequently asked questions#

  • How do I filter products with a specific g:availability status in Mergado, for example out_of_stock?
    • On the Products page, create a query to find such products. Use the condition equals or contains, for example: g:availability = "out_of_stock".
  • How do I segment products by availability in g:availability?
    • On the Products page, create four separate queries for the individual g:availability statuses. Use the condition equals or contains, for example: g:availability = "in_stock", and so on.
    • You can then use these queries in rules — most commonly the Bulk rewriting by query rule, which lets you set a different value in an element, such as g:custom_label_0-4, for each query within a single rule.
  • How do I fix g:availability values where in_stock and out_of_stock are missing underscores?
    • Use the Find and replace rule to replace the space with an underscore in the g:availability element. Enter a single space in the Find field, and an underscore _ in the Replace field.
    • The rule will fix values like:
      • in stockin_stock
      • out of stockout_of_stock
  • How do I populate the g:availability element with a value from another element?
    • Use the Bulk copy values rule to copy the value from another element — for example, from AVAILABILITY to g:availability.
    • You can also use the Rewrite rule to save the value of another element (a variable) into g:availability, for example: %AVAILABILITY%.
  • Which g:availability value should I use when a product is temporarily out of stock?
    • Use backorder and also populate the g:availability_date element with the date when the product will be back in stock.
  • Which g:availability value should I use when a product has sold out and will not be restocked?
    • Use out_of_stock.
  • When do I need to include g:availability_date alongside g:availability?
    • For the backorder and preorder statuses.
      • For backorder: the date when the product will be available again (back in stock).
      • For preorder: the date when the product will go on sale (when it will be in stock).
  • How do I hide products in Mergado that have a specific value in g:availability, for example out_of_stock?
    • First, create a query on the Products page to find such products. Use the condition equals or contains, for example: g:availability = "out_of_stock". Then on the Rules page, create a new rule, select Hide product as the type, and use the query you created. The rule will hide all products with the value out_of_stock in g:availability.
  • How do I hide products in Mergado that have any value other than in_stock in g:availability?
    • First, create a query on the Products page to find such products. Use the condition does not equal or does not contain, for example: g:availability != "in_stock". Then on the Rules page, create a new rule, select Hide product as the type, and use the query you created. The rule will hide all products that do not have the value in_stock in g:availability.

What Mergado Audit checks for the g:availability element#

  • Whether the g:availability element is missing or empty for any products.
  • Whether the g:availability element contains an invalid value — only in_stock, out_of_stock, preorder, or backorder are permitted.

If you need help, contact our technical support.

Was this article helpful?