Asking who an unlinked person is
The rule
New starters are often enrolled at a clock on their first morning, before HR has entered them. Their punches must not be lost, and their hours should show to a manager straight away, but nobody can be paid for them until someone says which employee they are. Until then, every day they work asks for it.
Who uses it
Employers with walk-in hiring and high turnover: warehousing, seasonal agriculture, hospitality, events, staffing agencies whose workers enroll at a client’s clock.
How the recipe does it
Punches from someone the sender knows only by its own ids (Connect’s id of the person, with no employee id) are kept as an unlinked person of the tenant, and worked out with the tenant’s policy like anyone’s.
The rule is configuration only: the package (package.toml) has a layer
that picks unlinked people out by the eligibility key unlinked, with
the standard flag step:
[[layer]]id = "unlinked"applies_to = "unlinked = true"[[layer.step]]id = "who-is-this"uses = "standard/flag"params = { kind = "who_is_this", detail = "link them to the employee they are" }The step raises a who_is_this exception about each workday with work.
The exceptions list filters on unlinked people
(GET .../exceptions?unlinked=true), so whoever links people has a
worklist. Linking the person (hourctl -t acme attend unlinked link <id> 4471) moves their punches to the employee from that instant, works
both out again, and sends person.linked, which a sink can carry back to
Connect to set the person’s employee id at the clock.
Employees are not unlinked, so the layer never applies to them.
Parameters
| Setting | Meaning |
|---|---|
applies_to | Who is asked about: unlinked people (unlinked = true). |
kind | The exception’s kind (who_is_this). |
detail | What it says (link them to the employee they are). |
What the scenarios show
an-unlinked-person-is-asked-for: two days worked, two exceptions, the hours shown.an-employee-is-not-asked: the same days for an employee raise none.
Legal note
Time worked must be paid whoever has yet to be entered in payroll: link people before the pay period closes, and check how the law where you operate treats work done before an employee’s record exists.
Get the recipe
The recipe’s package and its scenarios are in the example packages repository: attendance/unlinked_people. Test it, or your own copy of it, with hourctl attend test, and publish it with hourctl attend pkg publish.
The policy package
The package’s layers, with the standard steps each one runs and their settings:
name = "unlinked_people"version = "1.0.0"description = "Someone who punches before anyone has linked them to an employee has their hours worked out and shown, and each day they work asks for the link."
# Unlinked people: ask who they are, on every day they work.[[layer]]id = "unlinked"applies_to = "unlinked = true"[[layer.step]]id = "who-is-this"uses = "standard/flag"params = { kind = "who_is_this", detail = "link them to the employee they are" }Scenarios
Each scenario gives a person’s punches and setup and the timecard they must produce, worked out with this package adopted (the format).
An employee punching the same days is not unlinked: the layer does not apply to them, and nothing is asked
description = "An employee punching the same days is not unlinked: the layer does not apply to them, and nothing is asked"
punch = [ { at = "2026-10-05 08:00", kind = "in" }, { at = "2026-10-05 16:00", kind = "out" }, { at = "2026-10-06 08:00", kind = "in" }, { at = "2026-10-06 16:00", kind = "out" },]
[policy]zone = "America/Chicago"
[expect]week = "2026-10-05"allocations = ["2026-10-05 08:00-16:00 work 8.00", "2026-10-06 08:00-16:00 work 8.00"]Someone enrolled at a clock and not yet linked punches on two days: their hours are worked out and shown, and each day asks for the employee they are
description = "Someone enrolled at a clock and not yet linked punches on two days: their hours are worked out and shown, and each day asks for the employee they are"
punch = [ { at = "2026-10-05 08:00", kind = "in" }, { at = "2026-10-05 16:00", kind = "out" }, { at = "2026-10-06 08:00", kind = "in" }, { at = "2026-10-06 16:00", kind = "out" },]
[policy]zone = "America/Chicago"
[person]unlinked = true
[expect]week = "2026-10-05"allocations = ["2026-10-05 08:00-16:00 work 8.00", "2026-10-06 08:00-16:00 work 8.00"]exceptions = [ { kind = "who_is_this", at = "2026-10-05 00:00", detail = "link them to the employee they are" }, { kind = "who_is_this", at = "2026-10-06 00:00", detail = "link them to the employee they are" },]