Back to Documentation
Dropshipping Module

How to Define XML and JSON Product Fields

Define IHASHOP XML and JSON product fields with GiyimDepom and Luxstoree examples and learn identity, cost, category and stock validation.

XML and JSON product fields determine how supplier data maps to the shared product structure of IHASHOP Dropshipping. This guide is based on the reviewed Dropshipping 1.0.0 source and existing synthetic tests. Examples are educational, not current live supplier catalogs.

1. Read the source and select the product collection

In Marketplace > Dropshipping Suppliers, choose Map product fields on the relevant product feed and click Read source. Format is detected from the content. Select Root records for a JSON root array or product elements below the XML root. GiyimDepom JSON suggests an empty path (root list), GiyimDepom XML Urun, and Luxstoree XML product. A JSON envelope may use a path such as payload.items; select only discovered options. Paths use dot-separated names, not XPath.

2. Map the nine product fields correctly

Product code and name are required to save. SKU, cost, reference price, currency, category, status and stock are the other product fields. A field name does not guarantee its meaning. Do not confuse product identity with SKU; external SKU and barcode remain source information and are not automatically copied into the shop SKU field. A selected variant path also requires variant code mapping.

3. Compare GiyimDepom and Luxstoree suggestions

The table shows suggestions from HazirAlanEslemeleri. For GiyimDepom JSON, @TRY is a fixed currency suggestion and @kategori calculates source category information. For Luxstoree XML, id is product identity and productCode is SKU; reversing them is rejected. In GiyimDepom XML, StokKodu and UrunKodu serve different purposes. A dash means no mapping is suggested in the template, not that the source cannot contain the field. Validate suggestions against actual data.

Suggested product field mapping

  • IHASHOP field: Product code.

    GiyimDepom JSON: ProductId.

    GiyimDepom XML: UrunKodu.

    Luxstoree XML: id.

  • IHASHOP field: Product name.

    GiyimDepom JSON: Name.

    GiyimDepom XML: UrunAdi.

    Luxstoree XML: name.

  • IHASHOP field: SKU.

    GiyimDepom JSON: Sku.

    GiyimDepom XML: StokKodu.

    Luxstoree XML: productCode.

  • IHASHOP field: Cost.

    GiyimDepom JSON: Price.

    GiyimDepom XML: ToptanFiyat.

    Luxstoree XML: price.

  • IHASHOP field: Reference price.

    GiyimDepom JSON: SatisFiyati.

    GiyimDepom XML: PerakendeFiyat.

    Luxstoree XML: sitePrice.

  • IHASHOP field: Currency.

    GiyimDepom JSON: @TRY.

    GiyimDepom XML: ParaBirimi.

    Luxstoree XML: currency.

  • IHASHOP field: Category.

    GiyimDepom JSON: @kategori.

    GiyimDepom XML: Kategori.

    Luxstoree XML: @kategori.

  • IHASHOP field: Status.

    GiyimDepom JSON: Status.

    GiyimDepom XML: —.

    Luxstoree XML: —.

  • IHASHOP field: Stock.

    GiyimDepom JSON: StockQuantity.

    GiyimDepom XML: ToplamStok.

    Luxstoree XML: quantity.

4. Separate cost from reference price

Price, ToptanFiyat and price are suggested costs; SatisFiyati, PerakendeFiyat and sitePrice are suggested reference prices. The GiyimDepom XML test reads cost 107.50 and reference price 322.50 separately. A Luxstoree fixture contains cost 199.90 with no reference price. These are not current commercial prices. Reference price is not the automatic shop selling price. A mapped, present variant cost takes precedence; missing variant cost may fall back to product cost. Verify VAT inclusion separately.

5. Check numerical formats

Normalization converts valid decimal text to canonical form, such as 130,50 to 130.50 and 1.234,56 to 1234.56. Text such as 1.234 or 1,234 with exactly three digits after a single separator is ambiguous; more than four decimal places and scientific-notation text such as 1e3 are rejected. Missing cost remains null; invalid cost may become GECERSIZ. Saved mapping can read values as text first, so inspect the preview even for JSON numbers. Negative variant cost or values above 99999999.9999 are rejected by sync validation. Do not assume silent rounding or truncation.

6. Define currency and category

@TRY produces a fixed TRY value, not currency conversion. Use it only after confirming supplier costs are in TRY. GiyimDepom JSON @kategori reads CategoryPath or CategorName from the first Categories entry and obtains CategoryId when present. Luxstoree XML @kategori builds a path from main_category, top_category, sub_category and category, skipping empty and consecutive duplicate segments. Source categories do not replace store category mapping.

7. Distinguish status and stock

Full reading with saved mapping skips products with status 0, false, inactive or disabled. Sample field preview does not apply the full-sync filter in the same way. Stock must not represent status or cost; known stock fields mapped this way are blocked. Zero stock is valid; blank means unknown. Fractional stock text such as 5.5 is invalid and may become -1, producing STOK_NEGATIF. Product stock may be read in preview, but saved mapping constructs variant stock separately and does not distribute total stock to each variant.

8. Validate identity and length limits

Sync validation limits product/variant IDs and SKU to 120 characters, barcode to 64, category ID to 120 and category path to 500. Variant stock is limited to 2147483647. Empty or duplicate product IDs, missing or duplicate variant keys, negative stock and invalid cost can cause product-level skipping and error counting. Length or numerical range violations produce ALAN_UZUN. Invalid product rates are also subject to protection thresholds. Prefer text identifiers to preserve formatting and leading zeros.

9. Preview, save and run a synchronization preview

Preview shows up to three products with twelve variants each. Review cost, reference price, category, identity and variant stock. Save mapping requires product code/name and variant code mapping when a variant path is selected. Preview again after changes. Saving does not import products; it stores connection-specific settings for the next sync. Review synchronization preview separately for existing catalog identities and full-data validation.

Related guides

Frequently asked questions

Are XML and JSON product fields identical?

The common target fields are the same, but source names and collection paths may differ.

Which product fields are required?

Product code and name to save, plus variant code mapping if a variant path is selected.

Is reference price the selling price?

No. It is separate information; selling prices are applied under administrator control.

Why is a cost of 1.234 invalid?

As text it is ambiguous between thousands and decimal notation; the system does not guess.

Is total product stock distributed to variants?

No. Saved mapping reads variant stock from its own selected field.

How to Map Supplier Product Variants

Frequently asked about this

The common target fields are the same, but source names and collection paths may differ.