
21 Sep 2020
Um das Einstellen von offenen Stellen für das Management einfacher zu gestalten, integrieren wir das Personalmanagement von Personio in die WordPress-Webseite.
In der Regel werden spezielle Plugins zum Veröffentlichen von Stellenangeboten genutzt. Hierzu müssen sich aber sowohl die User als auch HR zunächst registrieren.
Diesen Vorgang können wir verbessern, indem wir Personio und WordPress miteinander verbinden. Damit können wir die Nutzung insbesondere für die HR-Abteilung wesentlich einfacher und angenehmer gestalten.
Vorteile durch die Integration von Personio und WordPress
- HR kann offene Stellen direkt in der Personio-App veröffentlichen. Es ist nicht länger notwendig, Jobs zunächst im WordPress-Backend anzulegen.
- HR erhält die Benachrichtigung in der Personio App und weiß direkt, welcher Job bereits eingestellt und besetzt wurde.
Kontaktieren
Sie uns!
Wie integriere ich Personio und WordPress?
Für diese Aufgabe nutzen wir den entsprechenden Code. Zum Abrufen offener Positionen wie dieser https://youraccout-jobs.personio.de/xml bietet Personio XML. Wir rufen mit diesem einfachen Code das XML mit PHP in WordPress ab.
<?php
$hostname = 'personio'
$lang = getLang();
$positions = simplexml_load_file(
'https://' . $hostname .
'-jobs.personio.de/xml?language=' .
$lang
);
$categories = [];
foreach ($positions->position as $position){
$category = (string)$position->recruitingCategory;
if($category && !in_array($category, $categories)){
$categories[] = $category;
}
}
$translations = [
"full-time" => [
"de" => "Vollzeit",
"en" => "Full-time"
],
"part-time" => [
"de" => "Teilzeit",
"en" => "Part-time"
],
"permanent" => [
"de" => "Festanstellung",
"en" => "Permanent Employment"
],
"intern" => [
"de" => "Praktikum",
"en" => "Internship"
],
"trainee" => [
"de" => "Trainee Stelle",
"en" => "Trainee Stelle"
],
"freelance" => [
"de" => "Freelance Position",
"en" => "Freelance Position"
],
];
// Print job postings
foreach ($positions as $position) {
$detailLink = 'https://' . $hostname . '-jobs.personio.de/job/' . $position->id;
if ($_GET["channel"]) {
$detailLink .= '?_pc=' . $_GET["channel"];
}
echo '<a href="' . $detailLink . ' target="_blank" alt="Job Details">' .
'<h2>' . $position->name . '</h2>' .
'<p>' . $translations[(string)$position->employmentType][$lang] .
', ' . $translations[(string)$position->schedule][$lang] . '</p>' .
'</a>';
}
?>
Dies ist ein Beispiel dafür, wie du ein HTML-Bewerbungsformular auf deiner Seite integrieren kannst.
<form id="personioApplicationForm" class="form-horizontal" method="POST" action="https://api.personio.de/recruiting/applicant" enctype="multipart/form-data">
<fieldset>
<!-- Pass authentication token -->
<input name="access_token" type="hidden" value="a8056a2f81a8acd27a68">
<!-- Pass company and position_id -->
<input name="company_id" type="hidden" value="000">
<input name="job_position_id" type="hidden" value="0000">
<!-- You can pass all applicant system attributes -->
<div class="form-group">
<label class="col-md-4 control-label" for="first_name">Tell us your name <sup>*</sup></label>
<div class="col-md-4">
<input id="first_name" name="first_name" type="text" placeholder="First name" class="form-control input-md" required="">
<input id="last_name" name="last_name" type="text" placeholder="Last name" class="form-control input-md" style="margin-top: .5em" required="">
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="email">How can we reach you? <sup>*</sup></label>
<div class="col-md-4">
<input id="email" name="email" type="text" placeholder="you@example.com" class="form-control input-md" required="">
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="channel">Where did you hear first about this job?</label>
<div class="col-md-4">
<select id="channel" name="recruiting_channel_id" class="form-control form-select">
<option value="" disabled="" selected="">Please select one option</option>
<option value="234">LinkedIn</option>
<option value="345">Xing</option>
<option value="456">Indeed.com</option>
</select>
</div>
</div>
<!-- You can pass custom applicant attributes as well, e.g. for tracking referrers -->
<div id="ref" class="form-group" style="display: none">
<label class="col-md-4 control-label" for="email">Who referred you? <sup>*</sup></label>
<div class="col-md-4">
<input id="referrer" name="custom_attribute_863" type="text" placeholder="Full name" class="form-control input-md">
</div>
</div>
<!-- Multiple documents up to 50MB can be passed -->
<div class="form-group">
<label class="col-md-4 control-label" for="documents">Upload your cover letter, CV, and references <sup>*</sup><br><span style="font-size: 0.8em">You can select several documents at once</span></label>
<div class="col-md-4">
<input id="documents" name="documents[]" class="input-file" type="file" style="margin-top: 10px;" multiple="" required="">
</div>
</div>
<!-- The initial message of the applicant -->
<div class="form-group">
<label class="col-md-4 control-label" for="message">Anything else you want to let us know?</label>
<div class="col-md-4">
<textarea class="form-control" id="message" name="message" placeholder="Leave us a message" rows="3"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="message">Everything ready?</label>
<div class="col-md-4">
<input id="submitButton" type="submit" value="Submit application now">
</div>
</div>
</fieldset>
</form>
Diese Integration ist generell recht einfach umzusetzen und wird den Berufsalltag der HR-Abteilung um einiges leichter gestalten.
