# Import data

With generic flat file integration, you can export data from your purchasing application and import it into Fairmarkit. As part of this process, you will export data to a CSV file and then email the file to Fairmarkit or upload the file to a Fairmarkit SFTP.

<figure><img src="https://1711751134-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F95QWDcOsKn95Me8sE2RP%2Fuploads%2F0ZWn1cVQLyKyR6gANMfg%2Fimport_thumb_0_0.png?alt=media&#x26;token=fc4ebe99-9709-45ad-83c3-8ee581bd71fc" alt=""><figcaption></figcaption></figure>

### 1. Create a file <a href="#id-1createafile" id="id-1createafile"></a>

First, you will need to create a CSV file with data you exported from your purchasing application that should be imported into Fairmarkit. Within your purchasing application, you should be able to select data to create a custom export to a CSV file. Typically, you'll be able to export based on conditions (e.g., a new requisition or supplier is created) in the application or on a scheduled basis (e.g., every 3 hours).

Your CSV file will need to be in a specific format. Fairmarkit provides templates outlining the required and optional data and the headers and formats needed to import data into Fairmarkit.

Template: Make sure you have the latest version of the flat file template ([view](https://docs.google.com/spreadsheets/d/1INb94RFKXMIBECHJ0DEpPo4EiY7iUvetkmloNSABD8o/edit#gid=0) | [download CSV file](https://docs.google.com/spreadsheets/d/e/2PACX-1vSsskPZC9mulbFftbuowuzDwLg43wu2SiFVbOWLulELeU0Pvr61n9e0LgwQ-jyt7KJEdnaRNtBt8wBq/pub?gid=0\&single=true\&output=csv)).

For more information on each type of import file, see:

* [Import categories](https://docs.fairmarkit.com/buyers/integrations/flat-file-integration/import-data/import-categories)
* [Import purchase orders](https://docs.fairmarkit.com/buyers/integrations/flat-file-integration/import-data/import-purchase-orders)
* [Import purchase requisitions](https://docs.fairmarkit.com/buyers/integrations/flat-file-integration/import-data/import-purchase-requisitions)
* [Import requests for proposal or information](https://docs.fairmarkit.com/buyers/integrations/flat-file-integration/import-data/import-requests-for-proposal-rfp-or-information-rfi)
* [Import suppliers](https://docs.fairmarkit.com/buyers/integrations/flat-file-integration/import-data/import-suppliers)

### 2. Upload files <a href="#id-2uploadfiles" id="id-2uploadfiles"></a>

Next, you will upload your CSV file to Fairmarkit.

Important: You will need to work with Fairmarkit to configure your chosen method to upload your files. See: [Prerequisites for flat file integration](https://docs.fairmarkit.com/buyers/integrations/flat-file-integration/prerequisites-for-flat-file-integration)

There are a few ways to upload your file:

#### SFTP

Fairmarkit allows you to upload files using standard SFTP. You can add the file to your shared folder or use the browser-based [Fairmarkit Files](http://files.fairmarkit.com/) site.

* Upload your file to your *to\_fairmarkit* folder (e.g., *production/to\_fairmarkit/).*

#### Email

Alternatively, you can upload files to Fairmarkit via email. When emailing your files, ensure your email includes the following information:

* **From**: Only send emails from the email registered with Fairmarkit during your integration setup.
* **To**: Send the email to the Fairmarkit assigned email.
* **Subject**: Enter the assigned subject for the file type you're sending.
* **Attachment**: Attach your CSV file.

### 3. Events and records created <a href="#id-3eventsandrecordscreated" id="id-3eventsandrecordscreated"></a>

Fairmarkit monitors the upload folders on a schedule. Once your files are uploaded, they will be processed and imported into Fairmarkit the next time the schedule runs.
