|
| 1 | +# Workday Get User Profile |
| 2 | + |
| 3 | +This scenario enables employees to retrieve their profile information from Workday through a conversational interface. It provides comprehensive employee data including personal details, employment information, contact details, and tenure calculations. |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +- **Personal Information**: Name, Date of Birth, Gender |
| 8 | +- **Employment Details**: Employee ID, Business Title, Organization/Department, Manager, Location |
| 9 | +- **Contact Information**: Work Email, Work Phone, Home Email, Home Phone, Home Address |
| 10 | +- **Employment Status**: Active/Inactive status, Hire Date |
| 11 | +- **Tenure Calculation**: Continuous Service Date and calculated Length of Service (years, months, days) |
| 12 | + |
| 13 | +## Trigger Phrases |
| 14 | + |
| 15 | +Users can activate this topic with phrases like: |
| 16 | +- "What is my profile?" |
| 17 | +- "Show my profile" |
| 18 | +- "What is my employee ID?" |
| 19 | +- "What is my job title?" |
| 20 | +- "What is my work email?" |
| 21 | +- "Who is my manager?" |
| 22 | +- "What department am I in?" |
| 23 | +- "What is my tenure?" |
| 24 | +- "How long have I been with the company?" |
| 25 | +- "What is my hire date?" |
| 26 | +- "Am I an active employee?" |
| 27 | + |
| 28 | +## Files |
| 29 | + |
| 30 | +| File | Description | |
| 31 | +|------|-------------| |
| 32 | +| `topic.yaml` | Main Copilot Studio topic definition | |
| 33 | +| `msdyn_HRWorkdayHCMEmployeeGetUserProfile.xml` | XML template with XPath extractions for profile data | |
| 34 | + |
| 35 | +## Workday APIs Used |
| 36 | + |
| 37 | +| API | Service | Version | Purpose | |
| 38 | +|-----|---------|---------|---------| |
| 39 | +| `Get_Workers` | Human_Resources | v45.0 | Retrieve comprehensive employee profile data | |
| 40 | + |
| 41 | +## Data Retrieved |
| 42 | + |
| 43 | +The topic extracts the following fields from Workday: |
| 44 | + |
| 45 | +| Field | XPath Source | Description | |
| 46 | +|-------|--------------|-------------| |
| 47 | +| `EmployeeID` | Worker_Data/Worker_ID | Employee's Workday ID | |
| 48 | +| `Name` | Worker_Descriptor | Employee's full name | |
| 49 | +| `DOB` | Personal_Information_Data/Birth_Date | Date of birth | |
| 50 | +| `Gender` | Gender_Reference/@Descriptor | Gender | |
| 51 | +| `BusinessTitle` | Position_Data/Business_Title | Job title | |
| 52 | +| `Organization` | Organization_Reference (SUPERVISORY_ORGANIZATION) | Department/Org | |
| 53 | +| `Manager` | Manager_Reference/@Descriptor | Direct manager's name | |
| 54 | +| `Location` | Location_Reference/@Descriptor | Work location | |
| 55 | +| `HireDate` | Worker_Status_Data/Hire_Date | Original hire date | |
| 56 | +| `WorkEmail` | Email_Address (WORK usage type) | Work email address | |
| 57 | +| `HomeAddress` | Address_Data (HOME usage type) | Formatted home address | |
| 58 | +| `HomeEmail` | Email_Address (HOME usage type, primary) | Personal email | |
| 59 | +| `HomePhone` | Phone_Data (HOME usage type, primary) | Home phone number | |
| 60 | +| `WorkPhone` | Phone_Data (WORK usage type, primary) | Work phone number | |
| 61 | +| `Status` | Worker_Status_Data/Active | Employment status (Active/Inactive) | |
| 62 | +| `ContinuousServiceDate` | Worker_Status_Data/Continuous_Service_Date | Service start date | |
| 63 | +| `LengthOfService` | *Calculated* | Years, months, days of service | |
| 64 | + |
| 65 | +## Flow Overview |
| 66 | + |
| 67 | +``` |
| 68 | +┌─────────────────────────────────────────────────────────────┐ |
| 69 | +│ User Triggers Topic │ |
| 70 | +│ (e.g., "What is my profile?") │ |
| 71 | +└─────────────────────────────────────────────────────────────┘ |
| 72 | + │ |
| 73 | + ▼ |
| 74 | +┌─────────────────────────────────────────────────────────────┐ |
| 75 | +│ Call Get_Workers API │ |
| 76 | +│ (with Employee_ID and As_Of_Date) │ |
| 77 | +└─────────────────────────────────────────────────────────────┘ |
| 78 | + │ |
| 79 | + ▼ |
| 80 | +┌─────────────────────────────────────────────────────────────┐ |
| 81 | +│ Parse Response via XPath │ |
| 82 | +│ (Extract all profile fields) │ |
| 83 | +└─────────────────────────────────────────────────────────────┘ |
| 84 | + │ |
| 85 | + ▼ |
| 86 | +┌─────────────────────────────────────────────────────────────┐ |
| 87 | +│ Calculate Length of Service │ |
| 88 | +│ (Years, Months, Days from Continuous Service Date) │ |
| 89 | +└─────────────────────────────────────────────────────────────┘ |
| 90 | + │ |
| 91 | + ▼ |
| 92 | +┌─────────────────────────────────────────────────────────────┐ |
| 93 | +│ Return finalizedData Record │ |
| 94 | +│ (All fields available for AI to respond) │ |
| 95 | +└─────────────────────────────────────────────────────────────┘ |
| 96 | +``` |
| 97 | + |
| 98 | +## Length of Service Calculation |
| 99 | + |
| 100 | +The topic automatically calculates the employee's length of service from their Continuous Service Date: |
| 101 | + |
| 102 | +``` |
| 103 | +Years: RoundDown(DateDiff(ServiceDate, Today, Months) / 12, 0) |
| 104 | +Months: Mod(DateDiff(ServiceDate, Today, Months), 12) |
| 105 | +Days: DateDiff(AdjustedDate, Today, Days) |
| 106 | +``` |
| 107 | + |
| 108 | +Output format: "X year(s) Y month(s) Z day(s)" |
| 109 | + |
| 110 | +## Dependencies |
| 111 | + |
| 112 | +This topic requires the following system topics/dialogs: |
| 113 | +- `msdyn_copilotforemployeeselfservicehr.topic.WorkdaySystemGetCommonExecution` - For executing Workday API calls |
| 114 | + |
| 115 | +## Global Variables Used |
| 116 | + |
| 117 | +| Variable | Description | |
| 118 | +|----------|-------------| |
| 119 | +| `Global.ESS_UserContext_Employee_Id` | The logged-in employee's Workday Employee ID | |
| 120 | + |
| 121 | +## Output |
| 122 | + |
| 123 | +The topic outputs a `finalizedData` record containing all profile fields that can be used by the AI orchestrator to formulate responses based on what the user specifically asked for. |
| 124 | + |
| 125 | +```yaml |
| 126 | +outputType: |
| 127 | + properties: |
| 128 | + finalizedData: |
| 129 | + type: Record |
| 130 | + properties: |
| 131 | + EmployeeID: String |
| 132 | + Name: String |
| 133 | + DOB: String |
| 134 | + Gender: String |
| 135 | + BusinessTitle: String |
| 136 | + Organization: String |
| 137 | + Manager: String |
| 138 | + Location: String |
| 139 | + HireDate: String |
| 140 | + WorkEmail: String |
| 141 | + HomeAddress: String |
| 142 | + HomeEmail: String |
| 143 | + HomePhone: String |
| 144 | + WorkPhone: String |
| 145 | + Status: String |
| 146 | + ContinuousServiceDate: String |
| 147 | + LengthOfService: String |
| 148 | +``` |
| 149 | +
|
| 150 | +## Important Notes |
| 151 | +
|
| 152 | +1. **Privacy**: This topic only returns data for the requesting user. Questions about other employees (managers, colleagues) are explicitly rejected per the model description. |
| 153 | +
|
| 154 | +2. **Tenure Information**: Length of Service is only included in the AI's response when the user specifically asks about tenure, service length, or how long they've been with the company. |
| 155 | +
|
| 156 | +3. **Status Conversion**: The raw `Active` field from Workday (1 or 0) is converted to human-readable "Active" or "Inactive". |
| 157 | + |
| 158 | +4. **Response Optimization**: The Get_Workers request is optimized to exclude unnecessary data (benefits, qualifications, photos, etc.) to improve performance. |
| 159 | + |
| 160 | +## Version History |
| 161 | + |
| 162 | +| Version | Date | Changes | |
| 163 | +|---------|------|---------| |
| 164 | +| 1.0 | December 2025 | Initial release with comprehensive profile retrieval | |
0 commit comments