Thanks, I recommend updating the API documentation to prevent people thinking it is optional when it is not.
Original Message:
Sent: 05-14-2025 12:34
From: Brian Trezise
Subject: Validate WFM workplan using the SDK/APIs
Unfortunately we do not have another way to do this via the SDK. I'm not sure why it's showing the body of the route you referenced as being optional, because as far as I'm aware there are no cases in the workforce management APIs where the entire request body is optional. We will look into that.
I already modified my code and the validation works but it is painful that i need to create a new object and copy over a 10+ properties one by one. For example, the object i have is "WorkPlan" but the object type needed for validation body is "WorkPlanValidationRequest" so i end up copying over attributes one by one, this is painful and it will also break if new attributes are added in the future.
This should be something you can write a single time and then loop as many times as needed. You can set up a method in your script that takes whatever parameters are needed and pass them in. Hope that helps.
------------------------------
Brian Trezise
Genesys - Employees - Lead Software Engineer
Original Message:
Sent: 05-14-2025 09:35
From: Zsolt Belicza
Subject: Validate WFM workplan using the SDK/APIs
hi Jay, thanks for the reply. I also raised a Genesys case after this post for this and I got confirmation that the documentation is incorrect, the body must be set when doing a verification.
I already modified my code and the validation works but it is painful that i need to create a new object and copy over a 10+ properties one by one. For example, the object i have is "WorkPlan" but the object type needed for validation body is "WorkPlanValidationRequest" so i end up copying over attributes one by one, this is painful and it will also break if new attributes are added in the future.
the answer your other questions, we are doing a mass deployment and we need to perform a lot of workplan addition so developing this script will save time.
Zsolt
------------------------------
Zsolt Belicza
Uc, Cc Architect
Original Message:
Sent: 05-14-2025 09:18
From: Jay Langsford
Subject: Validate WFM workplan using the SDK/APIs
The only option to validate a work plan is to pass in the information about the work plan. If you are creating or otherwise have the work plan 'in hand', you already know the values to fill in for a validate step. On the API side the create, get, and validate method for work plans all have essentially the same set of fields.
May I ask why you need to create work plans via the SDK? That seems like such a low value high effort task (unless it is to support some large migration of an org).
------------------------------
Jay Langsford
VP, R&D
Original Message:
Sent: 05-11-2025 13:58
From: Zsolt Belicza
Subject: Validate WFM workplan using the SDK/APIs
hi all,
I have to create WFM workplans using the SDK and it works well. After creation i have to validate the workplan if there are errors in it. This where where i got stuck when using the Java workforce management postWorkforcemanagementManagementunitWorkplanValidate method.
it looks like this endpoint supports validating workplans which are not yet saved, in this case you have to specify a complex body with type WorkPlanValidationRequest (this has dozens of input to specify as workplans are complex). Now this is fine, the request workplanId has to be set to "new" in this case because the workplan doesnt exist and the body is required. However, i want to use it to validate an existing workplan with specific workplan ID. according to the documentation in this case i have to specific MU and workplan ID and the body can be left empty. However, the API returns HTTP 400 with [Request body must not be null]. Has anyone validated existing workplans where we should only specify the existing ID? i dont want to add a lot of of extra code to create a WorkPlanValidationRequest object when it is already in Genesys cloud.
Genesys Cloud Developer Center
| Genesys | remove preview |
| | Genesys Cloud Developer Center | | Developer-focused guides, tutorials, API Documentation, videos, and more for Genesys Cloud | | View this on Genesys > |
|
|
#PlatformSDK
------------------------------
Zsolt Belicza
Uc, Cc Architect
------------------------------