SAP Knowledge Base Article - Public

2510290 - Posting Multiple New Hire Records API-Onboarding

Symptom

  • Not able  to post the multiple new hire records using the sample xml provided.
  • Is it possible to import multiple hires through API?

Environment

  • Onboarding
  • API
  • Applicable To All DataCenter.

Cause

  • File Format should be maintained correctly.

Resolution

  • Please find below correct format for posting multiple records using postnewhirerecords API

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hrd="http://ATS.online-onboarding.com/Client/HRDataServiceEx">
<soapenv:Header>
<hrd:CorrelationHeader>
<!--Optional:-->
<hrd:CorrelationId>?</hrd:CorrelationId>
<!--Optional:-->
<hrd:SourceEndpoint>?</hrd:SourceEndpoint>
</hrd:CorrelationHeader>
</soapenv:Header>
<soapenv:Body>
<hrd:PostNewhireRecord>
<!--Optional:-->
<hrd:Ticket>ef0159af-296e-4add-b44a-92c79a91f8b8</hrd:Ticket>
<!--Optional:-->
<hrd:Data><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<!-- Sample HR-XML newhire feed file for XpressHR -->
<!--Copyright (c) 2013 SAP AG or an SAP affiliate company. All rights reserved. -->
<NewHires xmlns="http://ns.hr-xml.org/2007-04-15" xmlns:xpresshr="http://online-onboarding.com/Schemas/XpressHR-hrxml.xsd" xmlns:dc="http://purl.org/dc/elements/1.1/">
<!-- First Hire -->
<NewHire>
<TypeOfHire>
<StandardValue>NewHire</StandardValue>
<!-- value of this element must be NewHire -->
</TypeOfHire>
<EmployeeInfo>
<PersonName>
<GivenName>test </GivenName>
<!-- FirstName -->
<FamilyName>Yangyi</FamilyName>
<!-- LastName -->
</PersonName>
<ApplicantId idOwner="CANDIDATE">
<IdValue name="candidateId">12312123</IdValue>
<!-- ExternalId -->
</ApplicantId>
<EmployeeId>
<IdValue name="userId">11201200</IdValue>
<!-- USER_ID -->
</EmployeeId>
<ContactMethod>
<InternetEmailAddress>test@a123.com</InternetEmailAddress>
<!-- EMail -->
</ContactMethod>
</EmployeeInfo>
<ApplicationInfo>
<ApplicationHistory>
<HiringProcessActivity>
<Type>Onboarding</Type>
<ActivityPerformer>
<PersonId>
<IdValue name="EmployeeId">admin</IdValue>
<!-- Hiring Manager(RMSAPCode) -->
</PersonId>
<Role>Hiring Manager</Role>
</ActivityPerformer>
<ActivityPerformer>
<PersonId>
<IdValue name="EmployeeId">840774</IdValue>
<!-- Recruiter(UserSAPID)-->
</PersonId>
<Role>Recruiter</Role>
</ActivityPerformer>
</HiringProcessActivity>
</ApplicationHistory>
</ApplicationInfo>
<PositionInfo>
<OfferInfo>
<EmploymentStartDate>2017-11-23</EmploymentStartDate>
<!-- HireDate -->
<FirstDayToWork>2016-11-23</FirstDayToWork>
<!-- WOTCStartDate -->
</OfferInfo>
<OrganizationalUnit typeOfGroup="Level1">
<!-- Level 1 -->
<OrganizationalUnitName>ACISES</OrganizationalUnitName>
<!-- Division -->
<OrganizationalUnitId>
<IdValue>ACIS</IdValue>
<!-- DivCode -->
</OrganizationalUnitId>
</OrganizationalUnit>
<OrganizationalUnit typeOfGroup="Level2">
<!-- Level 2 -->
<OrganizationalUnitName>Information Technology</OrganizationalUnitName>
<!-- LocDistictText -->
<OrganizationalUnitId>
<IdValue>Information Technology</IdValue>
<!-- LocDistict -->
</OrganizationalUnitId>
</OrganizationalUnit>
<ManagerInfo role="Hiring Manager">
<ManagerId>
<IdValue name="EmployeeId"/>
<!-- Hiring Manager -->
</ManagerId>
</ManagerInfo>
<ManagerInfo role="Recruiter">
<ManagerId>
<IdValue name="EmployeeId">840774</IdValue>
<!-- Recruiter -->
</ManagerId>
</ManagerInfo>
</PositionInfo>
<UserArea>
<!-- Custom Fields -->
<xpresshr:CustomField name="Z_ApplicationID" value="1120" />
<xpresshr:CustomField name="Z_DateOfBirth" value="1990-11-23" />
<xpresshr:CustomField name="Z_Race" value="test3"" />
</UserArea>
</NewHire>
<!-- Second New hire -->
<NewHire>
<TypeOfHire>
<StandardValue>NewHire</StandardValue>
<!-- value of this element must be NewHire -->
</TypeOfHire>
<EmployeeInfo>
<PersonName>
<GivenName>test </GivenName>
<!-- FirstName -->
<FamilyName>Yangyi</FamilyName>
<!-- LastName -->
</PersonName>
<ApplicantId idOwner="CANDIDATE">
<IdValue name="candidateId">1231223</IdValue>
<!-- ExternalId -->
</ApplicantId>
<EmployeeId>
<IdValue name="userId">1120200</IdValue>
<!-- USER_ID -->
</EmployeeId>
<ContactMethod>
<InternetEmailAddress>test@a123.com</InternetEmailAddress>
<!-- EMail -->
</ContactMethod>
</EmployeeInfo>
<ApplicationInfo>
<ApplicationHistory>
<HiringProcessActivity>
<Type>Onboarding</Type>
<ActivityPerformer>
<PersonId>
<IdValue name="EmployeeId">admin</IdValue>
<!-- Hiring Manager(RMSAPCode) -->
</PersonId>
<Role>Hiring Manager</Role>
</ActivityPerformer>
<ActivityPerformer>
<PersonId>
<IdValue name="EmployeeId">840774</IdValue>
<!-- Recruiter(UserSAPID)-->
</PersonId>
<Role>Recruiter</Role>
</ActivityPerformer>
</HiringProcessActivity>
</ApplicationHistory>
</ApplicationInfo>
<PositionInfo>
<OfferInfo>
<EmploymentStartDate>2016-12-23</EmploymentStartDate>
<!-- HireDate -->
<FirstDayToWork>2016-11-23</FirstDayToWork>
<!-- WOTCStartDate -->
</OfferInfo>
<OrganizationalUnit typeOfGroup="Level1">
<!-- Level 1 -->
<OrganizationalUnitName>ACIS</OrganizationalUnitName>
<!-- Division -->
<OrganizationalUnitId>
<IdValue>ACIS</IdValue>
<!-- DivCode -->
</OrganizationalUnitId>
</OrganizationalUnit>
<OrganizationalUnit typeOfGroup="Level2">
<!-- Level 2 -->
<OrganizationalUnitName>Information Technology</OrganizationalUnitName>
<!-- LocDistictText -->
<OrganizationalUnitId>
<IdValue>Information Technology</IdValue>
<!-- LocDistict -->
</OrganizationalUnitId>
</OrganizationalUnit>
<ManagerInfo role="Hiring Manager">
<ManagerId>
<IdValue name="EmployeeId"/>
<!-- Hiring Manager -->
</ManagerId>
</ManagerInfo>
<ManagerInfo role="Recruiter">
<ManagerId>
<IdValue name="EmployeeId">840774</IdValue>
<!-- Recruiter -->
</ManagerId>
</ManagerInfo>
</PositionInfo>
<UserArea>
<!-- Custom Fields -->
<xpresshr:CustomField name="Z_ApplicationID" value="1120" />
<xpresshr:CustomField name="Z_DateOfBirth" value="1990-11-23" />
<xpresshr:CustomField name="Z_Race" value="test1" />
</UserArea>
</NewHire>
<!-- Third New hire -->
<NewHire>
<TypeOfHire>
<StandardValue>NewHire</StandardValue>
<!-- value of this element must be NewHire -->
</TypeOfHire>
<EmployeeInfo>
<PersonName>
<GivenName>杨毅0 </GivenName>
<!-- FirstName -->
<FamilyName>Yangyi0</FamilyName>
<!-- LastName -->
</PersonName>
<ApplicantId idOwner="CANDIDATE">
<IdValue name="candidateId">12s3123</IdValue>
<!-- ExternalId -->
</ApplicantId>
<EmployeeId>
<IdValue name="userId">1120w00</IdValue>
<!-- USER_ID -->
</EmployeeId>
<ContactMethod>
<InternetEmailAddress>test@a123.com</InternetEmailAddress>
<!-- EMail -->
</ContactMethod>
</EmployeeInfo>
<ApplicationInfo>
<ApplicationHistory>
<HiringProcessActivity>
<Type>Onboarding</Type>
<ActivityPerformer>
<PersonId>
<IdValue name="EmployeeId">admin</IdValue>
<!-- Hiring Manager(RMSAPCode) -->
</PersonId>
<Role>Hiring Manager</Role>
</ActivityPerformer>
<ActivityPerformer>
<PersonId>
<IdValue name="EmployeeId">840774</IdValue>
<!-- Recruiter(UserSAPID)-->
</PersonId>
<Role>Recruiter</Role>
</ActivityPerformer>
</HiringProcessActivity>
</ApplicationHistory>
</ApplicationInfo>
<PositionInfo>
<OfferInfo>
<EmploymentStartDate>2017-11-23</EmploymentStartDate>
<!-- HireDate -->
<FirstDayToWork>2016-10-23</FirstDayToWork>
<!-- WOTCStartDate -->
</OfferInfo>
<OrganizationalUnit typeOfGroup="Level1">
<!-- Level 1 -->
<OrganizationalUnitName>ACISEE</OrganizationalUnitName>
<!-- Division -->
<OrganizationalUnitId>
<IdValue>ACIS</IdValue>
<!-- DivCode -->
</OrganizationalUnitId>
</OrganizationalUnit>
<OrganizationalUnit typeOfGroup="Level2">
<!-- Level 2 -->
<OrganizationalUnitName>Information Technology</OrganizationalUnitName>
<!-- LocDistictText -->
<OrganizationalUnitId>
<IdValue>Information Technology</IdValue>
<!-- LocDistict -->
</OrganizationalUnitId>
</OrganizationalUnit>
<ManagerInfo role="Hiring Manager">
<ManagerId>
<IdValue name="EmployeeId"/>
<!-- Hiring Manager -->
</ManagerId>
</ManagerInfo>
<ManagerInfo role="Recruiter">
<ManagerId>
<IdValue name="EmployeeId">840774</IdValue>
<!-- Recruiter -->
</ManagerId>
</ManagerInfo>
</PositionInfo>
<UserArea>
<!-- Custom Fields -->
<xpresshr:CustomField name="Z_ApplicationID" value="1120" />
<xpresshr:CustomField name="Z_DateOfBirth" value="1990-11-23" />
<xpresshr:CustomField name="Z_Race" value="test"" />
</UserArea>
</NewHire>
</NewHires>
]]>
</hrd:Data>
</hrd:PostNewhireRecord>
</soapenv:Body>
</soapenv:Envelope>

Keywords

  • Post New hire records API
  • Post New hire record API
  • API
  • Onboarding
, KBA , LOD-SF-OBD-API , Webservices & API's , How To

Product

SAP SuccessFactors Onboarding all versions