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 sitting in an Excel workbook. 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 workbook, 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 Excel workbook. 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.
Read the Excel table 'PurchaseRewards' (columns: contact_uuid, credit_amount), award each customer the credit amount in column B via Piggy, and log the result in 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 of the 'PurchaseRewards' sheet, trim whitespace and normalize to lowercase, then create the corresponding Piggy credit award using the amount from column B. 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 shows a credit amount, award the credits in Piggy and log the result in column C
The qualifying threshold varies by tier — stored in column D
For each row in the 'PurchaseRewards' 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 an Excel workbook 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.
