HRIS ↔ AeroHire synchronisieren
Bidirektionale Synchronisierung zwischen deinem HRIS-System und AeroHire — eliminiere Doppelpflege von Bewerberdaten.
Das Problem
Recruiting-Teams pflegen Bewerberdaten in AeroHire, während HR-Teams dieselben Daten manuell in das HRIS (z.B. SAP SuccessFactors, Workday, BambooHR) übertragen müssen. Das führt zu:
- Zeitaufwand durch doppelte Datenpflege
- Fehleranfälligkeit durch manuelle Copy-Paste-Prozesse
- Datenverzögerungen — HR hat nicht den aktuellen Bewerberstatus
- Compliance-Probleme bei der DSGVO-konformen Datenlöschung
Die Lösung
Mit der AeroHire API kannst du eine automatische bidirektionale Synchronisierung aufbauen:
- AeroHire → HRIS: Eingestellte Kandidaten werden automatisch als neue Mitarbeiter im HRIS angelegt
- HRIS → AeroHire: Neue offene Stellen aus dem HRIS werden automatisch als Jobs in AeroHire erstellt
Architektur
Implementierung Schritt für Schritt
AeroHire API-Key erstellen
Erstelle einen API-Key mit den Scopes applications:write, candidates:read, jobs:read in AeroHire unter Einstellungen → API-Zugang.
Webhook-Endpoint in deinem HRIS einrichten
Richte einen HTTP-Endpunkt in deinem HRIS ein, der AeroHire-Daten empfängt. Der Endpunkt muss JSON akzeptieren.
// Express.js Webhook-Handler
import express from "express";
const app = express();
app.use(express.json());
app.post("/webhook/aerohire", async (req, res) => {
const { event, data } = req.body;
switch (event) {
case "application.status_changed":
await syncApplicationStatus(data.application);
break;
case "candidate.hired":
await createEmployeeRecord(data.candidate);
break;
}
res.status(200).json({ received: true });
});Bestehende Kandidaten importieren
Beim ersten Setup alle bestehenden Bewerbungen aus AeroHire abrufen und in dein HRIS importieren.
const API_KEY = process.env.AEROSELECT_API_KEY;
const BASE = "https://api.aeroselect.io/api/v2/external";
async function importAllApplications() {
let page = 1;
let hasMore = true;
const imported = [];
while (hasMore) {
const res = await fetch(`${BASE}/applications?page=${page}`, {
headers: { "X-API-Key": API_KEY },
});
const { data, meta } = await res.json();
for (const application of data) {
await hris.upsertApplication({
external_id: application.id,
candidate_email: application.candidate.email,
status: application.status,
job_title: application.job.title,
});
}
imported.push(...data);
hasMore = page < meta.last_page;
page++;
}
console.log(`${imported.length} Bewerbungen importiert`);
}Bidirektionale Sync aktivieren
Neue Mitarbeiter aus dem HRIS automatisch als Kandidaten in AeroHire anlegen und eingestellte AeroHire-Kandidaten in das HRIS übertragen.
// Eingestellten Kandidaten ins HRIS übertragen
async function onCandidateHired(applicationId: number) {
const appRes = await fetch(
`${BASE}/applications/${applicationId}`,
{ headers: { "X-API-Key": API_KEY } }
);
const { data: application } = await appRes.json();
const candidateRes = await fetch(
`${BASE}/candidates/${application.candidate.id}`,
{ headers: { "X-API-Key": API_KEY } }
);
const { data: candidate } = await candidateRes.json();
// Im HRIS als neuen Mitarbeiter anlegen
await hris.createEmployee({
first_name: candidate.first_name,
last_name: candidate.last_name,
email: candidate.email,
phone: candidate.phone,
start_date: new Date().toISOString().slice(0, 10),
job_title: application.job.title,
source: "aerohire",
aerohire_candidate_id: candidate.id,
});
}Polling-Strategie (bis Webhooks verfügbar)
// Poll every 5 minutes for new status changes
const POLL_INTERVAL = 5 * 60 * 1000;
const BASE = "https://api.aeroselect.io/api/v2/external";
const API_KEY = process.env.AEROSELECT_API_KEY;
async function pollApplicationChanges(lastSyncAt: string) {
const res = await fetch(
`${BASE}/applications?updated_after=${lastSyncAt}`,
{ headers: { "X-API-Key": API_KEY } }
);
const { data } = await res.json();
for (const application of data) {
await processApplicationChange(application);
}
return new Date().toISOString();
}
let lastSync = new Date(Date.now() - POLL_INTERVAL).toISOString();
setInterval(async () => {
lastSync = await pollApplicationChanges(lastSync);
}, POLL_INTERVAL);Häufige Fehler und Lösungen
| Problem | Lösung |
|---|---|
| Doppelte Kandidaten im HRIS | E-Mail als eindeutigen Key für Upsert nutzen |
| Rate Limit bei initialem Import | Delay zwischen Seiten einbauen: await sleep(200) |
| 409 Conflict bei Bewerbungseinreichung | Vor dem Einreichen auf bestehende Bewerbung prüfen |