SAP Knowledge Base Article - Public

2416293 - PostNewHirerecordAPI - Onboarding 1.0

Symptom

  • Posting NewHireRecord through API in Onboarding
  • How do i create an activity in onboarding through SOAP API
  • Provide a sample XML format to post a new record using SOAP API

Environment

SAP SuccessFactors Onboarding 1.0

Resolution

  1. Record should be posted with correct Ticket Number and Correct XML Format.
  2. It will create a new HRData ID for the candidate
  3. If the transaction is a failure then the NewHire Id will be 000000-0000-0000-0000-0000000

Below is the sample correct XML format of Posting New Hire Record:

<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>5e4e883b-34ef-4177-9110-5d5c6565f363</hrd:Ticket>
         <!--Optional:-->
         <hrd:Data><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<NewHire 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/">
 <TypeOfHire>
  <StandardValue>NewHire</StandardValue>
  <!-- value of this element must be NewHire -->
 </TypeOfHire>
 <EmployeeInfo>
  <PersonName>
   <GivenName>SFTest</GivenName>
   <!-- FirstName -->
   <MiddleName/>
   <!-- MiddleName -->
   <FamilyName>Test</FamilyName>
   <!-- LastName -->
  </PersonName>
  <ApplicantId idOwner="CANDIDATE">
   <IdValue name="candidateId">645041</IdValue>
   <!-- ExternalId -->
  </ApplicantId>
  <EmployeeId>
   <IdValue name="userId">996</IdValue>
   <!-- USER_ID -->
  </EmployeeId>
  <ContactMethod>
   <InternetEmailAddress>Anoop.Garg@abc.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-11-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="CustPGCert1" value="test-1" />
  <xpresshr:CustomField name="RemoteHire" value="No" />
  <xpresshr:CustomField name="EMail" value="Anoop.Garg@abc.com" />
  <xpresshr:CustomField name="EmailRequired" value="Anoop.Garg@abc.com" />
 </UserArea>
</NewHire>]]></hrd:Data>
      </hrd:PostNewhireRecord>
   </soapenv:Body>
</soapenv:Envelope>

Keywords

SOAP, REST, API , KBA , LOD-SF-OBD-API , Webservices & API's , How To

Product

SAP SuccessFactors Onboarding all versions