External ids
Each system you connect may know a person by a different id. For example, payroll may use an integer, HR a GUID, and the clocks 1001. Hour Advantage never assumes they match. A person carries the other systems’ ids in external_ids. Whoever writes the person sets them. Each consumer asks for the one it knows.
| The key | The clock user id is the person’s key. |
| The map | external_ids maps a system name to an id, like { "payroll": "104552", "hr": "a3f1c2e4" }. It is plain text. Hour Advantage does not interpret it. Someone who uses the same number everywhere sends it twice. |
| Out | A sink names the system it speaks for. Every event it is sent about a person carries their id there as person_id. |
| In | A system finds a person by its own id. |
External ids are part of the shared platform. Connect keeps them on the people of each sync group. Time and Attendance reads them through its in-process sink. A sink that speaks for the system attendance gives each punch’s person as their id there (in-process sinks). Setting an external id also links a person enrolled at a clock.
Setting them
Section titled “Setting them”hourctl sync person set hq 1001 --external-id payroll=104552 --external-id hr=a3f1c2e4or PUT /api/tenants/{tenant}/sync/{name}/people/{user_id} with
{"fields": {"external_ids": {"payroll": "104552", "hr": "a3f1c2e4"}}}.
The object replaces the person’s ids. null (or --no-external-ids) clears them. System names are 1 to 64 letters, digits, - or _. Ids are text, 1 to 256 characters. A person has ids in at most 32 systems. Anything else is refused (400). The ids are never sent to a device.
An id in a system belongs to one person of the group, as a card number does. Giving it to a second person is refused (422) until the first gives it up. The same id in another system, or in another group, is a different id.
Events carry the receiver’s id
Section titled “Events carry the receiver’s id”A sink names the system it speaks for. The group’s default route to that system takes each person’s id there from their external_ids (routes):
[[sync_group]]id = "hq"routes = [{ system = "payroll", tenant = "acme" }]
[[sink]]id = "payroll"type = "webhook"url = "https://payroll.example.com/hooks/clock"system = "payroll"The sink is sent the punches routed to payroll. Every event it is sent about a person carries person_id, their id in that system. A punch’s comes from its route. Any other event’s comes from the person’s routes as they are when it is sent. Here is an event, trimmed:
{ "id": "5175b17d2b668586c2d0fb958c0f6203", "type": "punch", "person_id": "104552", "data": { "user_id": "1001", "time": "2026-01-15T08:00:00-06:00", "route": { "system": "payroll", "tenant": "acme", "person_id": "104552" } }}A person with no payroll id gets no person_id. The receiver decides what to do. Where routing is in use, their punch is unrouted until it is given a route. Events keep user_id, the clock’s own id, either way. So consumers that read user_id keep working.
person_id is only in what a sink is sent. It is never in GET /api/tenants/{tenant}/events or the live stream. Time and Attendance’s events carry no person_id. They name the person by data.person, Time and Attendance’s own id for them. Only the events of an unlinked person (person.unlinked_seen, person.linked) say which clock user sent their punches. They say it under sender, and user_id is among it.
A person’s own routes replace the defaults to the same system. For example, a worker placed by two staffing agencies has a route to each, each with their id there.
Finding a person by your id
Section titled “Finding a person by your id”hourctl sync people hq --external-id payroll:104552or GET /api/tenants/{tenant}/sync/{name}/people?external_id=payroll:104552.
Left out on purpose
Section titled “Left out on purpose”- One person across sync groups. The same human in two groups is two records, each with its own map. Time and Attendance says who the person is across groups and employers, through its workers and employee records. Connect carries the map.
- Holding events for a missing id. Events other than punches are sent as they are. The receiver handles an event with no
person_id. A punch with no route, where routing is in use, is kept aside as unrouted instead.