Skip to content

Integration resync

Verifies that the registrations mTime believes are live in an external system actually still exist there, and re-creates the ones that were deleted directly in the external system — so what mTime has sent stays complete. Currently supported for Intega Løn.

When to use it

mTime sends time off and salary registrations to the external system and remembers what it created. If someone deletes such a registration in the external system itself (instead of in mTime), mTime never notices — the registration is simply gone, and payroll runs without it. Run this job when you suspect (or want to rule out) that registrations were removed on the other side.

The job is manual only — it never runs on a schedule. Trigger it from Admin › Job Runs.

How it works

  1. Collects every registration mTime’s Integration Log records as live in the external system — time off and salary, each only when its sync is turned on for the integration — within the chosen number of days
  2. Fetches the external system’s own list of registrations, one call per affected employee
  3. Compares the two: a registration mTime believes is live but the external system no longer has is a discrepancy
  4. Repairs (skipped in a dry run) — re-creates each missing registration: time off at the day’s current total (mTime’s data is what counts, so a day corrected since is re-created with the correction), salary exactly as the original line was sent

A repair writes its own row in the Integration Log, marked Resynced, and links back to the original event. If the day’s current total turns out to be zero, nothing is re-created — the deletion in the external system was (by now) correct, and the day is recorded as settled instead.

Parameters

ParameterDescription
IntegrationRequired. Which integration to verify — only integrations currently turned on for resync can be chosen
Dry RunOn by default. Reports what would be re-created without changing anything. Review the dry-run report first, then run again with Dry Run off. Turning it off requires typing the chosen integration’s id (e.g. integahr) first — the same type-to-confirm as deleting data
Days BackHow far back to verify, counted from the run date (default 90). Days further back are left alone; future days are always verified

Job results

MetricDescription
employeesEmployees whose registrations were verified
checkedRegistrations verified against the external system
missingRegistrations the external system no longer has
recreatedRegistrations re-created (0 in a dry run)
failed / skippedRepairs that failed / rows left alone (with the reason)
reportHuman-readable per-employee entries: date, activity, code, units, the deleted registration’s id, and what was done

Reading the result in the Integration Log

Re-created registrations show in Admin › Integration Log marked Resynced in amber; the row’s details name exactly what was re-created — a time off or a salary line — and the external id that was deleted. The Resynced filter switch shows only such repairs. Re-running the job never duplicates anything: a repair that already happened is simply verified like every other live registration.

Troubleshooting

IssueSolution
The integration cannot be chosenIt is turned off, or resync is not supported for it. Check Integrations
A repair failedOpen the failed row in the Integration Log — the error message names the cause. Fix it and run the job again; the repair updates the same row instead of creating a second one
missing in dry run but nothing should be deletedSomeone removed registrations directly in the external system. The report names each employee, day and registration id — review before running the real pass

Related