Back to Piggy in Excel
SheetXAI logo
Piggy logo
Piggy · Excel Guide

Sync a Product Catalog Excel Into Piggy for Loyalty Earn Rules

2026-05-14
5 min read

The Scenario

The dev team is two days away from wiring up loyalty earn triggers on a new Shopify integration. Before any triggers can fire, every product needs to exist in Piggy with the correct external identifier. The ecommerce operations manager has 150 product SKUs in an Excel workbook — the 'ProductCatalog' sheet, columns for sku and name — and needs to confirm every one of them is in Piggy before the engineers start.

The bad version:

  • Go into Piggy, find the product management section, search for SKU one, check if it exists, create it if it doesn't, note the Piggy product ID.
  • Repeat 149 more times. Some SKUs are already there from a previous import. Some aren't. There's no easy way to tell from the workbook alone which is which.
  • Two hours later, you have a mix of product IDs and gaps, and the dev team is asking if it's ready.

The integration timeline doesn't flex. The products need to be ready before the engineers start. Doing this one by one is how blockers get created.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent that lives inside your Excel workbook. It reads the product list, calls Piggy's find-or-create endpoint for each one, and writes the returned Piggy product ID back into the workbook — so you end up with a complete reference map in one pass.

Read 150 SKUs from the Excel sheet 'ProductCatalog' (columns: sku, name), find or create each in Piggy, and write the returned product ID into column D

What You Get

  • Column D fills with the Piggy product ID for each product — whether the product already existed or was just created.
  • Rows where Piggy created a new product can be distinguished from existing ones if Piggy returns a created flag — SheetXAI writes that into column E.
  • Rows where the operation failed (missing name, invalid SKU format, API error) get a descriptive note so you can fix and retry those specific rows.
  • All 150 products are processed in one pass, giving the dev team a complete SKU-to-Piggy-ID reference map they can use to configure the earn triggers.

What If the Data Is Not Quite Ready

Some SKUs have inconsistent formatting — mixed case, extra dashes

For each row in the 'ProductCatalog' sheet, normalize the sku in column A to lowercase with hyphens replacing underscores, then call Piggy's find-or-create product endpoint. Write the normalized sku into column C and the returned Piggy product ID into column D

You need to know which products were new versus already existing

For each product in the 'ProductCatalog' sheet, call Piggy's find-or-create product endpoint. Write the Piggy product ID into column D. Write CREATED into column E if the product was new, or EXISTING into column E if it was already in Piggy. Write the total new and existing counts into cells G1 and G2

Some rows have a category in column C that needs to be passed to Piggy on creation

For each row in the 'ProductCatalog' sheet (columns: sku, name, category), call Piggy's find-or-create product endpoint. Include the category field on creation. Write the returned Piggy product ID into column D and the status into column E

Normalize, find-or-create, validate the result, and build the full reference map

For each of the 150 products in the 'ProductCatalog' sheet, normalize the sku to lowercase. Call Piggy's find-or-create endpoint with the sku and name. Write the Piggy product ID into column D, whether it was created or pre-existing into column E, and any errors into column F. After all rows are processed, write a summary into cells H1 through H3: total processed, total created, total errors

Combining the normalization, the sync, and the summary in one prompt means you hand the dev team a workbook they can actually use rather than a partial list with gaps to fill.

Try It

Open an Excel workbook with your product SKU list and Get the 7-day free trial of SheetXAI. Ask it to find or create every product in Piggy and write the IDs back so your earn rules are ready to wire up. For related workflows, see how to export the Piggy perks catalog or the full Piggy integration overview.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more