For the complete documentation index, see llms.txt. This page is also available as Markdown.

Product stitching

Automatically link related products together — colourways, sibling styles, product families.

Stitching links related products to each other automatically. If the same shirt exists as five separate products — one per colour — stitching connects all five, so each one knows about the other four.

The links are written to a product metafield you nominate, which your theme can then read to render a colour swatch row, a "also available in" strip, or anything else.

📸 Screenshot needed — the Stitching page listing rules with their status, pattern and last sync time.

How it works

A stitching rule has three parts:

  1. A source — the field to read: SKU or Title.

  2. A pattern — a regular expression with a capture group. Whatever the capture group extracts becomes the group key.

  3. A target metafield — where the links get written.

Every product whose source field produces the same group key ends up in the same group. Each product in a group then gets a metafield listing all the other products in it.

An example

Say your SKUs look like this:

1042-BLK-S
1042-BLK-M
1042-NVY-S
1088-GRN-L

With the pattern ^(\d{4})-.*$, the capture group grabs the leading four digits. The first three products all produce 1042 and get stitched together. The fourth produces 1088 and sits in its own group.

Creating a rule

  1. Go to StitchingNew rule.

  2. Name it something you'll recognise later.

  3. Pick the source: SKU or Title. (Tag matching is planned but not available yet.)

  4. Enter the pattern. A starter pattern is filled in for you when you pick a source.

  5. Set the target metafield — a namespace and key. This is where the links are written.

  6. Choose whether to restrict to the same vendor.

  7. Choose whether to auto-sync on publish.

  8. Save.

Writing the pattern

The pattern must be a valid regular expression containing at least one capture group — the bracketed part that extracts the group key. The form validates as you type and tells you if the capture group is missing.

Source
Pattern
Extracts

SKU

^(\d{4})-.*$

The first four digits: 1042-BLK-S1042

SKU

^([A-Z]+)-\d+$

A leading letter code: SHIRT-001SHIRT

Title

^(.+?)\s*-\s

Everything before the first dash: Merino Crew - NavyMerino Crew

Not comfortable with regular expressions? Use Suggest pattern. Describe what you want in plain language and Product Pelican drafts a pattern for you, which you can then test with a dry run before saving.

SKU matching uses the product's first variant's SKU. Products with no SKU (or no title, for title matching) are counted as unmatched and left alone.

Same vendor only

With this on, the group key is scoped per vendor: two products that produce the same key but come from different vendors go into separate groups. Useful when supplier codes overlap across brands.

Leave it off if your SKUs are globally unique.

Auto-sync on publish

With this on, the rule runs automatically whenever a product is created or updated in your store — so a newly published colourway joins its group immediately, without waiting for a manual sync.

Testing before you commit

Always run a dry run before syncing. It computes the groups the rule would produce, without writing anything, and reports:

  • how many groups it found

  • how many products were matched

  • the size of the largest group

  • how many products didn't match the pattern at all

📸 Screenshot needed — the dry run panel showing group count, product count, largest group and unmatched count.

A high unmatched count means the pattern is wrong. If your catalogue has 2,000 products and the dry run matches 40, the pattern isn't reading your SKUs the way you assumed.

An enormous single group also means the pattern is wrong. If one group contains most of your catalogue, the capture group is grabbing something every product shares. Groups above 250 products are flagged as oversized; groups are hard-capped at 2,000 links per product.

Groups of one are ignored — a product with no siblings gets nothing written.

Running a rule

Bulk sync runs the rule across your whole catalogue and writes the metafields. The page shows a live status while it runs and records the result.

The rule detail page also warns you when a rule has been edited since its last sync, so you know the written links are out of date.

Reading the logs

Each rule has a log recording every group synced, every run, and any errors. Use it to confirm the rule is doing what you expect after a sync, and to diagnose products that aren't getting linked.

The links are written to the metafield you nominated, as a list of product references. Your theme (or a developer) reads that metafield on the product page and renders whatever you want — swatches, thumbnails, a text list.

Product Pelican writes the data; it does not render it. There is no storefront block for stitched products. Displaying them is a theme change.

Last updated