GuidesBulk ActionsRe-link from Metafields

Re-link from Metafields (Bulk Action)

Re-link from Metafields makes PromoSync follow your metafields. For each product, it reads the psrestful.* metafields, works out which supplier product they point at, and moves PromoSync’s link for that Shopify product there. Products whose link already matches their metafields are left alone.

PromoSync keeps one link per Shopify product: the supplier product it imported it from. Inventory, price updates and Targeted Sync by supplier all use that link. When you edit a product’s metafields to point at a different supplier, the link stays on the old one until you run this action. Link to PromoSync does not help here, because it only registers products that have no link yet.

When to Use It

  • You moved products to another supplier by changing their Extra ID, or their Supplier Code and Product ID. The Switching Suppliers guide walks through the whole change.
  • You corrected an Extra ID that pointed at the wrong product.
  • You want to check that every product’s link agrees with its metafields. In-sync products cost nothing, so running it on your whole catalog is safe.

Before You Run It

Each product needs one of these:

  • psrestful.extra_id, the PSRESTful ID of the supplier product. It is the source of truth: it already names both the supplier and the product.
  • Or, with psrestful.extra_id empty, both psrestful.supplier_code and psrestful.product_id. PromoSync looks up the Extra ID from them and saves it to psrestful.extra_id for next time.

See Product Metafields for these fields and Variant Metafields for psrestful.part_id.

How to Run It

On selected products

  1. In Shopify Admin, go to Products and tick the products you changed.
  2. Click the ... button, then Apps > Bulk Product Sync.
  3. Pick Re-link from Metafields and click Submit.

On every product you moved from one supplier (Targeted Sync)

  1. In Shopify Admin, go to Apps > PromoSync.
  2. On the dashboard, find the Targeted Sync card and click Configure.
  3. In Action, pick Re-link from Metafields.
  4. In Target, keep Supplier selected and pick the supplier the products were linked to before the change. PromoSync still lists them under that supplier until they are re-linked.
  5. Click Preview count, then Run.

You can also use Sync Products (Filter/All) from the Products list to run it on all products or on one vendor.

The job runs in the background. Running it again is safe: products that are already re-linked are reported as in sync.

What It Does With Each Product

What PromoSync findsWhat happens
The link already matches the metafieldsNothing. No PSRESTful call is made for it.
The link points at a different supplier productThe link is moved to the product the metafields name.
The product has no link yetIt is linked, as Link to PromoSync would do.
No Extra ID can be worked out from the metafieldsSkipped and listed in the report.
psrestful.supplier_code or psrestful.product_id disagree with the product the Extra ID points atSkipped and listed in the report, so a mistyped value never moves a product to the wrong supplier.
The Extra ID is not found in PSRESTfulSkipped and listed in the report.

For products it moves or links, PromoSync reads the new supplier product once per distinct Extra ID (several Shopify products that share one Extra ID, such as one product per color, cost a single call). It uses it to check the metafields above and to compare each variant’s psrestful.part_id with the parts the new supplier lists.

⚠️

The same product at two suppliers can have different variants and different part IDs. When a variant’s psrestful.part_id is not one the new supplier lists, PromoSync still moves the product but names the variant in the report. It never guesses a match by color, size or UPC. Set the new supplier’s Part ID on each of those variants yourself; until you do, they get no inventory or price updates.

What the action does not change: your Shopify product, its variants, prices and metafields stay exactly as they are. Whether price updates are enabled for the product is kept. To pull fresh stock and prices from the new supplier, run Update Inventory and Update Prices afterwards.

Reading the Results

You’ll get an email titled “Re-link from Metafields Results” when the job finishes. It includes:

  • Re-linked, products whose link was moved to a different supplier product. Each one shows the old and the new Extra ID, the new supplier and product ID, and any variants with an unknown Part ID.
  • Newly Linked, products that had no link yet.
  • Already in Sync, how many products already matched. They are counted, not listed.
  • Skipped, products with no usable Extra ID, metafields that disagree, or an Extra ID PSRESTful does not know, each with the reason and what to fix.
  • Failed, products PromoSync could not check, with the error.
  • A CSV of every product in the run. After fixing the skipped products, feed it back through Targeted Sync > From CSV with Re-link from Metafields to re-run only the failed and skipped rows.

Common Questions

Does it use my PSRESTful plan’s calls?

Only for products it moves or links: one call per distinct Extra ID. Products already in sync cost no call. A product with no Extra ID but with Supplier Code and Product ID costs one lookup, the first time only.

Can a product be linked to two suppliers?

No. A Shopify product is priced and stocked from one supplier at a time. If an earlier change left a product with more than one link, this action keeps a single one, pointed at the product the metafields name.