# Importing data

For a business moving from another system, TowConnect imports the data free of charge. This guide shows how it works.

Moving data is usually the hardest part of changing software. **TowConnect support imports the old system's database free of charge.** Send it through a support ticket, whether it is a `.sql` export or the `.sqlite` or `.db` file a phone app keeps. The jobs, clients, trucks, drivers and invoices are imported in the right order and linked back together. CSV files and spreadsheets can also be imported directly in TowConnect.

> CSV and Excel files go through the importer one file at a time, with column matching, a question about tax, review checks, a sample check and undo. When a jobs file is imported after a clients file, match the customer ID column to **Link to a previous import**. TowConnect then attaches the jobs to the right clients.

## Excel workbooks with more than one tab

When an `.xlsx` file is uploaded, TowConnect reads every sheet in it, not just the first. If the workbook has several sheets, a list shows each sheet's name, row count and columns. Tick the sheets to import.

**Tabs with the same columns**, such as one tab per year, can be **combined into one import**, to match and review them once. **Tabs with different columns**, such as clients on one tab and jobs on another, each become their own import. **Import everything** starts a live checklist that works through them in the right order: clients before jobs, and jobs before invoices. The imports can also be created and worked through one at a time.

Where a column holds another sheet's ID and TowConnect recognises it, the matching step offers to link them. A workbook with only one sheet works exactly as before, with no list and no extra step.

> Row limits apply to each import. What counts depends on the sheets ticked. If sheets are combined into one import, the limit applies to their **total**. With one import per tab, it applies to **each tab on its own**. If something is over the limit, the picker says so and the **Upload** button waits. A file that would be refused is never uploaded.

## Running both systems side by side

Most businesses keep the old system going for a week or two and import again as they go. That is the safest way to switch, and importing again is built for it.

If a record was **edited in TowConnect** since the last import, its row is held for review and marked **changed here**, with the exact fields named. The file's older value never quietly overwrites that work. Decide record by record, or for all of them at once: **Keep what's in TowConnect** or **Take the file's version**. Rows that have not changed on either side are skipped.

If a repeat import does go wrong, **Undo** puts every updated record back the way it was. The only exceptions are records edited since, which Undo names and leaves alone.

## Invoice files with one row per line

Xero, QuickBooks and MYOB export invoices one **line** at a time, with the invoice number repeated down the file. TowConnect spots this after reading the file and asks one question, with 3 answers:

- **Each row is a line on the invoice**: TowConnect adds the amounts together into one invoice.
- **Each row repeats the whole invoice total**: TowConnect takes the total once and does not add it up.
- **They really are separate invoices**: TowConnect checks every row on its own.

To help with the choice, TowConnect shows one of the business's own invoices worked out both ways. Combined rows are kept and labelled with the invoice row they went into. The labels show exactly what was added. The answer can be changed and the check run again before anything is saved.

> The question must be answered. TowConnect will not choose, because the wrong choice changes what the invoices are worth. Until it is answered, the repeated rows show as duplicates, the buttons that would skip them are switched off, and the import cannot start. Once it is answered, TowConnect combines those rows instead.

> If one line of an invoice has a problem, such as a date TowConnect cannot read, that invoice is left uncombined rather than partly imported. **Every row of it is held back** and marked **uncombined line**. It cannot be imported worth only one of its lines. Once the row with the problem is fixed and the file is validated again, TowConnect combines the invoice. To leave that invoice out altogether, press **Skip these**.

## Vehicles still in the yard, and what they already owe

Storage records can bring their balance with them. If the **Storage charges accrued (ex GST)** column is matched, TowConnect keeps each balance exactly as it stands. The balance arrives as a charge on the vehicle called **Storage balance brought forward**. It shows on the record, on the release invoice and on the receipt like any other charge.

**TowConnect starts adding daily storage after the import, once the vehicle's days of free storage are over.** It never back-dates daily storage to the tow-in date. Months of history are not charged again at today's rate.

These figures go in on different sides of tax, because that is what they are. **Storage charges accrued (ex GST)** goes in **before tax**, and TowConnect taxes it at release in the same way as the charges raised in TowConnect. **Storage charges paid (incl. GST)** goes in **as it was actually paid, GST included**, because that is the money that came in, and it is what settles the release invoice. TowConnect works out what is still owing at release: the charges plus GST, less what has been paid.

For a vehicle that is already settled, match the column with **0** in it. That tells TowConnect that nothing is owing.

> If a row updates a vehicle already in the workspace, TowConnect leaves its accrued balance alone. TowConnect works that figure out from the vehicle's own charges, and overwriting it would put the record and its invoice out of step. Everything else on the row still updates.

## Jobs that would appear on the dispatch board

Job statuses such as **incoming**, **dispatched** or **on scene** mean live work. If the file has them, those jobs arrive on the **dispatch board** as work to do. That is right for a live changeover and wrong for years of history. Before the import starts, TowConnect counts those jobs and shows the count. A box must be ticked to accept them.

> To import old jobs only for the record, go back to **Edit mapping** and set the status column to be ignored. Every imported job then arrives as **completed**, and the board stays as it is.

## What TowConnect can import

- **Exports** from the old dispatch system, Towbook or any other, as CSV or Excel files
- **Accounting exports**: contact and invoice files from Xero, MYOB and QuickBooks
- **Spreadsheets**, even messy ones with mixed formats
- **Whole database files**: `.sql` dumps, `.sqlite` and `.db` files from phone apps, SQL Server `.bak` files, Access `.mdb` files, or a ZIP of everything.
- **Nothing at all**: the **Import data** screen offers a blank template as an Excel or CSV file, with the column headings ready and one example row to type over.

Getting data out of SQL Server, Access or a phone app has its own guide: [Moving from SQL Server, Access or another database](https://towconnect.dev/docs/migrating-databases).

## How TowConnect imports the data

1. Open **Import data**, or open **Support → New ticket** and choose **Data migration**.
2. Attach the files and name the system they came from.
3. TowConnect names the day the data will be ready, imports it into the workspace, and replies on the ticket when it is done.
4. Check the numbers. TowConnect fixes anything that is wrong. An import can be undone, and an undo keeps any record used since.

> If the export from the old system is unclear, or the records are still on paper, say so in the ticket. Getting the records out of the old system is TowConnect's job, not the business's.

## Using the guided importer

To do the import without help, **Import data** also has a guided importer. For a CSV or Excel file, the importer goes step by step through matching the columns and checking every value. It shows a preview of exactly what it will create before anything is saved. A whole import can be undone afterwards, and an undo keeps any record used since and names it.

- **Preview first**: every row shows what it will create or update. Anything questionable is grouped for review, and nothing is saved before it has been shown.
- **Undo**: an import can be taken back out, and any record used since is named and kept.
- **When help is needed**: wherever an import fails, stalls, has rows to fix or needs help undoing, a button hands it to TowConnect. TowConnect then takes over from exactly where the import stopped, free of charge.

> If the old system is still running alongside TowConnect, TowConnect can import the last few weeks' changes later. The importer recognises records it has seen before and does not duplicate them.
