> ## Documentation Index
> Fetch the complete documentation index at: https://help.visualcare.com.au/llms.txt
> Use this file to discover all available pages before exploring further.

# KeyPay export troubleshooting

> Common KeyPay export errors and how to resolve them in Visualcare

This page covers errors that appear when exporting timesheets, kilometres, or other payroll data from Visualcare to KeyPay.

<Tip>For general integration setup and configuration, see [Integration troubleshooting](/troubleshooting/integration-issues).</Tip>

## Timesheet export errors

### Error: This timesheet already exists, please provide the timesheet ID

**Symptoms:** The export fails with "FAIL This timesheet already exists, please provide the timesheet ID".

**Cause:** KeyPay has already processed a timesheet for the same pay calendar period. Once a timesheet exists for a period, KeyPay rejects any further timesheets for that same calendar.

**Fix:**

* Identify the dates for the failed timesheets
* Split the export into separate batches for each distinct pay calendar period (for example, run 28-30 June separately from 1-4 July)

<Note>This is a restriction in KeyPay and is not controlled by Visualcare. KeyPay accepts only one timesheet per worker per pay calendar period.</Note>

***

### Error: Request is invalid. Timesheets Key does not match an id for any employee

**Symptoms:** The export fails with "Request is invalid. Timesheets Key does not match an id for any employee".

**Cause:** The employee mapping between Visualcare and KeyPay is out of sync.

**Fix:**

1. Go to **Settings** → **Data Export** → **KeyPay** section
2. Click **Sync Employees** to refresh the employee data from KeyPay
3. Retry the export
4. If the issue continues, contact [support@visualcare.com.au](mailto:support@visualcare.com.au)

***

### Error: Error invoking handler for query Payroll

**Symptoms:** The export fails with "Failed. Error invoking handler for query Payroll.DataAccess.Queries.GetReportingDimensionValuesQuery".

**Cause:** A sync issue between Visualcare and KeyPay.

**Fix:**

* Run a timesheet export. This often re-initialises the sync with KeyPay and clears the error
* If the error continues, go to **Settings** → **Data Export** and click **Sync Employees** before retrying

***

### Issue: Timesheets exported as unapproved (or auto-approving when not wanted)

**Symptoms:** Timesheets arrive in KeyPay as unapproved when you want them approved, or they're being auto-approved when you don't want that.

**Cause:** The **Auto approve timesheets** setting in Visualcare controls whether timesheets are sent to KeyPay as approved or unapproved.

**Fix:**

1. Go to **Settings** → **Data Export** → **KeyPay** section
2. Find the **Auto approve timesheets** checkbox
3. Tick it if you want timesheets automatically approved in KeyPay, or untick it to have them come through as unapproved

***

### Error: Error sending to KeyPay when sending a worker

**Symptoms:** The export fails with "Error sending to KeyPay" when attempting to send a worker record to KeyPay.

**Cause:** Required fields are missing from the worker profile. KeyPay requires specific fields to be completed before a worker record exports successfully.

**Fix:** Check the following mandatory fields on the worker profile:

| Fields                                           | Location                                                      |
| ------------------------------------------------ | ------------------------------------------------------------- |
| First Name, Last Name                            | **Worker Profile** → **Details** tab                          |
| Start Date                                       | **Worker Profile** → **Engagement Details** tab               |
| Worker Type, TFN                                 | **Worker Profile** → **Finance** tab → Worker Details column  |
| Account Name, BSB, Account Number, Percentage    | **Worker Profile** → **Finance** tab → Bank Details column    |
| Address Line 1, State, Suburb, Postcode, Country | **Worker Profile** → **Details** tab → General Details column |
| Super Fund Name, Member Number                   | **Worker Profile** → **Finance** tab → Worker Details column  |

Complete any missing fields, click **Save**, and retry the export.

***

### Error: FAIL null when exporting allowances

**Symptoms:** The export fails with "FAIL! null" when exporting allowances (for example, first aid allowance) to KeyPay.

**Cause:** Too many items are being exported at once.

**Fix:** Export in smaller batches of 40 items or fewer. Select a subset of the items, export them, then repeat for the next batch.

***

## Kilometre export errors

### Error: WorkTypeId does not match an external id for any WorkType

**Symptoms:** The KM export fails with "WorkTypeId does not match an external id for any WorkType".

**Cause:** The pay code in Visualcare doesn't match any external ID in the KeyPay work type list.

**Fix:**

1. Go to **Settings** → **Finance** → **Kilometre** in Visualcare
2. Check the **Pay Code (KM)** and **Pay Code (KM Between, No Charge)** fields. These are two separate pay codes that map to different KeyPay work types — one for standard kilometre travel and one for between-client travel with no charge
3. If either is blank, or the value doesn't match an entry in KeyPay, go to **Data Export** → **KEYPAY section** → **KeyPay Work Type list**
4. Confirm that the pay codes under **Settings** → **Finance** → **Kilometre** exactly match one of the External IDs in that list
5. If no matching External ID exists, create one in KeyPay or update the pay code names to match
6. Check for typos or extra spaces at the start or end of the pay code values

***

### Error: No Session during KM export

**Symptoms:** The KM export to KeyPay fails with a "No Session" error.

**Cause:** A browser session issue is preventing the export from connecting to KeyPay.

**Fix:**

1. Clear your browser cache (press Ctrl + Shift + Delete)
2. Fully close and reopen your browser
3. Return to the **Export Reimbursements** page and retry the export

***

## Location errors

### Issue: Wrong KeyPay location appearing on timesheets

**Symptoms:** Timesheets exported to KeyPay show the wrong location.

**Cause:** The KeyPay Location setting in Visualcare maps a Visualcare field to the External IDs in KeyPay. If the wrong field is selected or the External IDs don't match, the wrong location is applied.

**Fix:**

1. Go to **Settings** → **Data Export** → **KeyPay** section
2. Click the arrow next to **KeyPay Locations** to expand the list of External IDs
3. Apply the correct External IDs from KeyPay to the corresponding sections in Visualcare

The **KeyPay Locations** drop-down maps to different Visualcare fields depending on what you select:

| KeyPay Locations option                             | Where to configure in Visualcare                                                 |
| --------------------------------------------------- | -------------------------------------------------------------------------------- |
| Agreement Area / Location Area                      | **Maintenance** → **Areas** → **Area** field                                     |
| Client Area Reference 1 / Location Area Reference 1 | **Maintenance** → **Areas** → **Reference 1** field                              |
| Agreement Reference 1                               | Client agreement → **Reference 1** field                                         |
| Roster Category Reference 1                         | **Maintenance** → **Categories** → **Roster Categories** → **Reference 1** field |
| Service Reference 1                                 | **Maintenance** → **Services** → **Reference 1** field                           |

***

## Running into issues?

If your issue isn't listed here, contact the Visualcare helpdesk.

## Related articles

<CardGroup cols={2}>
  <Card title="Integration troubleshooting" icon="plug-circle-xmark" href="/troubleshooting/integration-issues">
    General integration and data export errors
  </Card>

  <Card title="KeyPay integration" icon="credit-card" href="/integrations/keypay">
    Connect Visualcare to KeyPay for payroll export
  </Card>

  <Card title="Exporting payroll data" icon="file-export" href="/finance/exporting-payroll-data">
    How to export timesheets and payroll data from Visualcare
  </Card>

  <Card title="Xero export troubleshooting" icon="wrench" href="/troubleshooting/xero-export-errors">
    Common Xero export errors and fixes
  </Card>
</CardGroup>
