5 Best Practices for Building a CSV Uploader
Our comprehensive breakdown of key best practices to building a delightful CSV import experience.
Uploading a CSV file is a common capability in web applications across every industry. However, it's also one of the most notoriously frustrating experiences for most applications. Having a delightful CSV upload experience can set you apart from your competitors and make the right first impression with your customers.
The best CSV uploaders are intuitive, performant, and give the customer ample opportunity to correct issues without leaving your product. Whether your customers are uploading contacts, users, or financial data, the same core principles apply to developing your CSV upload experience.
Building a delightful upload experience is a deceptively complicated undertaking. Without proper planning, teams run into numerous delays. Proper project planning and awareness of the edge cases of CSV upload will lead to a much smoother launch.
See also: Customer survey: How much did it cost to build your CSV importer in-house?
Engineering teams are often faced with the decision to build technology in-house vs leveraging a pre-built SaaS solution. OneSchema is an embeddable CSV uploader that allows your engineering team to launch a delightful data upload feature in minutes instead of months. However, leveraging a hosted solution is not the best option for every engineering team.
Read more: Full comparison of the build vs buy tradeoff for engineering teams
So you’ve decided to build your own CSV uploader. Here are 5 steps to ensuring you get the experience right for your customers.
Read more: Lessons learned building a CSV importer, with founder Lior Harel
First, define what data you want to collect from your customers. Consider the following questions when defining your data model:
From here, you can define your data template: the specification for the files, columns, data types, and validations for the data customers will be uploading.
There are several other nuances of your workflow that will influence the design of your experience. You should also consider questions like:
The answers to these questions will determine if you want to invest in features like accepting partial data submissions, advanced error resolution workflows, saved mappings, session resume and user education components.
There are typically 4 steps in a CSV file upload interface
A component where your user can drag-and-drop a file or use a file picker to select a file to upload. It can be helpful to include user education on this pane to explain to your customers what data you'd like them to upload.
Allows your user to select which row of data is the header. We only recommend implementing this step if your customers frequently have data where the header is not the first row. The vast majority of our customers choose to skip this pane.
Allows your user to map columns from their uploaded CSV file to your column headers. A nice-to-have feature on this pane is suggested column mappings, typically based on fuzzy matching or historical uploads.
Shows your customer errors in the file and assists the customer with data conversion
The CSV format is unfortunately not as consistent as you might imagine. CSV file parsing is one of the most notoriously bug-prone aspects of CSV import (right behind data validation). While there are great open-source libraries out there, none are perfect and will likely require you to build and maintain an edge-case handling layer on top. Over time as your customers encounter errors, your parsing layer will become more robust. Common issues you may encounter with CSV parsing libraries include special characters, misplaced delimiters, and performance.
OneSchema is built in Rust, so we use rust-csv for parsing. Here are a few other libraries we recommend:
Read more here for a full rundown of the best CSV parsing libraries.
Typically, the most time consuming aspect of building and maintaining a CSV importer is building and maintaining your data validation logic.
There are typically 3 types of validations you may need in your CSV importer:
OneSchema supports an out-of-the-box library of validations for CSV files that can be used with or without OneSchema’s CSV import UI. Read more here about the benefits of leveraging a pre-built data validation library.
{{blog-content-cta}}
Once you’ve defined and implemented your user experience, you’re ready to launch your new CSV upload feature!
Home-rolled CSV uploaders often take several months to roll out fully as there are often edge-cases that are difficult to debug without live user traffic. For example, it will be difficult to improve your CSV parsing library without seeing some unusual files or catch edge cases in your data validation logic. Data mapping is another common step that requires extensive testing, especially if you implement logic to attempt to automatically map data for your customer.
We recommend rolling out your CSV importer to a subset of beta users and doing a few user research sessions to make sure customers understand how to use the feature. We also frequently see developers implement a rollback feature for bad imports as they can be quite painful to reverse manually.
Most teams also choose to publish a support page on how to use their CSV import tool. Unless it has been impeccably designed, it's a common area for support requests and having a FAQ with common points of confusion can save your support team a lot of time.
CSV uploaders can vary drastically in complexity depending on the specifics of your data model and use case. They can take anywhere from 2 weeks to 6 months (or more!) to launch and typically involve engineering, product, and design.
It can be helpful also to review the CSV import experience in other SaaS solutions as you may notice design patterns that would work well for your customers. Your competitor's data upload experiences will be especially helpful as they are likelier to have similar data and customers. However, there is no substitute for user testing as there are often nuances to your data model that you will need to clarify with your users.
Especially if your data upload experience is on a critical flow (such as customer onboarding), we highly recommend leaving ample time for testing. If you have any questions about the design of your experience, we are more than happy to share our expertise! Feel free to reach out to us at support@oneschema.co
Uploading a CSV file is a common capability in web applications across every industry. However, it's also one of the most notoriously frustrating experiences for most applications. Having a delightful CSV upload experience can set you apart from your competitors and make the right first impression with your customers.
The best CSV uploaders are intuitive, performant, and give the customer ample opportunity to correct issues without leaving your product. Whether your customers are uploading contacts, users, or financial data, the same core principles apply to developing your CSV upload experience.
Building a delightful upload experience is a deceptively complicated undertaking. Without proper planning, teams run into numerous delays. Proper project planning and awareness of the edge cases of CSV upload will lead to a much smoother launch.
See also: Customer survey: How much did it cost to build your CSV importer in-house?
Engineering teams are often faced with the decision to build technology in-house vs leveraging a pre-built SaaS solution. OneSchema is an embeddable CSV uploader that allows your engineering team to launch a delightful data upload feature in minutes instead of months. However, leveraging a hosted solution is not the best option for every engineering team.
Read more: Full comparison of the build vs buy tradeoff for engineering teams
So you’ve decided to build your own CSV uploader. Here are 5 steps to ensuring you get the experience right for your customers.
Read more: Lessons learned building a CSV importer, with founder Lior Harel
First, define what data you want to collect from your customers. Consider the following questions when defining your data model:
From here, you can define your data template: the specification for the files, columns, data types, and validations for the data customers will be uploading.
There are several other nuances of your workflow that will influence the design of your experience. You should also consider questions like:
The answers to these questions will determine if you want to invest in features like accepting partial data submissions, advanced error resolution workflows, saved mappings, session resume and user education components.
There are typically 4 steps in a CSV file upload interface
A component where your user can drag-and-drop a file or use a file picker to select a file to upload. It can be helpful to include user education on this pane to explain to your customers what data you'd like them to upload.
Allows your user to select which row of data is the header. We only recommend implementing this step if your customers frequently have data where the header is not the first row. The vast majority of our customers choose to skip this pane.
Allows your user to map columns from their uploaded CSV file to your column headers. A nice-to-have feature on this pane is suggested column mappings, typically based on fuzzy matching or historical uploads.
Shows your customer errors in the file and assists the customer with data conversion
The CSV format is unfortunately not as consistent as you might imagine. CSV file parsing is one of the most notoriously bug-prone aspects of CSV import (right behind data validation). While there are great open-source libraries out there, none are perfect and will likely require you to build and maintain an edge-case handling layer on top. Over time as your customers encounter errors, your parsing layer will become more robust. Common issues you may encounter with CSV parsing libraries include special characters, misplaced delimiters, and performance.
OneSchema is built in Rust, so we use rust-csv for parsing. Here are a few other libraries we recommend:
Read more here for a full rundown of the best CSV parsing libraries.
Typically, the most time consuming aspect of building and maintaining a CSV importer is building and maintaining your data validation logic.
There are typically 3 types of validations you may need in your CSV importer:
OneSchema supports an out-of-the-box library of validations for CSV files that can be used with or without OneSchema’s CSV import UI. Read more here about the benefits of leveraging a pre-built data validation library.
{{blog-content-cta}}
Once you’ve defined and implemented your user experience, you’re ready to launch your new CSV upload feature!
Home-rolled CSV uploaders often take several months to roll out fully as there are often edge-cases that are difficult to debug without live user traffic. For example, it will be difficult to improve your CSV parsing library without seeing some unusual files or catch edge cases in your data validation logic. Data mapping is another common step that requires extensive testing, especially if you implement logic to attempt to automatically map data for your customer.
We recommend rolling out your CSV importer to a subset of beta users and doing a few user research sessions to make sure customers understand how to use the feature. We also frequently see developers implement a rollback feature for bad imports as they can be quite painful to reverse manually.
Most teams also choose to publish a support page on how to use their CSV import tool. Unless it has been impeccably designed, it's a common area for support requests and having a FAQ with common points of confusion can save your support team a lot of time.
CSV uploaders can vary drastically in complexity depending on the specifics of your data model and use case. They can take anywhere from 2 weeks to 6 months (or more!) to launch and typically involve engineering, product, and design.
It can be helpful also to review the CSV import experience in other SaaS solutions as you may notice design patterns that would work well for your customers. Your competitor's data upload experiences will be especially helpful as they are likelier to have similar data and customers. However, there is no substitute for user testing as there are often nuances to your data model that you will need to clarify with your users.
Especially if your data upload experience is on a critical flow (such as customer onboarding), we highly recommend leaving ample time for testing. If you have any questions about the design of your experience, we are more than happy to share our expertise! Feel free to reach out to us at support@oneschema.co