Get shift trade users vs management unit users

Hello

I'm developing server side API, that should return list of shift Trade candidates for an agent within his Management Unit or even outside of it. I found 2 methods to get management unit users:

WfmUserEntityListing stUsersListing = apiInstance.getWorkforcemanagementManagementunitShifttradesUsers(managementUnitId);

and

WfmUserEntityListing muUsers = apiInstance.getWorkforcemanagementManagementunitUsers(managementUnitId);

The getWorkforcemanagementManagementunitShifttradesUsers works only with agent context token API client, but I want to use getWorkforcemanagementManagementunitUsers instead. Because out API uses clientCredentials token to communicate with Pure Cloud API in behalf of an agent.

The get users for management unit will be followed by:

ShiftTradeListResponse shiftTradeResp = apiInstance.getWorkforcemanagementManagementunitAgentShifttrades(managementUnitId, agentId);

Is there any concern in using of getWorkforcemanagementManagementunitUsers for this case?

Thank you
Best Regards
Robert

Hi Robert.

Unfortunately, this likely isn't going to work the way you want it to. The way that Shift Trading is built is heavily reliant on agents being in the same Management Unit.

You can do what you suggest and get available trades for a user in another management unit, but the endpoint that is calculating which trades are available for that agent is only considering rules and shifts within the same management unit. You also won't be able to apply shift trades between management units through our API.

But to your specific question, there should be no problem with using getWorkforcemanagementManagementunitUsers, except for the fact it will return users may not be able to participate in shift trading (via the Workforce Management > Agent Shift Trade Request > Participate permission).

1 Like

Our shift trading feature in the agent’s UI is fairly sophisticated and we plan on working on a version to be available in our Genesys Tempo mobile application for Android and iOS devices. You are going to find it difficult to reproduce current functionality, even if as a non MU agent you could act on behalf of an agent, and keep up with additional enhancements by attempting to roll your own.

Hi Joe

So this is interesting, The shift trades may not work between different management units and you recommend reather not to do it?

Thanks
Robert

Hi Jay

We are not going to reproduce all Pure cloud functionality. In project I'm working at, we are migrating from engage Genesys WFM to Pure Cloud Genesys WFM. We already gave up at some engage features, because Pure Cloud is not offering them.

The goal is to get most of the Pure Cloud API, to reproduce as much existing functionality as we can.

Based on my experiences, I can't Add, Cancel and Match shift trade without user token client. Is there any concern to use

ApiClient apiClientUser = ApiClient.Builder.standard()
.withAccessToken(request.getUserToken())
.withBasePath(config.getApiHost())
.build();

  WorkforceManagementApi apiInstanceUser = new WorkforceManagementApi(apiClientUser);

?

The request.getUserToken() is current active user token.
I believe this should work fine, at least it work on my tests.

Thanks
Robert

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.