Gerard_Tobin | 2023-07-14 15:18:29 UTC | #1
I am trying to run a query var body = new WfmHistoricalAdherenceQuery(); body.UserIds = ids; body.StartDate= DateTime.Now.AddDays(-7); body.EndDate= DateTime.Now; but I get "message":"The requested management unit was not found" How do I set the management unit and where do I find its value on the Genesys site?
Eos_Rios | 2023-07-14 15:40:05 UTC | #2
ManagementUnitListing list = wfmApi.GetWorkforcemanagementBusinessunitManagementunits(_BU);
foreach (string MU_ID in ManagementUnits.Keys)
{
foreach (DateRange dateRange in dateRanges)
{
WfmHistoricalAdherenceQuery query = new WfmHistoricalAdherenceQuery(dateRange.Begins, dateRange.Ends.Date.AddDays(1), timeZone);
WfmHistoricalAdherenceResponse response = wfmApi.PostWorkforcemanagementManagementunitHistoricaladherencequery(MU_ID, query);
}
}
You can find individual MU's from the Admin interface in the UI /admin/wfm/managementUnits
Click on any MU you have access to and it's ID is in the URL; /admin/wfm/managementUnits/{BUID}/{MUID}
Gerard_Tobin | 2023-07-14 15:45:47 UTC | #3
Can you give me that in c# code?
Eos_Rios | 2023-07-14 15:52:58 UTC | #4
That *is* in C#. :facewithraised_eyebrow:
Gerard_Tobin | 2023-07-14 15:54:12 UTC | #5
Can you show me how to create the wfmApi object and any using statement
Eos_Rios | 2023-07-14 15:59:51 UTC | #6
You may want to read through the SDK documentation -
https://developer.genesys.cloud/devapps/sdk/dotnet
They cover the appropriate using statements at least three times, and Invoking the API
Gerard_Tobin | 2023-07-20 11:03:10 UTC | #7
I have the code running but I am getting the following error message: "Unable to perform the requested action. You must have at least one of the following permissions assigned: [wfm:historicalAdherence:view]" Where in the Genesys portal, do I set this? Does setting this permission affect other tables? How do I rollback if this permission affects other tables? How long does it take for the changes in table permissions to take effect?
tim.smith | 2023-07-20 13:19:39 UTC | #8
You can read about permissions here: https://help.mypurecloud.com/articles/about-people-permissions/
For further discussion about general system setup, like how to manage your permissions, I would recommend posting on the Genesys Cloud Community Forum. This forum is focused on customizations and API usage; the community forum is a lot more active for general configuration questions.
system | 2023-08-20 13:20:28 UTC | #9
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 20988