The Scenario
The coffee chain's marketing director is preparing the Q2 loyalty campaign. She wants a segment of customers to export to the email tool: everyone in Loyverse with more than 2 visits (total_visits field) and a populated email address. The campaign platform needs name, email, city, customer_code, and total_visits.
Her admin pulled a CSV from Loyverse last week. It had name and email but not total_visits or customer_code — those weren't in the export format Loyverse provided. She's been told the data is "in there somewhere."
The bad version:
- Export customers from Loyverse again. Still no total_visits in the CSV.
- Try the API documentation. Find that total_visits is a field on the customer object but the UI export doesn't include it.
- Ask the developer to write a script. Developer is on deadline. Request goes into the queue.
The campaign launch date is set. The segment question is blocking everything behind it.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent that lives inside your Excel workbook. It calls the Loyverse API directly — not the UI export — and pulls whatever customer fields are available in the API, including total_visits and customer_code.
Open the SheetXAI sidebar and paste this prompt:
Export all Loyverse customers to Excel 'CRM Import' with name, email, city, customer_code, and total_visits
What You Get
- All Loyverse customer records written to 'CRM Import' with the five columns specified.
- total_visits pulled from the API — not limited by the UI export format.
- customer_code included for the campaign platform's deduplication key.
- Data ready to filter, sort, or import into the email tool.
What If the Data Is Not Quite Ready
She only wants customers with more than 2 visits and a valid email
Export all Loyverse customers where total_visits is greater than 2 and email is not blank — write to Excel 'CRM Import' with name, email, city, customer_code, total_visits — sort by total_visits descending
She wants to split into tiers based on visit count
Export all Loyverse customers with total_visits greater than 0 — write to 'CRM Import' with name, email, total_visits, and a 'tier' column: 'VIP' if total_visits > 10, 'Regular' if 4–10, 'Occasional' if 1–3
She wants the full name split into first and last for the campaign template
Export all Loyverse customers with email populated — split full name into first_name and last_name — write to 'CRM Import' with first_name, last_name, email, city, customer_code, total_visits
Full campaign-ready export in one shot
Export all Loyverse customers where email is not blank and total_visits is greater than 2 — sort by total_visits descending — write to 'CRM Import' with first_name, last_name, email, city, customer_code, total_visits, loyalty_points, and a 'tier' column based on visit count (VIP/Regular/Occasional) — add a count row at the bottom
Try It
Get the 7-day free trial of SheetXAI and open a blank Excel workbook, then ask SheetXAI to pull the Loyverse customer segment you need for the campaign — including the fields the UI export doesn't surface. See also export receipts for analysis and the Loyverse integration overview.
