The Scenario
You are a spa owner. You have just launched a three-tier loyalty program — Bronze, Silver, and Gold — calculated from annual spend. The tiers are in an Excel workbook: column A has the Square customer ID, column B has the tier.
You have 80 customers to tag. Square has a custom attribute called loyalty_tier already defined in your account. You need to set it on each customer profile before the tier-based promotions go out Saturday.
The slow version:
- Log into Square's Customer Directory
- Search for the first customer by ID
- Open their profile, find the custom attributes section
- Set the
loyalty_tiervalue, save - Go back, search for the next customer
- Eighty customers at two minutes each is nearly three hours of Friday afternoon.
The fast version is one prompt.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent inside your Excel workbook that reads the customer IDs and tier values and upserts the custom attribute on each Square profile, writing a confirmation back per row.
Open the SheetXAI sidebar and type:
For each row in this workbook, upsert the custom attribute
loyalty_tieron the Square customer in column A using the value in column B. Write "Updated" into column C if it succeeded, or the error message if it failed.
SheetXAI calls Square's custom attribute upsert endpoint for each row and writes the result into column C. If the attribute already has a value, it gets updated. If not, it gets created.
What You Get
A workbook with 80 rows resolved:
- Column C: "Updated" for every customer where the attribute was set
- Column C: error message for any row that failed — customer not found, attribute definition missing
- Upsert behavior — whether the customer had no tier or an old one, the new value replaces it
The attribute definition does not need to exist on the customer profile already. Square's upsert endpoint creates or updates it. You just need the attribute key (loyalty_tier) defined at the account level.
What If the Data Is Not Quite Ready
Tier assignment workbooks often have data quality issues. SheetXAI handles them in the same prompt.
When tier values are not consistently cased
Some rows say "gold," some say "Gold," some say "GOLD." Square's attribute is case-sensitive.
Before setting any attributes, normalize column B values to proper case (Bronze, Silver, Gold). Then upsert the
loyalty_tierattribute on each Square customer in column A using the normalized value. Write "Updated" or the error into column C.
When you also want to set a second custom attribute at the same time
You want to set both loyalty_tier and crm_segment on each customer, with the CRM segment in column C.
For each row in this workbook, upsert two custom attributes on the Square customer in column A: set
loyalty_tierto column B, andcrm_segmentto column C. Write "Updated" into column D if both succeeded, or the error message if either failed.
When some customers should have their tier attribute cleared
A few customers dropped out of the program and should have their tier attribute removed.
For each row, check column C. If column C says "Remove," delete the
loyalty_tierattribute from the Square customer in column A. Otherwise, upsertloyalty_tierwith the value in column B. Write the result into column D.
When you need to calculate tiers from order data and tag customers in one shot
You have order data in the workbook and want SheetXAI to calculate who qualifies for each tier and tag them in Square.
In the Orders tab, calculate total annual spend per customer ID. Assign "Gold" to $5,000 or more, "Silver" to $2,000 to $4,999, "Bronze" to $500 to $1,999, and skip customers below $500. For each qualifying customer, upsert the
loyalty_tierattribute in Square with the assigned tier. Write customer ID, assigned tier, and the result into the Tier Results tab.
The pattern: compute the tier and push the attribute in one prompt, without a separate assignment workbook.
Try It
Get the 7-day free trial of SheetXAI and tag your loyalty customers in Square before the next promotion. The Square integration is included in every SheetXAI plan. For related workflows, see how to add customers to a Square group from an Excel workbook or the Square in Excel overview.
