External Metadata
Every object in Meitner (Student, Employee, Group, etc.) contains anexternal field:
external object to track which records belong to your system.
source: the name of your external systemsourceID: the external system’s unique ID for the object
Handling Data Created Directly in Meitner
Sometimes an organization allows both direct creation in Meitner and via the external system.To avoid conflicts, you’ll need a reconciliation job to “claim” any matching records. Example flow:
- Scheduled job runs every X minutes.
-
Fetch all objects where:
createdAt> last job runexternal.sourceisNULL- object’s identifier (like
identityNumber) matches one in your system
-
If match found: update the record’s
externalfield so your system takes ownership.
Pseudocode example:
| Object | Matching Constraint |
|---|---|
| Student, Guardian, Employee | identityNumber |
| StudentPlacement | studentID + schoolID |
| EmployeePlacement | employeeID + schoolID |
| Group | schoolID + title |
⚡ Soon: Meitner will support Webhooks, so you can skip polling and react instantly when new objects are created!
StudentPlacement
When a student is removed in your external system:- Do not delete the
StudentPlacementimmediately! - Instead, set the
endDateon theStudentPlacementto the student’s removal date. - After a configurable grace period (e.g., 7 days), archive the
StudentPlacement. - Once a
StudentPlacementhas been archived for a certain number of years (e.g., 2 years), it can be safely deleted.
Important:If the student returns to the school before deletion, you can restore the archived
The exact number of days to wait before archiving and years to wait before deleting should be decided by the school or organization based on their own internal policies and any authority requirements.
StudentPlacement instead of creating a new one.
Example flow:
Best Practices
-
Always prefer archiving over deleting immediately.
Archiving disconnects relationships safely but preserves the placement record for audits, reports, and historical lookup. -
Choose generous retention windows.
If you’re unsure, it’s better to keep archived placements longer (e.g., 2–5 years) instead of risking premature data loss. -
Communicate with the organization.
Let schools decide how long to retain archived placements depending on legal, tax, or inspection requirements. -
Handle restores cleanly.
If a student returns after leaving, restoring an archivedStudentPlacementis better than creating a brand-new record. It keeps history clean and minimizes duplication.
Student
When a student has no active StudentPlacements, it’s safe to delete the student:EmployeePlacement
Similar to StudentPlacements, but with a twist:- Set
endDatewhen removed. - Administrators must archive manually inside Meitner’s UI to ensure important work materials are handed over.
- If archived (i.e.,
archiveYearis set), you can delete the placement.
👀 Admins will see warnings in the UI for placements with a passed endDate that aren’t archived yet, so they can take action.
Employee
When an employee has no active EmployeePlacements, it’s safe to delete:Summary
| Action | Rule |
|---|---|
| Claim newly created data | Scheduled job, then Webhooks |
| StudentPlacement removal | Set endDate, archive after X days, delete after Y years |
| Student removal | If no placements → delete |
| EmployeePlacement removal | Set endDate, admin archives, then delete |
| Employee removal | If no placements → delete |