How do I configure XML parent and variant nodes?
JMESPath and Liquid let you extract data from JSON and XML feeds. This guide explains how to set the Parent Node and Variant Node in Feed Manager (Step 1), which helps when variant data is nested or stored separately.
What Are JMESPath and Liquid?
- JMESPath is a query language for JSON that lets you filter, select, and transform feed data. Learn more at jmespath.org.
- Liquid is a templating language for referencing dynamic values, such as Shopify's
{{product.id}}. Learn more in the Shopify Liquid Reference.
How to Set Up the Parent Node and Variant Node
- Open Feed Manager: Go to App → Feed Settings → Step 1: Feed Manager.
- Set the Parent Node: Enter the path to the list of products, such as
productsorroot.products[*].product. - Set the Variant Node: Enter the path to the variants, such as
variant.{title: [].title | [0], price: [].price | [0]}. - Map the fields in Step 2: Go to Step 2: Matching Column and map each field to the matching node value.
JMESPath Examples
1. Basic Expressions
Use a key name to select a value, such as "b" in a JSON object.

To extract a nested value, such as "value" inside an object:

Index expressions select an element from a list, like array access in common programming languages. Indexing starts at 0.

To select an element from a list of two elements separated by another element:

2. Slicing
Slicing extracts part of a list by setting a start and end index. For example, slicing from index 0 to 3 returns the first three elements.

If the start or end index is omitted, the slice starts at the beginning or ends at the end of the list. The image below shows an end index that returns 5 elements.

To return only the even-numbered elements:

3. Parent Node With Nested Variants (JSON)
In this example, each product has a variants list.
{
"products": [
{
"title": "T-Shirt",
"stock_sync_variant_title": "Apparel",
"variants": [
{ "title": "red-small-cotton", "quantity": 3 },
{ "title": "blue-medium-cotton", "quantity": 4 }
]
},
{
"title": "Jeans",
"stock_sync_variant_title": "Apparel",
"variants": [
{ "title": "red-small-cotton", "quantity": 3 },
{ "title": "blue-medium-cotton", "quantity": 4 }
]
},
{
"title": "Sweater",
"stock_sync_variant_title": "Apparel",
"variants": [
{ "title": "red-small-cotton", "quantity": 3 },
{ "title": "blue-medium-cotton", "quantity": 4 }
]
}
]
}- To retrieve all products, use
productsas the parent node.

- To retrieve only the first two products, use
products[:2]as the parent node.
![Parent node set to products[:2]](https://storage.crisp.chat/users/helpdesk/website/-/b/2/1/9/b219050a5836c000/no-start-number_1tq6rfs.jpg)
- To retrieve products starting from the second one, use
products[1:]as the parent node.
![Parent node set to products[1:]](https://storage.crisp.chat/users/helpdesk/website/-/b/2/1/9/b219050a5836c000/no-ending_4j070x.jpg)
4. Parent Node in XML Products Data
In this example, the products are inside root.products, and each product is wrapped in a product object.
- To retrieve the product list, use
root.products[1:].productorroot.products[*].productas the parent node.

5. Variant Node Settings
Use the variant node to pick specific values from a variant list.
{
"variant": [
{ "title": "Raidė" },
{ "id": "5" },
{ "price": "0.0000" },
{ "price_prefix": "+" },
{ "value_title": "A" },
{ "quantity": "16" },
{ "code": "BN82232" },
{ "barcode": "4019359822320" },
{ "weight": { "prefix": "+", "measures": "kg.", "weight": "0.00000000" } }
]
}- To get the variant list with specific values, set the variant node as
variant.{title: [].title | [0], id: [].id | [0], price: [].price | [0], quantity: [].quantity | [0], weight: [].weight | [0]}.

- If you define only the variant node itself, all sections are included.
- If you do not set the variant node, map each value by its index instead, such as
{{data.variant[3]}}for the price. - When you set the variant node, you can map the price directly as
price.
6. XML Records With Different Node Names
For XML records, use the record name as the parent node, such as "data-set"[].record.
- If the products repeat under keys with different names, such as
item_0anditem_1, use thevalues()function to read them all:values(root.some_path).
Key Rules & Technical Details
- Indexing starts at 0: The first item in a list is
[0], the second is[1], and so on. - Parent node must point to a list: Use
productsorroot.products[*].product, so Stock Sync reads each product as a separate row. - Variant node is optional: Set it only when variant data is nested inside each product.
Troubleshooting Steps
- Issue: Products are not imported or the wrong products are read → Solution: Check the parent node path and confirm it points to the list of products, such as
products[*]. - Issue: Variant values are missing or mixed up → Solution: Check the variant node and confirm each variant field uses
[].field | [0]. - Issue: Values from a list are not picked up → Solution: Use the index that matches the position of the value in the list, starting from
[0].
Good Articles to Continue
- How to map XML v2 → Learn how to map XML fields in Step 2: Matching Column.
- How can I configure variant options (color/size) correctly in Stock Sync? → Learn how to map variant fields so option values are grouped correctly.
Updated on: 13/11/2026
Thank you!
