Back to Documentation
Dropshipping Module

How to Manage Supplier SKU, Barcode and Product Identities

Manage external product IDs, variant identities, SKU and barcodes independently in IHASHOP Dropshipping with GiyimDepom and Luxstoree examples.

Supplier SKU, barcode and product identities are stored separately from shop product codes in IHASHOP Dropshipping. Source and shop catalogs are related through link records. This guide is based on Dropshipping 1.0.0 source code and existing synthetic tests.

1. Product identity, SKU and barcode

External product ID identifies a supplier product; external variant ID identifies its option. SKU is a commercial stock code and barcode is a separate source identifier. KaynakKimligi uses supplier code + external product ID + external variant ID as its natural key; SKU and barcode are not directly included. Luxstoree's use of barcode to derive an ID is an adapter-specific identity rule. Preserve identifiers as text, including leading zeros. Do not silently clean invalid control or invisible characters to invent another identity.

2. GiyimDepom and Luxstoree identity examples

The GiyimDepom JSON test uses ProductId=1001, ProductCombinationId=5001, Sku=GD-1 and Gtin=2372001598311. The ready-made XML suggestion uses UrunKodu for product ID, variant StokKodu for variant ID and SKU, and Barkod for source barcode. For Luxstoree XML id=9001, productCode=LX1 and barcode=8690000000111, the variant ID is a SHA-256-derived key with lx: prefix and 32 hexadecimal characters from product code and barcode. Equal inputs yield equal keys; different product codes with the same barcode yield different keys. Missing code or barcode produces no invented key. The built-in adapter marks it provisional. These are not live catalog records.

Comparative identity fields

IHASHOPGiyimDepom JSONGiyimDepom XMLLuxstoree XMLProduct IDProductIdUrunKoduidVariant IDProductCombinationIdStokKodubarcode → lx:…Source SKUSkuStokKoduproductCodeSource barcodeGtinBarkodbarcode

3. Database uniqueness rules

ds_supplier_products is unique on supplier_id + external_product_id; ds_supplier_variants on supplier_id + variant_key. Variant key is limited to 190 characters, external product/variant IDs and SKU to 120, barcode to 64. Barcode is indexed but not globally unique; it can occur in different products. Distinguish the DTO natural key from physical uniqueness: reusing a variant key within one supplier can conflict. Product and variant link tables have separate unique active source and shop keys. Inactive links may have null keys.

State/key consistency relies on service transactions, not a separate CHECK constraint. Foreign key RESTRICT prevents physical deletion of linked records. The current service uses one-to-one links; potential many-to-one schema expansion is not a current customer feature.

4. SKU when creating a shop product

When creating a new shop product in Product Publishing, the service generates SKU as DS-<uppercase supplier code>-<internal source record ID>. For internal record 42, examples are DS-GIYIMDEPOM-42 and variant SKUs DS-GIYIMDEPOM-42-1 and -2. This number is not external ProductId. Collisions are handled with suffixes such as -2 and -3. External SKU and barcode are not copied into shop SKU. The product is created inactive with zero stock; creation and links are protected transactionally. Verify sales and inventory status separately.

5. Safe linking to existing shop products

Search and select an existing shop product and explicitly map source variants to its shop variants. SKU search is not automatic matching. Partial mapping is allowed; unmapped variants receive no sales link. If eligible source variants exist, an entirely empty mapping is rejected. Another product's variant, repeated shop variant selection, another source product's variant, trashed or already linked products are rejected. Linking does not modify existing products or product_variants records. Link sale status can depend on VAT and snapshot validation; do not assume every link starts open.

6. Identity changes and synchronization

Saved-mapping synchronization checks existing non-missing catalog records. An existing SKU with a different product ID, no common old variant IDs for an existing product, or an old barcode with another variant ID may cause KOK_GECERSIZ. No common product is also rejected. Correct Luxstoree id, productCode and barcode mapping preserves the derived key. Barcode changes can create new identities; review synchronization preview first. Missing or duplicate variant keys are rejected by product validation. Do not bypass thresholds or manually edit database identities and links.

7. Acceptance checklist

Verify product and variant paths. Review external ID, SKU and barcode separately. Compare color and size options in preview. Inspect full synchronization preview for identity conflicts and missing records. Decide separately whether to create or link shop products. Verify VAT, price, inventory and sale status. GiyimDepom order API uses barcodes; Luxstoree uses product code and validated options, so verify source data separately.

Related guides

Frequently asked questions

Does supplier SKU become shop SKU?

No. It is stored separately; new shop SKU is generated by the system.

Must barcode be unique?

There is no global unique barcode index. Variant identity and adapter rules still apply.

How is Luxstoree variant ID generated?

It is derived from product code and barcode; missing inputs produce no key.

Does linking change existing shop SKU?

No. The linking service does not modify existing core product and variant records.

Can two sources link to the same shop variant?

The reviewed current one-to-one service rejects a second active link.

How to Use Field Mapping Preview

Frequently asked about this

No. It is stored separately; new shop SKU is generated by the system.