Advanced SKU: built from product details
Tick what goes in, drag it into order, and see each code before it's saved. You can use:
- Product name, vendor and type: first 1, 2 or 3 characters, first of each word, all of it, or your own length from 4 to 10.
- Variant options: each option has its own setting.
- Product year: the last 2 digits of the year it was created.
- Metafield: a product or variant metafield, such as a supplier code.
- Prefix, suffix and Auto Number: fixed text, and a running number from where you choose.
- Delimiters for Readability: a dash, slash, underscore, pipe or dot between parts.

| Product | Layout | SKU |
|---|---|---|
| Leather Handbag, Blue, by Northwind | Vendor, name, colour, number | NOR-LEA-BLU-001 |
| Soy Jar Candle, Cedar Moss | First of each word, number | SJC-CM-002 |
Custom pattern: your own format
Write the format and SGT counts up from the number in the Auto code box. Square brackets say which characters to use and the number says how many.
Using Shopify? SGT is our app for this: see it on the Shopify App Store (free plan, 4.8 from 53 reviews).
| Pattern | Makes |
|---|---|
[0-9]{9} | 9 digits |
NOR-[0-9]{6} | Your text, then 6 digits |
BAR[A-Z0-9]{10} | Your text, then 10 letters and digits |
<PRICE>-[0-9]{4} | The price without its point (19.99 becomes 1999), then 4 digits |
Include product data adds a field to the start of the pattern for you, and you can move it. A pattern can make codes up to 64 characters long, with up to 40 in each bracket section, and SGT tells you how many codes it can make. Avoid spaces: they cause trouble in searches and on some scanner setups.
Different formats for SKU and barcode
Choose Both SKU and Barcode (paid plan) and you get a SKU tab and a Barcode tab (SKU (Template 1) and Barcode (Template 2) on AutoGen Setup), each with its own format and running number.
Keep SKUs sensible
Shopify's own limit is 255 characters, but short codes print and scan better. See how to create SKUs for naming advice.
Prefer video? Watch the 90-second SGT tour on YouTube.
Frequently asked questions
Can I put a metafield value in my SKU?
Yes. Add Metafield to the layout, choose product or variant, enter its namespace.key and click Verify. It supports text, number, true/false, colour, date and URL metafields.
Can a SKU include the vendor and product type?
Yes. Tick Product Vendor (Vendor Code on AutoGen Setup) and Product Type, choose how many letters to keep, and drag them into place. For example NOR-BAG-001.
How do I use the same SKU on every variant of a product?
Tick Same SKU for all variants. Do this only if you really want them to share one, because reports and systems that count by SKU will treat them as one product.
How long can a custom SKU be?
Shopify allows 255 characters. SGT's Custom pattern makes codes up to 64 characters. Advanced SKU warns you if a code is too long for Shopify.