The Scenario
You are an operations manager at a wholesale distributor. It is Wednesday afternoon and the system migration is scheduled for Friday morning. You have 150 customers sitting in a Google Sheet exported from your legacy system — customer name in column A, customer group in B, territory in C — and every single one needs to be in ERPNext as a Customer DocType record before the go-live.
The IT consultant told you "just use the data import tool." You tried. The template format is different from your export. Column B needs to match an exact customer group that already exists in ERPNext. Three of your groups do not exist yet. And when you uploaded the first test batch of ten rows, four failed with validation errors that only told you "incorrect value."
The bad version of this migration:
- Download ERPNext's customer import template, reformat 150 rows to match
- Upload a test batch, debug validation errors one by one
- Fix the customer groups that do not exist in ERPNext first
- Re-upload, discover two more columns are formatted wrong
- Repeat until all 150 rows succeed
- Friday arrives and you are still reconciling the last 30 rows.
The fast version is one prompt.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent inside your spreadsheet that reads your customer data and creates the ERPNext records directly, writing confirmation back into the sheet so you know exactly which rows landed.
Open the SheetXAI sidebar and type:
Create an ERPNext Customer document for every row in this sheet. Column A is the customer name, column B is the customer group, and column C is the territory. Write the returned ERPNext document ID into column D for each row. If a row fails, write the error message into column D instead of skipping it.
SheetXAI iterates through all 150 rows, calls the ERPNext API for each, creates the Customer record, and writes either the document ID or the error message into column D. You can see exactly which rows need attention without running a second report or cross-referencing error logs.
What You Get
A completed sheet with 150 rows of confirmation data:
- Successful rows — ERPNext document ID written into column D
- Failed rows — the specific ERPNext error message in column D, so you fix the right thing
- No silent skips — every row gets a result, pass or fail
You know the migration status at a glance by scanning column D. No log files, no ERPNext import history to parse, no guessing which customers made it.
For the rows that failed, you fix the value inline in the sheet and re-run the prompt on just those rows. SheetXAI only processes the rows without an ID in column D.
What If the Data Is Not Quite Ready
Legacy exports are rarely clean. SheetXAI handles data cleanup and the ERPNext insert in the same prompt.
When customer group names do not match ERPNext's list
Your legacy system used "Retail" and "Wholesale" but ERPNext expects "Retail Customers" and "Wholesale Distributors."
Normalize the customer group values in column B: replace "Retail" with "Retail Customers" and "Wholesale" with "Wholesale Distributors." Then create an ERPNext Customer record for each row using the corrected values and write the document ID into column D.
When some rows are missing territory
A third of the rows have blank territory fields. ERPNext requires territory.
For any row where column C is blank, fill it with "All Territories" before creating the ERPNext Customer record. Then create the records for all rows and write document IDs into column D.
When the customer name has leading or trailing spaces
The legacy export has inconsistent spacing that will cause duplicates in ERPNext.
Trim leading and trailing spaces from column A for every row. Then create the ERPNext Customer records and write the document IDs into column D.
When the sheet has duplicate customer names from the legacy export
The export ran twice and some customers appear on two rows.
Deduplicate this sheet by customer name (column A), keeping the first occurrence of each name. Then create ERPNext Customer records for all unique rows, writing the document ID into column D. Write "DUPLICATE — skipped" into column D for the removed rows.
The pattern: fix the data and create the records in one instruction. You do not need to clean the sheet, save it, and then run a second prompt to do the import.
Try It
Get the 7-day free trial of SheetXAI and run it against your customer migration sheet. The ERPNext integration is included in every SheetXAI plan. For related workflows, see how to bulk-create Item records from a product catalog sheet or the ERPNext in Google Sheets overview.
