A worked example: where the task becomes difficult
A fictional inventory app imports products from a supplier spreadsheet. The file contains duplicate SKUs, prices with currency symbols and a description field containing line breaks. Splitting each line on commas will corrupt valid quoted fields. Use controlled examples with ordinary and unusual rows, then show the operator what will be created, updated or rejected before committing anything.
Decisions to make before implementation
Choose supported encoding, required headers, field types and duplicate identity. Decide whether an import is all-or-nothing or permits valid rows while rejecting others. Preserve row references in errors without publishing private contents. A preview must use the same validation contract as the commit. For large files, define job status and cancellation so a browser timeout does not make the operator assume nothing happened.
A practical sequence for the work
Use the sequence below as a task boundary, not as a claim that the example has been executed. Work with approved inputs and the project’s actual architecture. If a required integration or permission is unavailable, keep that stage visibly incomplete rather than generating a plausible substitute result.
- Write the field schema and representative valid and invalid rows.
- Parse with an appropriate CSV implementation and map headers deliberately.
- Show a validation preview with create, update and rejected counts.
- Commit through the approved duplicate policy and provide a traceable result.
A detailed brief you can adapt for your agent
Replace the illustrative context with your approved facts and controlled inputs. Keep the stated boundaries when adapting the brief. The expected deliverable matters more than a particular tool name: ask for an explanation grounded in the inspected material and evidence for the requested outcome.
Build a supplier-product CSV importer using this schema and controlled fixtures. Support quoted fields, explicit header mapping and a validation preview. Define SKU conflicts and job identity. Keep preview and commit validation consistent. Do not silently overwrite records or treat blank prices as zero. Return row-level failures and a reliable final import state.Failure modes that an attractive preview can hide
A retry after an uncertain response can duplicate rows if the import lacks job identity. Keep the accepted import reference and check its state before restarting. Do not silently convert missing prices to zero or overwrite existing products solely because names match. Large-file limits should be enforced at the receiving boundary, not only in the browser.
Technical references: MDN: form validation
Acceptance checks and the evidence to retain
Keep the schema, parsing fixtures, preview/commit contract and import result. The operator should understand changes before accepting them and recover from an uncertain response.
| Controlled case | Expected evidence |
|---|---|
| Description contains quoted commas and line breaks | It remains one correctly parsed field. |
| Duplicate SKU appears twice | The approved conflict rule is shown before commit. |
| Import response is interrupted | Operator can inspect the accepted job before retrying. |
Specific answers
Common questions
Can I parse CSV by splitting commas?
Not reliably for quoted delimiters and multiline fields; use an appropriate parser.
Should valid rows import when others fail?
Choose that policy explicitly and show its consequences in the preview.
What is the practical completion criterion?
Keep the schema, parsing fixtures, preview/commit contract and import result. The operator should understand changes before accepting them and recover from an uncertain response.
Sources and editorial method
These references support the indicated technical facts. Workflows, examples and decision tables are original Roseram analysis. Illustrative costs are not vendor prices. No search volume, organic difficulty, ranking result or product endorsement is implied.
- MDN: form validation ↗
Client validation helps users but cannot replace server-side validation.
Roseram offers AI software and may compete with tools discussed here. Sources checked 2026-10-11. Send a sourced correction.
Your next step
Keep a practical checklist.
Mark your progress. This checklist and helpfulness choice are saved on this device only; they are not public reviews.
0 of 5 complete
Share your experience in the community or submit a sourced correction. Public experiences remain separate from editorial claims.
Bring your next idea
Keep learning. Build with context.
Get Roseram model and workspace reopening updates. The guide remains available whether or not you subscribe.
Explore the workspace guide →