Back to Piggy in Google Sheets
SheetXAI logo
Piggy logo
Piggy · Google Sheets Guide

Bulk Award Loyalty Credits to Customers From a Google Sheet

2026-05-14
5 min read

The Scenario

It's two days before a loyalty campaign goes live. Your Shopify store ran a purchase promotion last month — anyone who spent over $100 gets 500 credits — and the qualifying list is already sitting in your Google Sheet. Two hundred rows. Column A has the UUIDs, column B has the spend total, column C is blank and waiting for the result.

The bad version:

  • Open Piggy, find the customer search, paste a UUID, navigate to their credit history, manually award 500 credits, confirm the action.
  • Return to the sheet, type SUCCESS into column C, move to row 2, repeat.
  • Somewhere around row 60, you accidentally award credits to a customer who doesn't qualify because you copied a row offset.

The campaign is on a schedule. You are not a data entry service. Every hour you spend on this is an hour you're not spending on the email copy, the segment setup, or the post-campaign analysis.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent that lives inside your Google Sheet. It reads your data, connects to Piggy, and can award credits to every qualifying row in one operation. You describe the task; it does the work.

For each customer UUID in column A where column B is greater than 100 (200 rows), create a credit reception in Piggy for 500 credits and write SUCCESS or FAILED into column C

What You Get

  • Column C fills with SUCCESS for every row where the credit award was accepted by Piggy.
  • Rows where the UUID was not found or the API returned an error get FAILED so you can review them separately.
  • The operation runs across all 200 rows in one pass — no tab-switching, no copy-paste, no manual logging.
  • Any Piggy-side validation errors (invalid UUID format, account suspended) surface in column C so nothing is silently skipped.

What If the Data Is Not Quite Ready

The UUIDs have extra spaces or inconsistent formatting

For each UUID in column A, trim whitespace and normalize to lowercase, then create a 500-credit reception in Piggy for each customer and write the result into column C

Some customers appear twice — different rows, same UUID

Before awarding credits, check column A for duplicate UUIDs and flag duplicates in column D. Then for each unique UUID where column B is over 100, award 500 credits in Piggy and log the result in column C

The qualifying threshold varies by tier — stored in column D

For each row in this sheet where column C says "Gold", award 1000 credits; where column C says "Silver", award 500 credits. Write the awarded amount and result status into columns D and E

Clean up the list, validate UUIDs, award credits, and log everything in one pass

Remove any rows where column A is blank, check each remaining UUID against Piggy to confirm the contact exists, award the credit amount from column B to each valid contact, and write the Piggy contact ID and result status into columns C and D. Summarize how many succeeded and how many failed in cell F1

One prompt that does the data hygiene, the validation, and the actual operation together cuts the back-and-forth that normally stretches a 30-minute task into an afternoon.

Try It

Open a Google Sheet with your customer UUID list and purchase data, then Get the 7-day free trial of SheetXAI and ask it to award Piggy credits based on your qualifying column. For related workflows, see how to pull credit balances for VIP segmentation 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