1. Home
  2. Knowledge Base
  3. Pre-migration Preparation
  4. How to Migrate Data from a CSV file? [+Video]

How to Migrate Data from a CSV file? [+Video]

Data migration from CSV files can be a valuable solution for many business needs. This guide covers various aspects of CSV data migration, including:

  • Data entities and how to import them to your help desk, service desk, or ticketing system.
  • CSV file requirements to ensure your customer service data migration will be a success.
  • A CSV sample* for importing tickets and record types to include in your header and custom fields.
  • A CSV sample* for importing ticket comments and record types to include in your header.
  • A CSV sample* for importing knowledge base articles and record types to include in your header.
  • Tips on how to save your data in a CSV format.

* You can download any of the samples and use them for a Demo migration, as well as to insert your own data and use it for data migration. Or simply rename the headers in your CSV file to correspond to our requirements to the CSV file.

What data can you import via CSV?

To import your data, provide three files that contain

Create each file separately and then upload them to the Wizard. Make sure your CSV file corresponds to our requirements. Check the guidelines for migrating data from CSV below.

Migrate Data from a CSV file

CSV file requirements

Each file must possess a heading row with a summary column. The heading row is necessary to identify and map data objects.

  • The header row has no punctuation (apart from commas separating the columns).
  • The header row is in English (the language of the content in the second and other rows might be in any other language).
  • The header shouldn't include identical names. Be sure to double check this aspect.
  • All columns in the header row begin with a capital letter.

Pay attention to the following aspects:

  • Make sure your CSV file is encoded in UTF-8. This ensures proper recognition and display of special characters and symbols, and prevents hiccups during the import process.
  • Fields are separated by commas.
  • Use double-quote marks (") to capture data that spans multiple lines. Typically used for tags, attachments, and descriptions.
  • To attach files you need to provide a URL following which our service can access the attachment.  You may add multiple attachments - separate them by commas and quote the values in the field. Note that URLs for attachments support both HTTP and HTTPS protocols.

Preparing the file with Tickets (download sample)

To import tickets, prepare a CSV file which contains a heading row with the following columns:

HeaderFormatField
TicketId468985Required
SubjectTest subjectRequired
Tags"tag 1, tag 2"Optional
DepartmentNameSupportOptional
DescriptionTest DescriptionRequired
TypeTaskRequired
StatusOpenRequired
PriorityLowRequired
AgentEmaila.lewis@yourcompany.comRequired
AgentNameAdam LewisRequired
ContactEmails.gibbson@mail.comRequired
ContactNameStacey GibbsonRequired
ContactPhone1234567890Optional
CompanyNameFaux MartOptional
CreatedTimeYYYY-MM-DD HH:MM:SSRequired
UpdatedTimeYYYY-MM-DD HH:MM:SSRequired
ClosedTimeYYYY-MM-DD HH:MM:SSOptional
Attachments"https://site.com/attachment1.jpg, https://site.com/attachment1.pdf"Optional

Double-check the following things:

  • You can specify your time zone in the format 2021-09-07Т15:17:07+03:00.
  • If you don’t fill in your time zone, the time zone +3 sets up automatedly during the data migration.

Importing custom fields

To migrate custom fields, add tags to column headers (ticket field names) so that the Migration Wizard can identify them. Here are the tags you need to use:

  • _select - dropdown (e.g., ChooseProduct_select)
  • _date - time (e.g., due_date)
  • _integer - number (e.g., TicketInternal_integer)
  • _decimal - decimal (e.g., Cost_decimal)
  • Any other columns in a file without a tag will be treated as string(text) at mapping

Migrate and map other custom fields as text fields using the _textArea tag.

To be identified, tags should be in English.

Preparing the file with ticket comments (download sample)

Ensure your CSV file with ticket comments possesses a heading row with the following columns:

HeaderFormatField
CommentId468985Optional
TicketId485853Required
AuthorEmailjeremy@yourcompanydomain.comRequired
Public0-private, 1-publicRequired
Body"Test comment"Required
CreatedTimeYYYY-MM-DD HH:MM:SSRequired
Attachments"https://site.com/attachment1.jpg, https://site.com/attachment1.pdf"Optional

You can only submit one file with comments. Make sure to collect all ticket comments in that file.

Check the following aspects:

  • Make sure your CSV file is encoded in UTF-8. This ensures proper recognition and display of special characters and symbols, and prevents hiccups during the import process.
  • Fields are separated by commas.
  • The body of the comment or ticket description can contain HTML formatting.
  • To attach files, you need to provide a public URL following which our service can access the attachment. You may add multiple attachments - separate them by commas.
  • You can set up your time zone in the format 2021-09-07Т15:17:07+03:00. If you don’t fill in your time zone, the time zone +3 sets up automatedly during the data migration.

What to do with tickets that have more than one comment

Ensure that comments from the same ticket have the same TicketId. The Migration Wizard identifies where they belong. Double-check the CommentId set in the corresponding order. Ticket comments are sorted by creation date. Look at the example below:

CSV Import

Preparing the file with knowledge base articles (download sample)

To import knowledge base articles, provide a CSV file that contains a heading row with the following columns:

HeaderFormatField
TitleCreating discount codesRequired
CategoryDiscountsRequired
FolderOffering discounts and setting sale pricesRequired
Description"The body of the article"Required
StatusPublishedRequired
Tags"account, setup"Optional
Attachments"https://site.com/attachment1.jpg, https://site.com/attachment1.pdf"Optional

IMPORTANT

  • The body of the article can contain HTML formatting. Also, you can add images and videos.
  • Article statuses can differ. We accept all statuses, just make sure to map them when configuring your migration.
  • Your CSV file can't have folders with identical names if they belong to different categories. Consider renaming these folders before importing them.

Importing your CSV files

When your CSV files are ready, log into Help Desk Migration and start your CSV import.

Help desk migration can be done easy

Find out more about help desk migration services and run a test import to it in action. Want a personalized Demo?

Schedule a personalized Demo
Sales manager

CSV made easy: Simple tips to save your data in CSV format

Converting Excel, Numbers, LibreOffice Calc or Google Sheets to CSV

If you're working with data in a spreadsheet, you have the option of saving it in CSV format. Simply select "Save As" and choose the ".CSV" option, just like you would when saving as ".XLS" or ".TXT".

How to Covert LibreOffice Calc to CSV

This will automatically convert and save your file in CSV format without modifying the data itself. Additionally, you can also use the "Export to" or "Download" option to get a CSV copy of your file.

Google Sheets to CSV

Exporting data to CSV

This approach differs from the previous one as you're not just creating a file from the tabular data you've worked on in a spreadsheet. Instead, you're downloading data from your database in CSV format, creating a CSV file that can be edited in other applications, moved around, or backed up as necessary.

Note that not all programs or applications support downloading data in CSV format, which may necessitate the use of third-party tools to obtain the required data.

Using Notepad or Text Edit, etc. to CSV

Although not a common approach, it's possible to manage small amounts of data using a text editing program. you can handle small amounts of data using a text editing program. Make sure to structure the data using commas or another widely recognized delimiter, with each delimiter signifying a different "column" of data. Then, choose "Save As" and pick the "CSV" option from the available formats.

How to Save Notepad to CSV

Keep in mind that some text editors may require you to manually add the ".csv" extension in the file name, such as "File.csv".

Notepad to CSV : How to Rename File

Looking for more data migration details?

Let’s talk now
Was this article helpful?
%s
— %s