From f58af3bd156bce1ee962806e6f303fa51e70aa8e Mon Sep 17 00:00:00 2001 From: Ankur Rana Date: Wed, 22 Oct 2025 21:29:22 +0530 Subject: [PATCH 1/2] Fixing PTO Usecase --- ...HRWorkdayHCMEmployeeGetVacationBalance.xml | 4 +- .../EmployeeGetVacationBalance/topic.yaml | 2 +- .../WorkdayEmployeeRequestTimeOff/topic.yaml | 39 +++++++++++++++---- 3 files changed, 35 insertions(+), 10 deletions(-) diff --git a/EmployeeSelfServiceAgent/Workday/EmployeeScenarios/EmployeeGetVacationBalance/msdyn_HRWorkdayHCMEmployeeGetVacationBalance.xml b/EmployeeSelfServiceAgent/Workday/EmployeeScenarios/EmployeeGetVacationBalance/msdyn_HRWorkdayHCMEmployeeGetVacationBalance.xml index c62549c8..ab2b9b4f 100644 --- a/EmployeeSelfServiceAgent/Workday/EmployeeScenarios/EmployeeGetVacationBalance/msdyn_HRWorkdayHCMEmployeeGetVacationBalance.xml +++ b/EmployeeSelfServiceAgent/Workday/EmployeeScenarios/EmployeeGetVacationBalance/msdyn_HRWorkdayHCMEmployeeGetVacationBalance.xml @@ -4,7 +4,7 @@ User - Template_GetTimeOffBalances_Request + msdyn_HRWorkdayHCMEmployeeGetVacationBalance Absence_Management v42.0 @@ -64,7 +64,7 @@ - + diff --git a/EmployeeSelfServiceAgent/Workday/EmployeeScenarios/EmployeeGetVacationBalance/topic.yaml b/EmployeeSelfServiceAgent/Workday/EmployeeScenarios/EmployeeGetVacationBalance/topic.yaml index 8750fe6f..8270d102 100644 --- a/EmployeeSelfServiceAgent/Workday/EmployeeScenarios/EmployeeGetVacationBalance/topic.yaml +++ b/EmployeeSelfServiceAgent/Workday/EmployeeScenarios/EmployeeGetVacationBalance/topic.yaml @@ -81,7 +81,7 @@ beginDialog: - kind: SetVariable id: ensure_effective_date2 variable: Topic.AsOfEffectiveDate - value: =If(IsBlank(Topic.AsOfEffectiveDate), DateTimeValue(Text(Today(), "yyyy-MM-dd")), Topic.AsOfEffectiveDate) + value: =If(IsBlank(Topic.AsOfEffectiveDate), DateTimeValue(Topic.asOfDate), Topic.AsOfEffectiveDate) - kind: BeginDialog id: Y74Om43 diff --git a/EmployeeSelfServiceAgent/Workday/EmployeeScenarios/WorkdayEmployeeRequestTimeOff/topic.yaml b/EmployeeSelfServiceAgent/Workday/EmployeeScenarios/WorkdayEmployeeRequestTimeOff/topic.yaml index 0265a416..80d3cff7 100644 --- a/EmployeeSelfServiceAgent/Workday/EmployeeScenarios/WorkdayEmployeeRequestTimeOff/topic.yaml +++ b/EmployeeSelfServiceAgent/Workday/EmployeeScenarios/WorkdayEmployeeRequestTimeOff/topic.yaml @@ -6,9 +6,15 @@ inputs: entity: DateTimePrebuiltEntity shouldPromptUser: false + - kind: AutomaticTaskInput + propertyName: NumberOfHours + description: Number of hours for time off + entity: NumberPrebuiltEntity + shouldPromptUser: false + - kind: AutomaticTaskInput propertyName: ReasonText - description: Reason for time off (free texsdt) + description: Reason for time off (free text) shouldPromptUser: false - kind: AutomaticTaskInput @@ -20,7 +26,7 @@ inputs: modelDescription: |- You will respond only to requests related to requesting time off for the user making the request. All time off requests are submitted to Workday (Absence_Management) and pertain exclusively to the requesting user. - This topic may prompt the user for input (date and reason) if they are requesting time off for themselves. + This topic may prompt the user for input (date, hours, and reason) if they are requesting time off for themselves. This data exclusively belongs to the user making the request. Do not respond to questions about other people's data. Example invalid requests: @@ -31,7 +37,8 @@ modelDescription: |- Example valid requests: "Request time off" "I need to submit time off" - "Please request time off on 2025-09-15 because of a family event" + "Please request 8 hours time off on 2025-09-15 because of a family event" + "Request 4 hours vacation on December 1st" beginDialog: kind: OnRecognizedIntent id: main @@ -59,7 +66,7 @@ beginDialog: actions: - kind: AdaptiveCardPrompt id: collect_time_off - displayName: Ask date and reason for time off + displayName: Ask date, hours and reason for time off card: |- ={ type: "AdaptiveCard", @@ -76,7 +83,7 @@ beginDialog: }, { type: "TextBlock", - text: "Enter the date and the reason for your time off request.", + text: "Enter the date, hours, and reason for your time off request.", wrap: true }, { @@ -100,6 +107,17 @@ beginDialog: errorMessage: "Please select a date.", value: If(IsBlank(Topic.TimeOffDate) || Topic.TimeOffDate < Today(), "",Text(Topic.TimeOffDate,"yyyy-MM-dd")) }, + { + type: "Input.Number", + id: "numberOfHours", + label: "Number of Hours", + placeholder: "Enter hours (e.g., 8, 4, 2)", + isRequired: true, + errorMessage: "Please enter the number of hours.", + min: 0.5, + max: 24, + value: If(IsBlank(Topic.NumberOfHours), 8, Topic.NumberOfHours) + }, { type: "Input.Text", id: "reasonText", @@ -119,6 +137,7 @@ beginDialog: output: binding: actionSubmitId: Topic.actionSubmitId + numberOfHours: Topic.numberOfHours reasonText: Topic.reasonText timeOffDate: Topic.timeOffDate timeOffType: Topic.timeOffType @@ -126,6 +145,7 @@ beginDialog: outputType: properties: actionSubmitId: String + numberOfHours: Number reasonText: String timeOffDate: String timeOffType: String @@ -148,10 +168,10 @@ beginDialog: displayName: Redirect to Workday System Get Common Execution input: binding: - parameters: ="{""params"":[{""key"":""{Employee_ID}"",""value"":""" & Global.ESS_UserContext_Employee_Id & """},{""key"":""{Time_Off_Date}"",""value"":""" & Topic.timeOffDate & """},{""key"":""{Comment}"",""value"":""" & Topic.reasonText & """},{""key"":""{Reason_ID}"",""value"":""" & Topic.timeOffType & """},{""key"":""{Hours}"",""value"":""8""}]}" + parameters: ="{""params"":[{""key"":""{Employee_ID}"",""value"":""" & Global.ESS_UserContext_Employee_Id & """},{""key"":""{Time_Off_Date}"",""value"":""" & Topic.timeOffDate & """},{""key"":""{Comment}"",""value"":""" & Topic.reasonText & """},{""key"":""{Reason_ID}"",""value"":""" & Topic.timeOffType & """},{""key"":""{Hours}"",""value"":""" & Text(Topic.numberOfHours) & """}]}" scenarioName: msdyn_HRWorkdayAbsenceEnterTimeOff_EnterTimeOffInfo - dialog: msdyn_copilotforemployeeselfservicehr.topic.WorkdaySystemGetCommonExecution + dialog: msdyn_copilotforemployeeselfservice.topic.WorkdaySystemGetCommonExecution output: binding: errorResponse: Topic.errorResponse @@ -183,6 +203,11 @@ inputType: description: The name of the employee to fetch data for. type: String + NumberOfHours: + displayName: NumberOfHours + description: Number of hours for time off + type: Number + ReasonText: displayName: ReasonText description: Reason for time off (free text) From 3cc7e518495d0db8137f481d2a1dd9c6d2954666 Mon Sep 17 00:00:00 2001 From: Ankur Rana Date: Wed, 22 Oct 2025 22:16:05 +0530 Subject: [PATCH 2/2] Give Peer Feedback --- ...msdyn_HRWorkdayHCMEmployeeGiveFeedback.xml | 60 ++++++++++++++ .../WorkdayGivePeerFeedback/topic.yaml | 83 +++++++++++++++++++ 2 files changed, 143 insertions(+) create mode 100644 EmployeeSelfServiceAgent/Workday/EmployeeScenarios/WorkdayGivePeerFeedback/msdyn_HRWorkdayHCMEmployeeGiveFeedback.xml create mode 100644 EmployeeSelfServiceAgent/Workday/EmployeeScenarios/WorkdayGivePeerFeedback/topic.yaml diff --git a/EmployeeSelfServiceAgent/Workday/EmployeeScenarios/WorkdayGivePeerFeedback/msdyn_HRWorkdayHCMEmployeeGiveFeedback.xml b/EmployeeSelfServiceAgent/Workday/EmployeeScenarios/WorkdayGivePeerFeedback/msdyn_HRWorkdayHCMEmployeeGiveFeedback.xml new file mode 100644 index 00000000..6d30bdaf --- /dev/null +++ b/EmployeeSelfServiceAgent/Workday/EmployeeScenarios/WorkdayGivePeerFeedback/msdyn_HRWorkdayHCMEmployeeGiveFeedback.xml @@ -0,0 +1,60 @@ + + + + + User + + msdyn_HRWorkdayHCMEmployeeGiveFeedback + Talent + v42.0 + + + + Employee_ID + {Employee_ID} + + + Employee_ID_Of_Receiver + {Employee_ID_Of_Receiver} + + + Comment + {Comment} + + + + + WID + + //*[local-name()='Give_Feedback_Response'] + /*[local-name()='Give_Feedback_Event_Reference'] + /*[local-name()='ID'][@*[local-name()='type']='WID']/text() + + + + + + + + + + + true + true + + + + {Employee_ID} + + + {Employee_ID_Of_Receiver} + + {Comment} + true + false + false + + + + + \ No newline at end of file diff --git a/EmployeeSelfServiceAgent/Workday/EmployeeScenarios/WorkdayGivePeerFeedback/topic.yaml b/EmployeeSelfServiceAgent/Workday/EmployeeScenarios/WorkdayGivePeerFeedback/topic.yaml new file mode 100644 index 00000000..37273c02 --- /dev/null +++ b/EmployeeSelfServiceAgent/Workday/EmployeeScenarios/WorkdayGivePeerFeedback/topic.yaml @@ -0,0 +1,83 @@ +kind: AdaptiveDialog +modelDescription: |- + This topic provides a way to send feedback to the coworkers. + + Some of the valid requests are as follows: + + give feedback + share feedback for a colleague + submit peer feedback + feedback for employee + I want to appreciate my teammate + report feedback about coworker +beginDialog: + kind: OnRecognizedIntent + id: main + intent: + triggerQueries: + - send feedback about workday + - give feedback on workday + - workday feedback + - report issue with workday + - share thoughts on workday + - submit comments for workday + - provide input on workday experience + - suggest improvements for workday + - complain about workday + + actions: + - kind: Question + id: Question_KkmuHF + variable: Topic.varEmployeeId + prompt: What is the _Employee ID_ of the colleague you want to give feedback for? + entity: StringPrebuiltEntity + + - kind: ConditionGroup + id: ConditionGroup_8NOr8O + conditions: + - id: ConditionItem_GLZBTd + condition: =!IsBlank(Topic.varEmployeeId) + actions: + - kind: Question + id: Question_ZGYUYN + variable: Topic.FeedbackText + prompt: Please enter your feedback for your coworker. + entity: StringPrebuiltEntity + + - kind: BeginDialog + id: Za15eH + displayName: Redirect to Workday Get Common Execution + input: + binding: + parameters: ="{""params"":[{""key"":""{Employee_ID}"",""value"":""" & Global.ESS_UserContext_Employee_Id & """}, {""key"":""{Employee_ID_Of_Receiver}"",""value"":"""& Topic.varEmployeeId & """}, {""key"":""{Comment}"",""value"":""" & Topic.FeedbackText & """}]}" + scenarioName: msdyn_HRWorkdayHCMEmployeeGiveFeedback + + dialog: msdyn_copilotforemployeeselfservice.topic.WorkdaySystemGetCommonExecution + output: + binding: + errorResponse: Topic.errorResponse + isSuccess: Topic.isSuccess + workdayResponse: Topic.workdayResponse + + - kind: ConditionGroup + id: conditionGroup_r9LEup + conditions: + - id: conditionItem_XVznZc + condition: =IsBlank(Topic.errorResponse) && Topic.isSuccess = true + actions: + - kind: SendActivity + id: sendActivity_ISzuar + activity: Feedback is sent successfully + + elseActions: + - kind: SendActivity + id: sendActivity_qhWHOF + activity: There is a failure in sending the feedback {Topic.errorResponse} + + elseActions: + - kind: SendActivity + id: SendActivity_jLD6lX + activity: You cannot send feedback to yourself. + +inputType: {} +outputType: {} \ No newline at end of file