Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<apiRequest>
<authType>User</authType>
<endpoint>
<request>Template_GetTimeOffBalances_Request</request>
<request>msdyn_HRWorkdayHCMEmployeeGetVacationBalance</request>
<serviceName>Absence_Management</serviceName>
<version>v42.0</version>
</endpoint>
Expand Down Expand Up @@ -64,7 +64,7 @@
</scenario>

<requestTemplates>
<requestTemplate name="Template_GetTimeOffBalances_Request">
<requestTemplate name="msdyn_HRWorkdayHCMEmployeeGetVacationBalance">
<bsvc:Get_Time_Off_Plan_Balances_Request xmlns:bsvc="urn:com.workday/bsvc" bsvc:version="v42.0">


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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",
Expand All @@ -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
},
{
Expand All @@ -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",
Expand All @@ -119,13 +137,15 @@ beginDialog:
output:
binding:
actionSubmitId: Topic.actionSubmitId
numberOfHours: Topic.numberOfHours
reasonText: Topic.reasonText
timeOffDate: Topic.timeOffDate
timeOffType: Topic.timeOffType

outputType:
properties:
actionSubmitId: String
numberOfHours: Number
reasonText: String
timeOffDate: String
timeOffType: String
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<workdayEntityConfigurationTemplate>
<scenario name="GiveFeedbackRequest">
<apiRequests>
<apiRequest>
<authType>User</authType>
<endpoint>
<request>msdyn_HRWorkdayHCMEmployeeGiveFeedback</request>
<serviceName>Talent</serviceName>
<version>v42.0</version>
</endpoint>
<requestParameters>
<parameter>
<name>Employee_ID</name>
<value>{Employee_ID}</value>
</parameter>
<parameter>
<name>Employee_ID_Of_Receiver</name>
<value>{Employee_ID_Of_Receiver}</value>
</parameter>
<parameter>
<name>Comment</name>
<value>{Comment}</value>
</parameter>
</requestParameters>
<responseProperties>
<property>
<key>WID</key>
<extractPath>
//*[local-name()='Give_Feedback_Response']
/*[local-name()='Give_Feedback_Event_Reference']
/*[local-name()='ID'][@*[local-name()='type']='WID']/text()
</extractPath>
</property>
</responseProperties>
</apiRequest>
</apiRequests>
</scenario>
<requestTemplates>
<requestTemplate name="msdyn_HRWorkdayHCMEmployeeGiveFeedback">
<bsvc:Give_Feedback_Request xmlns:bsvc="urn:com.workday/bsvc" bsvc:version="v42.0">
<bsvc:Business_Process_Parameters>
<bsvc:Run_Now>true</bsvc:Run_Now>
<bsvc:Auto_Complete>true</bsvc:Auto_Complete>
</bsvc:Business_Process_Parameters>
<bsvc:Give_Feedback_Data>
<bsvc:From_Worker_Reference>
<bsvc:ID bsvc:type="Employee_ID">{Employee_ID}</bsvc:ID>
</bsvc:From_Worker_Reference>
<bsvc:To_Workers_Reference>
<bsvc:ID bsvc:type="Employee_ID">{Employee_ID_Of_Receiver}</bsvc:ID>
</bsvc:To_Workers_Reference>
<bsvc:Comment>{Comment}</bsvc:Comment>
<bsvc:Show_Name>true</bsvc:Show_Name>
<bsvc:Confidential>false</bsvc:Confidential>
<bsvc:Private>false</bsvc:Private>
</bsvc:Give_Feedback_Data>
</bsvc:Give_Feedback_Request>
</requestTemplate>
</requestTemplates>
</workdayEntityConfigurationTemplate>
Original file line number Diff line number Diff line change
@@ -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: {}