Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I m using products import for Shopify with ten thousands of products. Now I added more locatios so I need another (inventory) CSV import for the stock. In the inventory CSV import I need to know the generated Handle by Shopify. Ideally I just take the same algorith, apply it to the title field and then I have the Handle used by Shopify. But I can not find a detailed description of the algorithm; the page which describes just lowercase and substitition of blanks; but a lot more is going on. Due to System restrictions I can not just query Shopify to get all handles, I need to have the Handle "locally". Is there a way or open-source code how Shopify is generated Handle Column from Title?
Ref: https://help.shopify.com/en/manual/products/import-export/using-csv#product-csv-file-format
Thx
Hey Arzt,
Simple hack:
1. Export your products from Shopify to get the products including handles.
2. Compare the inventory CSV and map the product handles by SKU / titles
Hope this helps
Best,
Flo
Hi - thx a lot; after some trial & error ... here is what works using postgres-sql - it give a good idea how the algorithm looks like:
create materialized view inventory_csv as
select
COALESCE(
REGEXP_REPLACE(
REGEXP_REPLACE(
TRANSLATE(
LOWER("Title"),
'äèéöüê',
'aeeoue'
),
'[^a-z0-9-]',
'-',
'g'
),
'-+',
'-',
'g'
)
) AS "Handle",
"Title",
"Option1 Name",
"Option1 Value",
null as "Option2 Name",
null as "Option2 Value",
null as "Option3 Name",
null as "Option3 Value",
"Variant SKU",....
thx
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025