How to Set Up XML Product Import in Stock Sync
This guide explains how to set up a product import using XML files in Stock Sync, including cases where product data and images come from separate XML feeds.
1. Create a New Feed
- Open Stock Sync in your Shopify admin.
- Click Add New Feed.
- Choose Add New Products.
- Select Download URL (or upload file, SFTP, API depending on your source).
- Paste the XML link.
2. Configure File Settings
- Set File Type to XML.
- Use Auto (Recommended) for Parent Node and Variant Node.
- If auto detection fails, manually select the parent element in your XML (for example, Record, Product, Offer, Item, or Towar depending on supplier).
3. Map Required Fields
Match XML tags to Shopify fields such as:
- SKU → SKU
- Name/Title → Title
- Price → Price
- Description → Body HTML
- Stock/Quantity → Inventory Quantity (if feed includes stock)
Product categories
If the XML contains a category node, map that node to Tags to save the category as a Shopify product tag. For example, map <category>Yelek</category> to Tags.
For Shopify product categories, the category value must correspond to the Shopify Standard Product Taxonomy. If a category is not produced, check that the product title and description provide enough information to match that taxonomy. Preview a sample product and verify that the XML category node contains the expected value. If the required category data is not present in the feed, it cannot be imported from that feed.
If you want categories added to product tags, confirm whether the mapping should append new tags while retaining existing tags or replace the existing product tags before running the feed.
Product images
If image URLs are included in the same XML:
- Map the image URL field to Product Images/Image URL.
- If the XML contains multiple image fields or nested image nodes, map the individual URL values rather than the whole image container.
- Verify that URLs include http:// or https://.
If the expected products cannot be found in the XML feed, provide a valid product reference that exists both in the Shopify store and in the supplier feed so the mapping can be checked.
If image URLs are included in the same XML:
- Map image → Image URL
If your XML contains category information (e.g. Yelek):
- Map category → Tags to save categories as Shopify product tags.
4. When Images Are in a Separate XML Feed
If you have two XML feeds (product data + images):
- Create two separate feeds in Stock Sync:
- Feed A: Add New Products (product data XML)
- Feed B: Update Existing Products (image XML)
- In both feeds, map the same identifier (for example, SKU or kod). This allows Stock Sync to match images to the correct product.
- In the image feed:
- Map kod → SKU
- Map gallery/image → Image URL
- Run the image feed after the product feed so images attach correctly.
5. Handling Price Modifications (VAT, Margins)
If your XML contains fields like price and VAT and you need custom price rules:
- Use Price Rules in Stock Sync.
- You can add VAT by applying formula-based adjustments.
- You can set margin-based rules using value ranges (for example, 0.01–5 → +100%, 5.01–10 → +75%, etc.).
6. Troubleshooting Auto‑Mapping Issues
If image import fails or stops halfway, ensure that the Images field is mapped to a list of actual image URLs, not an entire nested image container. For XML feeds where images are grouped inside multiple levels, use JMESPath or Liquid mapping to extract the URL fields only.
If fields do not map automatically:
- Confirm the parent node is correctly selected.
- For first‑time XML imports, the mapping dropdown will only show values from previously mapped fields or prior feeds. New XML tags may not appear in the dropdown until after the first preview or run.
- Preview the XML in Stock Sync to verify the structure.
- Manually map all required fields.
Handling large XML feeds and halfway failures
For a large catalog, first verify the feed with a small test instead of running the full import immediately:
- Confirm that the connection reads the expected number of rows and that the Parent Node and Variant Node identify the product records correctly. If automatic detection is incorrect, select the product element manually or ask for the feed settings to be checked.
- Use Only process 3 products (no credits required) on the Feed Detail page and run an Add Feed test.
- Review the imported products and the feed log/change log. Correct the mapping or node structure before removing the limit and importing the full catalog.
- If the process fails at Adding products with “0 imported but fails halfway,” inspect nested fields—especially Images. The Images mapping must return a flat list of direct image URLs, not the entire nested image container. For example, a feed whose image data is under
imgscan use:{{ data | jmespath: '"imgs".*[][]."url"' | json }}
Selecting onlyjmespath: '"imgs"'returns a Hash/object and can cause an error such asundefined method \flatten!` for an instance of Hash`. - If the issue continues after checking mappings and structure, the feed may require a backend configuration adjustment. Provide the feed URL and a sample product SKU/reference for investigation.
For an initial catalog import, use Add New Products. An Update Feed only updates products already in Shopify and will fail with “Store is empty” when the store has no products.
8. Importing Only Specific Products
If you want to import only selected products:
- Use Incoming Feed Filter and set rules based on SKU, brand, category, or other fields.
If products are not importing even though they appear in the XML preview:
- Check whether Skip product(s) with zero quantity is enabled under Feed Settings. When enabled, Stock Sync will exclude any item with quantity 0 from import.
- If your supplier lists products with stock = 0 and you still want to import them, disable this option and rerun the feed.
9. Credits
Product imports require credits. Stock updates do not.
If you want to test your XML setup without using credits, you can enable "Only process 3 products (no credits required)" on the feed detail page before running the Add Feed.
This setup covers XML imports for single‑feed and multi‑feed XML structures, including product data, stock syncing, and image attachment.
Updated on: 18/08/2026
Thank you!
