The Scenario
You are a spa owner. You have just launched a three-tier loyalty program — Bronze, Silver, and Gold — based on total annual spend. The tiers have been calculated and recorded in a Google Sheet: column A has the Square customer ID, column B has the tier (Bronze, Silver, or Gold).
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 on Saturday.
The slow version:
- Log into Square's Customer Directory
- Search for the first customer by ID
- Go to their profile
- Find the custom attributes section
- Set the loyalty_tier value
- Save, go back, search for the next customer
- Eighty customers at two minutes each is nearly three hours of your Friday afternoon.
The fast version is one prompt.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent inside your Google Sheet 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 sheet, 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, sets the loyalty_tier value from column B on the customer in column A, 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 sheet with 80 rows resolved:
- Column C: "Updated" for every customer profile where the attribute was set
- Column C: error message for any row that failed — customer not found, attribute definition not found, etc.
- Upsert behavior — whether the customer had no tier before 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 the attribute on the profile if it is not there, or updates it if it is. You just need the attribute key (loyalty_tier) to be defined at the account level, which you set up once.
What If the Data Is Not Quite Ready
Tier assignment sheets often come with 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 the values in column B to proper case (Bronze, Silver, Gold). Then upsert the
loyalty_tiercustom attribute 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 tag customers with both loyalty_tier and crm_segment, with the CRM segment in column C.
For each row in this sheet, upsert two custom attributes on the Square customer in column A: set
loyalty_tierto the value in column B, and setcrm_segmentto the value in column C. Write "Updated" into column D if both succeeded, or the specific error message if either failed.
When some customers should have their tier attribute removed rather than set
A few customers who were previously in the loyalty program dropped out and should have their tier attribute cleared.
For each row in this sheet, check column C. If column C says "Remove," delete the
loyalty_tierattribute from the Square customer in column A. Otherwise, upsert theloyalty_tierattribute with 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 the order data in the Orders tab and want SheetXAI to calculate who qualifies for each tier and tag them in Square — all in one prompt.
In the Orders tab, calculate total annual spend per customer ID. Assign "Gold" to customers with $5,000 or more, "Silver" to $2,000 to $4,999, "Bronze" to $500 to $1,999, and skip customers below $500. For each customer that qualifies, upsert the
loyalty_tiercustom attribute in Square with the assigned tier value. Write customer ID, assigned tier, and the result ("Updated" or error) into the Tier Results tab.
The pattern: compute the tier and push the attribute in one prompt, without building an intermediate assignment sheet first.
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 a sheet or the Square in Google Sheets overview.
