Hello all. I'm using the WFM api to pull short term forecasts. Part of what I'm trying to do is call an api to also get the name of the planning group in that forecast but I'm running into some issues that I don't understand at this point.
I call GetWorkforcemanagementBusinessunitWeekShorttermforecastData() to get the forecast data for the business unit and use that result when calling GetWorkforcemanagementBusinessunitPlanninggroup() to get the planning group information. But when I call that API I get the following exception
Error calling GetWorkforcemanagementBusinessunitPlanninggroup: {"message":"Entity not found: name = PlanningGroup, id = ","code":"wfm.entity.not.found","status":404,"messageParams":{"uniqueErrorKey":"wfm.entityNotFound.planningGroup","subErrorKey":"PlanningGroup","property":"PlanningGroup","id":""},"contextId":"d73560ef-6f7e-48b0-92d7-877d53ea8db0","details":[],"errors":[]}
When I look in the debugger the planning group id is in the response from GetWorkforcemanagementBusinessunitWeekShorttermforecastData() so I'm not understanding why this is occurring. A snip from my code.
BuForecastResultResponse forecastResultResponse = WfmapiInstance.GetWorkforcemanagementBusinessunitWeekShorttermforecastData(WFMresult.Entities[iBuIndex].Id, weekDateId, sForeCastId, iWeekIndex, forceDownloadService);
for (int iPgIndex = 0; iPgIndex < forecastResultResponse.Result.PlanningGroups.Count; iPgIndex++)
{
PlanningGroup resultPg = WfmapiInstance.GetWorkforcemanagementBusinessunitPlanninggroup(WFMresult.Entities[iBuIndex].Id, forecastResultResponse.Result.PlanningGroups[iPgIndex].PlanningGroupId);
keyValuePairsPg.Add(forecastResultResponse.Result.PlanningGroups[iPgIndex].PlanningGroupId, resultPg.Name);
}
Thanks in advance