<?xml version="1.0" encoding="UTF-8"?>
<corporate-data-model>
  <description>SuccessFactors HRIS sample with rich associations</description>

  <hris-element id="LegalEntity">
    <label>Legal Entity</label>
    <hris-field id="externalCode" required="true" type="string"><label>Entity Code</label></hris-field>
    <hris-field id="name" required="true" type="string"><label>Entity Name</label></hris-field>
    <hris-field id="country" type="picklist"><label>Country</label></hris-field>
    <hris-field id="effectiveStartDate" required="true" type="date"><label>Effective From</label></hris-field>
    <hris-field id="effectiveEndDate" type="date"><label>Effective To</label></hris-field>
    <search-criteria>
      <criterion field="externalCode" operator="EQ"/>
      <criterion field="country" operator="EQ"/>
    </search-criteria>
    <hris-associations>
      <association id="businessUnits" multiplicity="ONE_TO_MANY" destination-entity="BusinessUnit" required="false"/>
      <association id="costCenters" multiplicity="ONE_TO_MANY" destination-entity="CostCenter" required="false"/>
    </hris-associations>
  </hris-element>

  <hris-element id="BusinessUnit">
    <label>Business Unit</label>
    <hris-field id="externalCode" required="true" type="string"><label>Business Unit Code</label></hris-field>
    <hris-field id="name" required="true" type="string"><label>Business Unit Name</label></hris-field>
    <hris-field id="status" required="true" type="picklist"><label>Status</label></hris-field>
    <hris-associations>
      <association id="legalEntity" multiplicity="ONE_TO_ONE" destination-entity="LegalEntity" required="true"/>
      <association id="divisions" multiplicity="ONE_TO_MANY" destination-entity="Division" required="false"/>
      <association id="projects" multiplicity="ONE_TO_MANY" destination-entity="ProjectTeam" required="false"/>
    </hris-associations>
  </hris-element>

  <hris-element id="Division">
    <label>Division</label>
    <hris-field id="externalCode" required="true" type="string"><label>Division Code</label></hris-field>
    <hris-field id="name" required="true" type="string"><label>Division Name</label></hris-field>
    <hris-associations>
      <association id="businessUnit" multiplicity="ONE_TO_ONE" destination-entity="BusinessUnit" required="true"/>
      <association id="departments" multiplicity="ONE_TO_MANY" destination-entity="Department" required="false"/>
    </hris-associations>
  </hris-element>

  <hris-element id="Department">
    <label>Department</label>
    <hris-field id="externalCode" required="true" type="string"><label>Department Code</label></hris-field>
    <hris-field id="name" required="true" type="string"><label>Department Name</label></hris-field>
    <hris-field id="costCenterCode" type="string"><label>Default Cost Center</label></hris-field>
    <hris-associations>
      <association id="division" multiplicity="ONE_TO_ONE" destination-entity="Division" required="true"/>
      <association id="positions" multiplicity="ONE_TO_MANY" destination-entity="Position" required="false"/>
    </hris-associations>
  </hris-element>

  <hris-element id="CostCenter">
    <label>Cost Center</label>
    <hris-field id="externalCode" required="true" type="string"><label>Cost Center Code</label></hris-field>
    <hris-field id="name" required="true" type="string"><label>Cost Center Name</label></hris-field>
    <hris-field id="managerUserId" type="user"><label>Owner</label></hris-field>
    <hris-associations>
      <association id="legalEntity" multiplicity="ONE_TO_ONE" destination-entity="LegalEntity" required="true"/>
      <association id="positions" multiplicity="ONE_TO_MANY" destination-entity="Position" required="false"/>
      <association id="projects" multiplicity="ONE_TO_MANY" destination-entity="ProjectTeam" required="false"/>
    </hris-associations>
  </hris-element>

  <hris-element id="Location">
    <label>Location</label>
    <hris-field id="externalCode" required="true" type="string"><label>Location Code</label></hris-field>
    <hris-field id="name" required="true" type="string"><label>Location Name</label></hris-field>
    <hris-field id="timezone" type="string"><label>Time Zone</label></hris-field>
    <hris-field id="hybridEligible" type="boolean"><label>Hybrid Eligible</label></hris-field>
    <hris-associations>
      <association id="departments" multiplicity="ONE_TO_MANY" destination-entity="Department" required="false"/>
      <association id="positions" multiplicity="ONE_TO_MANY" destination-entity="Position" required="false"/>
    </hris-associations>
  </hris-element>

  <hris-element id="JobCode">
    <label>Job Classification</label>
    <hris-field id="externalCode" required="true" type="string"><label>Job Code</label></hris-field>
    <hris-field id="name" required="true" type="string"><label>Job Title</label></hris-field>
    <hris-field id="jobLevel" type="picklist"><label>Level</label></hris-field>
    <hris-field id="isPeopleManager" type="boolean"><label>People Manager Role</label></hris-field>
    <search-criteria>
      <criterion field="name" operator="CONTAINS"/>
      <criterion field="jobLevel" operator="EQ"/>
    </search-criteria>
    <hris-associations>
      <association id="payGrade" multiplicity="ONE_TO_ONE" destination-entity="PayGrade" required="true"/>
      <association id="positions" multiplicity="ONE_TO_MANY" destination-entity="Position" required="false"/>
      <association id="requiredSkills" multiplicity="ONE_TO_MANY" destination-entity="SkillProfile" required="false"/>
    </hris-associations>
  </hris-element>

  <hris-element id="PayGrade">
    <label>Pay Grade</label>
    <hris-field id="externalCode" required="true" type="string"><label>Pay Grade</label></hris-field>
    <hris-field id="currency" required="true" type="picklist"><label>Currency</label></hris-field>
    <hris-field id="minSalary" type="number"><label>Minimum Salary</label></hris-field>
    <hris-field id="maxSalary" type="number"><label>Maximum Salary</label></hris-field>
    <hris-associations>
      <association id="payComponents" multiplicity="ONE_TO_MANY" destination-entity="PayComponent" required="false"/>
      <association id="bonusPlan" multiplicity="ONE_TO_ONE" destination-entity="BonusPlan" required="false"/>
    </hris-associations>
  </hris-element>

  <hris-element id="Position">
    <label>Position</label>
    <hris-field id="externalCode" required="true" type="string"><label>Position Code</label></hris-field>
    <hris-field id="name" required="true" type="string"><label>Position Title</label></hris-field>
    <hris-field id="startDate" required="true" type="date"><label>Valid From</label></hris-field>
    <hris-field id="endDate" type="date"><label>Valid To</label></hris-field>
    <hris-field id="vacancyStatus" type="picklist"><label>Vacancy Status</label></hris-field>
    <hris-associations>
      <association id="department" multiplicity="ONE_TO_ONE" destination-entity="Department" required="true"/>
      <association id="jobCode" multiplicity="ONE_TO_ONE" destination-entity="JobCode" required="true"/>
      <association id="location" multiplicity="ONE_TO_ONE" destination-entity="Location" required="true"/>
      <association id="costCenter" multiplicity="ONE_TO_ONE" destination-entity="CostCenter" required="false"/>
      <association id="matrixTeam" multiplicity="ONE_TO_MANY" destination-entity="ProjectTeam" required="false"/>
    </hris-associations>
  </hris-element>

  <hris-element id="EmployeeProfile">
    <label>Employee Profile</label>
    <hris-field id="personIdExternal" required="true" type="string"><label>Person ID</label></hris-field>
    <hris-field id="userId" required="true" type="user"><label>User ID</label></hris-field>
    <hris-field id="employmentStatus" required="true" type="picklist"><label>Employment Status</label></hris-field>
    <hris-field id="hireDate" required="true" type="date"><label>Hire Date</label></hris-field>
    <hris-field id="managerId" type="user"><label>Direct Manager</label></hris-field>
    <search-criteria>
      <criterion field="personIdExternal" operator="EQ"/>
      <criterion field="employmentStatus" operator="EQ"/>
      <criterion field="managerId" operator="EQ"/>
    </search-criteria>
    <hris-associations>
      <association id="homePosition" multiplicity="ONE_TO_ONE" destination-entity="Position" required="true"/>
      <association id="compPackage" multiplicity="ONE_TO_ONE" destination-entity="CompensationPackage" required="true"/>
      <association id="benefits" multiplicity="ONE_TO_MANY" destination-entity="BenefitEnrollment" required="false"/>
      <association id="timeOffAccounts" multiplicity="ONE_TO_MANY" destination-entity="TimeOffAccount" required="false"/>
      <association id="skills" multiplicity="ONE_TO_MANY" destination-entity="SkillProfile" required="false"/>
      <association id="projects" multiplicity="ONE_TO_MANY" destination-entity="ProjectTeam" required="false"/>
    </hris-associations>
  </hris-element>

  <hris-element id="CompensationPackage">
    <label>Compensation Package</label>
    <hris-field id="externalCode" required="true" type="string"><label>Package ID</label></hris-field>
    <hris-field id="effectiveStartDate" required="true" type="date"><label>Effective From</label></hris-field>
    <hris-field id="effectiveEndDate" type="date"><label>Effective To</label></hris-field>
    <hris-field id="payFrequency" type="picklist"><label>Pay Frequency</label></hris-field>
    <hris-associations>
      <association id="employee" multiplicity="ONE_TO_ONE" destination-entity="EmployeeProfile" required="true"/>
      <association id="payGrade" multiplicity="ONE_TO_ONE" destination-entity="PayGrade" required="true"/>
      <association id="components" multiplicity="ONE_TO_MANY" destination-entity="PayComponent" required="true"/>
      <association id="bonusPlan" multiplicity="ONE_TO_ONE" destination-entity="BonusPlan" required="false"/>
    </hris-associations>
  </hris-element>

  <hris-element id="PayComponent">
    <label>Pay Component</label>
    <hris-field id="externalCode" required="true" type="string"><label>Component Code</label></hris-field>
    <hris-field id="name" required="true" type="string"><label>Component Name</label></hris-field>
    <hris-field id="componentType" required="true" type="picklist"><label>Type</label></hris-field>
    <hris-field id="amount" type="number"><label>Amount</label></hris-field>
    <hris-associations>
      <association id="compPackage" multiplicity="ONE_TO_ONE" destination-entity="CompensationPackage" required="false"/>
      <association id="payGrade" multiplicity="ONE_TO_ONE" destination-entity="PayGrade" required="false"/>
    </hris-associations>
  </hris-element>

  <hris-element id="BonusPlan">
    <label>Bonus Plan</label>
    <hris-field id="externalCode" required="true" type="string"><label>Plan Code</label></hris-field>
    <hris-field id="name" required="true" type="string"><label>Plan Name</label></hris-field>
    <hris-field id="targetPercent" type="number"><label>Target Percent</label></hris-field>
    <hris-associations>
      <association id="eligibleJobs" multiplicity="ONE_TO_MANY" destination-entity="JobCode" required="false"/>
      <association id="packages" multiplicity="ONE_TO_MANY" destination-entity="CompensationPackage" required="false"/>
    </hris-associations>
  </hris-element>

  <hris-element id="BenefitEnrollment">
    <label>Benefit Enrollment</label>
    <hris-field id="externalCode" required="true" type="string"><label>Enrollment ID</label></hris-field>
    <hris-field id="planType" required="true" type="picklist"><label>Plan Type</label></hris-field>
    <hris-field id="coverageLevel" type="picklist"><label>Coverage Level</label></hris-field>
    <hris-field id="startDate" required="true" type="date"><label>Start Date</label></hris-field>
    <hris-field id="endDate" type="date"><label>End Date</label></hris-field>
    <hris-associations>
      <association id="employee" multiplicity="ONE_TO_ONE" destination-entity="EmployeeProfile" required="true"/>
      <association id="costCenter" multiplicity="ONE_TO_ONE" destination-entity="CostCenter" required="false"/>
    </hris-associations>
  </hris-element>

  <hris-element id="TimeOffAccount">
    <label>Time Off Account</label>
    <hris-field id="externalCode" required="true" type="string"><label>Account ID</label></hris-field>
    <hris-field id="accountType" required="true" type="picklist"><label>Account Type</label></hris-field>
    <hris-field id="balance" type="number"><label>Current Balance</label></hris-field>
    <hris-field id="carryOverLimit" type="number"><label>Carry Over Limit</label></hris-field>
    <hris-associations>
      <association id="employee" multiplicity="ONE_TO_ONE" destination-entity="EmployeeProfile" required="true"/>
      <association id="approvalRole" multiplicity="ONE_TO_ONE" destination-entity="JobCode" required="false"/>
    </hris-associations>
  </hris-element>

  <hris-element id="SkillProfile">
    <label>Skill Profile</label>
    <hris-field id="externalCode" required="true" type="string"><label>Skill ID</label></hris-field>
    <hris-field id="name" required="true" type="string"><label>Skill Name</label></hris-field>
    <hris-field id="proficiency" type="picklist"><label>Proficiency</label></hris-field>
    <hris-associations>
      <association id="employees" multiplicity="ONE_TO_MANY" destination-entity="EmployeeProfile" required="false"/>
      <association id="jobs" multiplicity="ONE_TO_MANY" destination-entity="JobCode" required="false"/>
      <association id="projects" multiplicity="ONE_TO_MANY" destination-entity="ProjectTeam" required="false"/>
    </hris-associations>
  </hris-element>

  <hris-element id="ProjectTeam">
    <label>Project Team</label>
    <hris-field id="externalCode" required="true" type="string"><label>Project Code</label></hris-field>
    <hris-field id="name" required="true" type="string"><label>Project Name</label></hris-field>
    <hris-field id="startDate" required="true" type="date"><label>Start Date</label></hris-field>
    <hris-field id="endDate" type="date"><label>End Date</label></hris-field>
    <hris-field id="billingModel" type="picklist"><label>Billing Model</label></hris-field>
    <search-criteria>
      <criterion field="externalCode" operator="EQ"/>
      <criterion field="billingModel" operator="EQ"/>
    </search-criteria>
    <hris-associations>
      <association id="sponsorBU" multiplicity="ONE_TO_ONE" destination-entity="BusinessUnit" required="true"/>
      <association id="costCenter" multiplicity="ONE_TO_ONE" destination-entity="CostCenter" required="false"/>
      <association id="members" multiplicity="ONE_TO_MANY" destination-entity="EmployeeProfile" required="false"/>
      <association id="primarySkills" multiplicity="ONE_TO_MANY" destination-entity="SkillProfile" required="false"/>
    </hris-associations>
  </hris-element>

</corporate-data-model>
