|
| 1 | +# Add Dependents |
| 2 | + |
| 3 | +This scenario allows employees to add new dependents to their Workday profile for benefits enrollment purposes. |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +The `AddDependents` topic allows employees to: |
| 8 | +1. **View** their existing dependents |
| 9 | +2. **Add** a new dependent (spouse, child, domestic partner, etc.) |
| 10 | + |
| 11 | +## Flow |
| 12 | + |
| 13 | +``` |
| 14 | +┌─────────────────────────────────────┐ |
| 15 | +│ User triggers topic │ |
| 16 | +└──────────────┬──────────────────────┘ |
| 17 | + │ |
| 18 | + ▼ |
| 19 | +┌─────────────────────────────────────┐ |
| 20 | +│ Fetch reference data │ |
| 21 | +│ (Relationship Types) │ |
| 22 | +└──────────────┬──────────────────────┘ |
| 23 | + │ |
| 24 | + ▼ |
| 25 | +┌─────────────────────────────────────┐ |
| 26 | +│ Fetch existing dependents │ |
| 27 | +│ (msdyn_HRWorkdayHCMEmployee │ |
| 28 | +│ GetDependents) │ |
| 29 | +└──────────────┬──────────────────────┘ |
| 30 | + │ |
| 31 | + ▼ |
| 32 | + ┌──────┴──────┐ |
| 33 | + │ Dependents │ |
| 34 | + │ exist? │ |
| 35 | + └──────┬──────┘ |
| 36 | + │ |
| 37 | + ┌───────┴───────┐ |
| 38 | + │ │ |
| 39 | + ▼ ▼ |
| 40 | +┌──────────────┐ ┌──────────────┐ |
| 41 | +│ Show list of │ │ "No deps on │ |
| 42 | +│ existing │ │ file yet" │ |
| 43 | +│ dependents │ │ │ |
| 44 | +└──────┬───────┘ └──────┬───────┘ |
| 45 | + │ │ |
| 46 | + └───────┬────────┘ |
| 47 | + │ |
| 48 | + ▼ |
| 49 | +┌─────────────────────────────────────┐ |
| 50 | +│ Show Add Dependent Form │ |
| 51 | +│ (Adaptive Card) │ |
| 52 | +└──────────────┬──────────────────────┘ |
| 53 | + │ |
| 54 | + ▼ |
| 55 | +┌─────────────────────────────────────┐ |
| 56 | +│ Show Confirmation Card │ |
| 57 | +└──────────────┬──────────────────────┘ |
| 58 | + │ |
| 59 | + ▼ |
| 60 | +┌─────────────────────────────────────┐ |
| 61 | +│ Submit to Workday │ |
| 62 | +│ (msdyn_HRWorkdayHCMEmployee │ |
| 63 | +│ AddDependent) │ |
| 64 | +└──────────────┬──────────────────────┘ |
| 65 | + │ |
| 66 | + ▼ |
| 67 | +┌─────────────────────────────────────┐ |
| 68 | +│ Show success/error message │ |
| 69 | +└─────────────────────────────────────┘ |
| 70 | +``` |
| 71 | + |
| 72 | +## Files |
| 73 | + |
| 74 | +| File | Purpose | |
| 75 | +|------|---------| |
| 76 | +| `AddDependents_Topic.yaml` | Main topic definition with full flow | |
| 77 | +| `msdyn_GetDependents_Template.xml` | XML template for fetching existing dependents | |
| 78 | +| `msdyn_AddDependent_Template.xml` | XML template for adding a new dependent | |
| 79 | + |
| 80 | + |
| 81 | +## API Scenarios Used |
| 82 | + |
| 83 | +| Scenario | API | Purpose | |
| 84 | +|----------|-----|---------| |
| 85 | +| `msdyn_HRWorkdayHCMEmployeeGetDependents` | Human_Resources v45.0 | Fetch existing dependents | |
| 86 | +| `msdyn_HRWorkdayHCMEmployeeAddDependent` | Benefits_Administration v45.1 | Add new dependent | |
| 87 | + |
| 88 | +## XPath Filtering |
| 89 | + |
| 90 | +The Get Dependents template uses XPath predicates to filter only actual dependents (excluding emergency contacts): |
| 91 | + |
| 92 | +```xpath |
| 93 | +//*[local-name()='Related_Person_Data']/*[local-name()='Related_Person'][*[local-name()='Dependent']] |
| 94 | +``` |
| 95 | + |
| 96 | +This ensures that only `Related_Person` nodes containing a `Dependent` child element are returned. |
| 97 | + |
| 98 | +## Form Fields |
| 99 | + |
| 100 | +| Field | Type | Required | Source | |
| 101 | +|-------|------|----------|--------| |
| 102 | +| First Name | Text Input | Yes | User entry | |
| 103 | +| Last Name | Text Input | Yes | User entry | |
| 104 | +| Date of Birth | Date Input | Yes | User entry | |
| 105 | +| Gender | Dropdown | Yes | Hardcoded (Male, Female, Not_Declared) | |
| 106 | +| Relationship | Dropdown | Yes | Dynamic from `Global.RelatedPersonRelationshipLookupTable` | |
| 107 | +| Country | Dropdown | Yes | Hardcoded (USA, CAN, GBR, AUS, DEU, FRA, IND) | |
| 108 | + |
| 109 | +## Parameters |
| 110 | + |
| 111 | +### Add Dependent Template Parameters |
| 112 | + |
| 113 | +| Parameter | Description | Example | |
| 114 | +|-----------|-------------|---------| |
| 115 | +| `{Employee_ID}` | Employee's Workday ID | `21514` | |
| 116 | +| `{First_Name}` | Dependent's first name | `John` | |
| 117 | +| `{Last_Name}` | Dependent's last name | `Smith` | |
| 118 | +| `{Date_Of_Birth}` | Date of birth (YYYY-MM-DD) | `2015-06-15` | |
| 119 | +| `{Gender}` | Gender code | `Male` / `Female` / `Not_Declared` | |
| 120 | +| `{Relationship_Type}` | Relationship type ID | `Biological_Child` | |
| 121 | +| `{Country_Code}` | Country ISO code | `USA` | |
| 122 | + |
| 123 | +### Get Dependents Template Parameters |
| 124 | + |
| 125 | +| Parameter | Description | Example | |
| 126 | +|-----------|-------------|---------| |
| 127 | +| `{Employee_ID}` | Employee's Workday ID | `21514` | |
| 128 | +| `{As_Of_Effective_Date}` | Effective date (YYYY-MM-DD) | `2025-12-30` | |
| 129 | + |
| 130 | +## Response Data Extracted |
| 131 | + |
| 132 | +### Get Dependents Response |
| 133 | + |
| 134 | +| Key | XPath | Description | |
| 135 | +|-----|-------|-------------| |
| 136 | +| `DependentID` | `.//ID[@type='Dependent_ID']` | Unique dependent identifier | |
| 137 | +| `DependentWID` | `.//ID[@type='WID']` (Dependent_Reference) | Workday Internal ID | |
| 138 | +| `PersonWID` | `.//ID[@type='WID']` (Person_Reference) | Person reference WID | |
| 139 | +| `FullName` | `.//Name_Detail_Data/@Formatted_Name` | Full formatted name | |
| 140 | +| `FirstName` | `.//First_Name` | First name | |
| 141 | +| `LastName` | `.//Last_Name` | Last name | |
| 142 | +| `DateOfBirth` | `.//Dependent_Data/Date_of_Birth` | Date of birth | |
| 143 | +| `Gender` | `.//Dependent_Data/Gender_Reference/@Descriptor` | Gender | |
| 144 | +| `RelationshipTypeID` | `.//Related_Person_Relationship_ID` | Relationship type ID | |
| 145 | +| `IsFullTimeStudent` | `.//Full_Time_Student` | Full-time student flag | |
| 146 | +| `IsDisabled` | `.//Disabled` | Disabled flag | |
| 147 | + |
| 148 | +### Add Dependent Response |
| 149 | + |
| 150 | +| Key | XPath | Description | |
| 151 | +|-----|-------|-------------| |
| 152 | +| `DependentWID` | `.//Dependent_Reference/ID[@type='WID']` | Created dependent WID | |
| 153 | +| `DependentID` | `.//Dependent_Reference/ID[@type='Dependent_ID']` | Created dependent ID | |
| 154 | + |
| 155 | +## Example Triggers |
| 156 | + |
| 157 | +- "Add a dependent" |
| 158 | +- "I want to add my child as a dependent" |
| 159 | +- "Add my spouse to my benefits" |
| 160 | +- "Register a new dependent" |
| 161 | +- "I need to add a family member" |
| 162 | + |
| 163 | +## Dependencies |
| 164 | + |
| 165 | +- `msdyn_copilotforemployeeselfservicehr.topic.GetReferenceData` - For fetching relationship types |
| 166 | +- `msdyn_copilotforemployeeselfservicehr.topic.WorkdaySystemGetCommonExecution` - For API execution |
| 167 | +- `Global.RelatedPersonRelationshipLookupTable` - Relationship types lookup |
| 168 | +- `Global.ESS_UserContext_Employee_Id` - Current user's employee ID |
0 commit comments