A Complete Guide to Data Hooks for Importing Data

Sheila Lahar

Posted 1/22/2021

We all know about how important it is to get customers to the “Aha moment” quickly and successful customer onboarding plays a huge role there. 

But many in the SaaS industry are still glossing over a really important part of onboarding: data. 

Product teams are saddled with building out complex CSV importers on their own, while Customer Success teams have to fix customer data in order to make it usable. 

Data Hooks, part of Flatfile Portal, allows you to easily add any data healing or validation feature you need to on our CSV importer, making it a flexible and scalable solution for data onboarding

In this article, we describe Data Hooks and the problems they solve.

The challenges with data importing

Depending on your product and your customers, importing data might be a nuisance or a nightmare. Some enterprise software products, such as an inventory management software or a CRM, are completely unusable without customer data. 

But importing this data in a timely manner can be a struggle for both the customer and the company. 

Challenges for customers

If you don’t think data onboarding is a problem, think again. Importing CSV files is no one’s idea of a good time. 

In our State of Data Onboarding survey, we discovered that 23% of software customers reported that it takes weeks or months to import their data and that 96% have run into problems when importing data.

For customers, data importing can be time consuming, unintuitive, and confusing. Customers often need to put a lot of effort into prepping their data before it’s ready to upload. And CSV importers don’t usually give useful troubleshooting tips when something goes wrong. 

Worse still, fixing the data requires the user to leave the app, hunt for the issue in their CSV file, and then return to the platform to re-upload it. In short, addressing CSV issues isn’t a native experience, which causes further time drains on your customers.

Challenges for product, customer success, and engineering teams

The majority of software teams are using both an internal-built tool and manual data import processes. 

That means that the responsibility of data importing falls on the inhouse team. They must build a quality data importer that offers a great experience to users, and they also have to step in with manual assistance when that data importer fails, or when an individual customer struggles to make good use of it. 

Some enterprise software companies have full time employees devoted entirely to preparing and onboarding customer data. This manual work isn’t a necessity. It represents a lack of efficient, scalable data onboarding systems.

Data Hooks allow your team to scalably address the data import problems that are slowing everyone down.

What are Data Hooks?

Data Hooks allow for more fringe use cases of data healing and validation using Flatfile Portal, our CSV import widget that offers an intuitive data onboarding experience inside of your app. It’s complete with helpful error troubleshooting and the ability to fix CSV errors without leaving your app. 

We’re continually building more data healing and validation functionality, but Data Hooks cover anything that’s not yet included in our core product. 

There are two types of Data Hooks:

  • Field hooks are for columns - Field hooks run validation on a particular column of data during the matching and importing process.
  • Record hooks are for rows - Record hooks run validation on each row of data, and can be used for single-field, multi-field, or cross-field validation.

What are some use cases for Data Hooks?

In our Data Hooks documentation, you’ll find a growing library of code snippets you can use to handle a variety of data validation or transformation needs, including:

  • Reformatting specific value formats - As an example of single-field validation, a CSV file might state “zip” whereas your data schema calls this the “zip code.” The simple Data Hook snippet would allow this to be automatically mapped, and the customer could review and accept the mapping. 
  • Splitting specific value formats - Let’s say a customer has a source file with many full names on it, but your data schema only allows the first name and last name fields. A Data Hook for field splitting ensures that data imported with Flatfile Portal is input not only correctly, but with the minimal amount of involvement from your customer as possible. 


  • Validating data with your server - You wouldn’t want customers uploading duplicate contact records to your CRM. You can use a Data Hook to validate data with your server, so that during the import process a callback function denotes which email addresses or phone numbers already exist in the database.
  • Cross-field validation - Maybe you want to require a column of data only if other data isn’t included. For example, if phone number and mailing address aren’t present, then an email address is required for that row of data to be uploaded.

How do Data Hooks address important issues with data importing?

As a startup with a never-before-seen product (a pre-built data importer), we’re building out all of the data validation and healing that we can, as quickly as we can. Data Hooks ensure that you can use Flatfile Portal for rarer use cases that we haven’t fully built out yet, and that it will be easy to do so. 

The other good news is that we can see which Data Hooks are being used most frequently so we know what to add to Flatfile Portal next.

But it’s not about us is it? It’s about your customers and your team. 

For your customers 

Customers using Flatfile Portal and the Data Hooks snippets you’ve implemented from our library will enjoy a much easier importing flow. The experience is fully whitelabelled, and customers won’t have to leave your app in order to make the changes to their CSV file that might be required during troubleshooting. That means no context switching. 

And because the Data Hooks can cover the most important issues faced by your customers, the entire process will be much faster too. 

For your product, customer success, and engineering teams

Companies using Data Hooks to solve common data importing problems not only save time for their customers, but themselves as well. 

Customer success teams can focus less on importing customer data and more on product optimization and feature utilization to drive real value. Similarly, software engineers won’t get roped into cleaning up a customer’s data file and can instead focus on their current sprint.

Data Hooks allow your team to scalably address the data import problems that are slowing everyone down.

Start importing data in minutes
Start for free