imports_historyPreview
Dry run of a history import (kind jobs, quotes, invoices, pricebook, equipment, maintenance_plans, payments or flat_rate). Writes nothing. Returns a suggested mapping, what each record would do (create, update, skip, skip_blank, skip_closed or error) with how its customer matched, and a preview_hash. Show it to the owner; imports.historyRun needs the same hash.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| csv | Yes | ||
| kind | Yes | ||
| preset | No | ||
| source | No | Where the file came from, like jobber or housecall_pro. Old ids are remembered per source. Defaults to the preset, or csv. | |
| mapping | No | ||
| shop_id | Yes | ||
| on_match | No | What to do with a record already imported (same old id) or already in Doing Work. skip (default) leaves it as it is; update refreshes jobs (summary, status, new visits) and price book items. Quotes and invoices are never changed after import. | |
| plans_as | No | maintenance_plans only. reminders (default): service due reminders, no money. billed: real maintenance plans at the price per term in the file, which the owner confirms in the preview. Each plan's next invoice is made on its next due date and is not sent on its own (auto_send off). | |
| equipment_kind | No | equipment kind only: the type for every row when the file has no type column, like Furnace for a Jobber custom field "Furnace Model". Guessed from the column names when left out; the preview returns it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| skip | Yes | ||
| items | Yes | ||
| create | Yes | ||
| failed | Yes | ||
| source | Yes | ||
| update | Yes | ||
| headers | Yes | ||
| mapping | Yes | ||
| records | Yes | ||
| on_match | Yes | ||
| row_errors | Yes | ||
| skip_closed | Yes | ||
| preview_hash | Yes | ||
| equipment_kind | Yes |