WFM - Activity Codes

Hello Team,

We are using this API /api/v2/workforcemanagement/businessunits/{businessUnitId}/activitycodes/{activityCodeId} to get the activtyCodes. We found for the default activityCodes like Break, Unavailable etc., we can see the name displayed in the Genesys UI where as we don't have the name value in the API results. Please find the example below,

image

Developer tools results:
{
"id": "7",
"name": "",
"active": true,
"defaultCode": true,
"category": "Unavailable",
"lengthInMinutes": 60,
"countsAsPaidTime": false,
"countsAsWorkTime": false,
"countsTowardShrinkage": true,
"plannedShrinkage": true,
"interruptible": false,
"secondaryPresences": [],
"metadata": {
"version": 2,
"modifiedBy": {
"id": "00000",
"selfUri": "/api/v2/users/000"
},
"dateModified": "2022-06-07T09:28:01.981Z"
},
"selfUri": "/api/v2/workforcemanagement/businessunits/000/activitycodes/7"
}

Is the API we use to get the activtyCodes is correct? If Yes, why in the API we are unable to get the activity Name? Could you please help us to get the right activityCode name for the default ones? We are facing this only for the default activityCodes.

Regards,
Punitha

The following applies only to the default activity codes:
For the default activity codes we intentionally do not pass the "name" field back so as to allow our UI (and customers) to differentiate between a customer provided activity code name and the default. This is important because if not overridden by the customer, we localize the activity code to the customer's preferred language in our UI automatically, whereas if the customer overrides the name on a default code, we display it directly without attempting localization.

Another note: activity codes should primarily be loaded by the list route API /api/v2/workforcemanagement/businessunits/{businessUnitId}/activitycodes (without specifying the activity code ID) and cached by the client with some reasonable timeout (60m or even a day is usually fine). The use case for loading the codes individually is limited as all information about the activity codes is returned on the list route.

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