Ga naar hoofdinhoud

HR events for other systems

When someone joins, leaves or changes job, other systems need to know. An identity manager creates or blocks an account. A badge system follows. A rostering tool plans around an absence.

humaniq sends an event for each of these moments. You subscribe an endpoint in OpenRegister's webhook settings, per event type. humaniq has no receiver and no subscription list of its own.

The events​

Event typeSent when
nl.conduction.hrmq.employee.joinedA first contract is created for someone without earlier contracts, or an onboarding case is completed.
nl.conduction.hrmq.employee.leftAn offboarding case is completed, or the last contract gets an end date in the past.
nl.conduction.hrmq.employee.jobchangedA contract's job profile changes, or a new placement is added for someone who already had one.
nl.conduction.hrmq.leave.approvedA leave request is approved.
nl.conduction.hrmq.leave.withdrawnAn approved leave request is no longer approved.
nl.conduction.hrmq.sickness.reportedA sickness case is registered.
nl.conduction.hrmq.sickness.recoveredA sickness case is closed as recovered.

Each event goes out once, on the change that causes it. Saving a record again sends nothing.

What an event carries​

Every event is a CloudEvent 1.0. Its subject is the employee id. Its data holds:

  • employeeId, nextcloudUserId and administrationId;
  • occurredOn, the day of the moment;
  • the moment's own dates:
EventExtra fields
employee.joinedstartDate, orgUnitId
employee.leftlastWorkingDay
employee.jobchangedfrom and to, each with orgUnitId and normfunctieId
leave.approved, leave.withdrawnstartDate, endDate, hours
sickness.reported, sickness.recoveredfrom, to

Nothing else. A leave event never says which kind of leave or why. A sickness event never holds a reason, a percentage or a note. No event holds salary, a BSN or medical data. A system that needs more reads the record through the OpenRegister API, under its own rights.

Joining can be signalled twice: by the first contract and by the completed onboarding case. Both events carry the same id when they name the same day, so a receiver can drop the second.

Inside Nextcloud​

Another Nextcloud app can listen without a webhook. humaniq dispatches a typed event on the same moment: EmployeeJoinedEvent, EmployeeLeftEvent, EmployeeJobChangedEvent, LeaveApprovedEvent (with isWithdrawn()) and SicknessReportedEvent (with isRecovered()), all in OCA\Humaniq\Event. Each carries the same id and fields as the CloudEvent.

Delivery is best effort. If the typed event fails, the webhook is still sent, and the other way round.