purecloud-platform-client-v2
Version:
A JavaScript library to interface with the PureCloud Platform API
1,413 lines (1,304 loc) • 275 kB
JavaScript
import ApiClient from '../ApiClient.js';
class WorkforceManagementApi {
/**
* WorkforceManagement service.
* @module purecloud-platform-client-v2/api/WorkforceManagementApi
* @version 223.0.0
*/
/**
* Constructs a new WorkforceManagementApi.
* @alias module:purecloud-platform-client-v2/api/WorkforceManagementApi
* @class
* @param {module:purecloud-platform-client-v2/ApiClient} apiClient Optional API client implementation to use,
* default to {@link module:purecloud-platform-client-v2/ApiClient#instance} if unspecified.
*/
constructor(apiClient) {
this.apiClient = apiClient || ApiClient.instance;
}
/**
* Delete business unit
* A business unit cannot be deleted if it contains one or more management units
* @param {String} businessUnitId The ID of the business unit, or 'mine' for the business unit of the logged-in user.
*/
deleteWorkforcemanagementBusinessunit(businessUnitId) {
// verify the required parameter 'businessUnitId' is set
if (businessUnitId === undefined || businessUnitId === null) {
throw 'Missing the required parameter "businessUnitId" when calling deleteWorkforcemanagementBusinessunit';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/businessunits/{businessUnitId}',
'DELETE',
{ 'businessUnitId': businessUnitId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Deletes an activity code
*
* @param {String} businessUnitId The ID of the business unit, or 'mine' for the business unit of the logged-in user.
* @param {String} activityCodeId The ID of the activity code to delete
*/
deleteWorkforcemanagementBusinessunitActivitycode(businessUnitId, activityCodeId) {
// verify the required parameter 'businessUnitId' is set
if (businessUnitId === undefined || businessUnitId === null) {
throw 'Missing the required parameter "businessUnitId" when calling deleteWorkforcemanagementBusinessunitActivitycode';
}
// verify the required parameter 'activityCodeId' is set
if (activityCodeId === undefined || activityCodeId === null) {
throw 'Missing the required parameter "activityCodeId" when calling deleteWorkforcemanagementBusinessunitActivitycode';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/businessunits/{businessUnitId}/activitycodes/{activityCodeId}',
'DELETE',
{ 'businessUnitId': businessUnitId,'activityCodeId': activityCodeId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Deletes the planning group
*
* @param {String} businessUnitId The ID of the business unit.
* @param {String} planningGroupId The ID of a planning group to delete
*/
deleteWorkforcemanagementBusinessunitPlanninggroup(businessUnitId, planningGroupId) {
// verify the required parameter 'businessUnitId' is set
if (businessUnitId === undefined || businessUnitId === null) {
throw 'Missing the required parameter "businessUnitId" when calling deleteWorkforcemanagementBusinessunitPlanninggroup';
}
// verify the required parameter 'planningGroupId' is set
if (planningGroupId === undefined || planningGroupId === null) {
throw 'Missing the required parameter "planningGroupId" when calling deleteWorkforcemanagementBusinessunitPlanninggroup';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/businessunits/{businessUnitId}/planninggroups/{planningGroupId}',
'DELETE',
{ 'businessUnitId': businessUnitId,'planningGroupId': planningGroupId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Cancel a scheduling run
*
* @param {String} businessUnitId The ID of the business unit
* @param {String} runId The ID of the schedule run
*/
deleteWorkforcemanagementBusinessunitSchedulingRun(businessUnitId, runId) {
// verify the required parameter 'businessUnitId' is set
if (businessUnitId === undefined || businessUnitId === null) {
throw 'Missing the required parameter "businessUnitId" when calling deleteWorkforcemanagementBusinessunitSchedulingRun';
}
// verify the required parameter 'runId' is set
if (runId === undefined || runId === null) {
throw 'Missing the required parameter "runId" when calling deleteWorkforcemanagementBusinessunitSchedulingRun';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/businessunits/{businessUnitId}/scheduling/runs/{runId}',
'DELETE',
{ 'businessUnitId': businessUnitId,'runId': runId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Delete a service goal template
*
* @param {String} businessUnitId The ID of the business unit.
* @param {String} serviceGoalTemplateId The ID of the service goal template to delete
*/
deleteWorkforcemanagementBusinessunitServicegoaltemplate(businessUnitId, serviceGoalTemplateId) {
// verify the required parameter 'businessUnitId' is set
if (businessUnitId === undefined || businessUnitId === null) {
throw 'Missing the required parameter "businessUnitId" when calling deleteWorkforcemanagementBusinessunitServicegoaltemplate';
}
// verify the required parameter 'serviceGoalTemplateId' is set
if (serviceGoalTemplateId === undefined || serviceGoalTemplateId === null) {
throw 'Missing the required parameter "serviceGoalTemplateId" when calling deleteWorkforcemanagementBusinessunitServicegoaltemplate';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/businessunits/{businessUnitId}/servicegoaltemplates/{serviceGoalTemplateId}',
'DELETE',
{ 'businessUnitId': businessUnitId,'serviceGoalTemplateId': serviceGoalTemplateId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Deletes a staffing group
*
* @param {String} businessUnitId The ID of the business unit
* @param {String} staffingGroupId The ID of the staffing group to delete
*/
deleteWorkforcemanagementBusinessunitStaffinggroup(businessUnitId, staffingGroupId) {
// verify the required parameter 'businessUnitId' is set
if (businessUnitId === undefined || businessUnitId === null) {
throw 'Missing the required parameter "businessUnitId" when calling deleteWorkforcemanagementBusinessunitStaffinggroup';
}
// verify the required parameter 'staffingGroupId' is set
if (staffingGroupId === undefined || staffingGroupId === null) {
throw 'Missing the required parameter "staffingGroupId" when calling deleteWorkforcemanagementBusinessunitStaffinggroup';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/businessunits/{businessUnitId}/staffinggroups/{staffingGroupId}',
'DELETE',
{ 'businessUnitId': businessUnitId,'staffingGroupId': staffingGroupId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Deletes a time-off limit object
*
* @param {String} businessUnitId The ID of the business unit
* @param {String} timeOffLimitId The ID of the time-off limit object to delete
*/
deleteWorkforcemanagementBusinessunitTimeofflimit(businessUnitId, timeOffLimitId) {
// verify the required parameter 'businessUnitId' is set
if (businessUnitId === undefined || businessUnitId === null) {
throw 'Missing the required parameter "businessUnitId" when calling deleteWorkforcemanagementBusinessunitTimeofflimit';
}
// verify the required parameter 'timeOffLimitId' is set
if (timeOffLimitId === undefined || timeOffLimitId === null) {
throw 'Missing the required parameter "timeOffLimitId" when calling deleteWorkforcemanagementBusinessunitTimeofflimit';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/businessunits/{businessUnitId}/timeofflimits/{timeOffLimitId}',
'DELETE',
{ 'businessUnitId': businessUnitId,'timeOffLimitId': timeOffLimitId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Deletes a time-off plan
*
* @param {String} businessUnitId The ID of the business unit
* @param {String} timeOffPlanId The ID of the time-off plan to delete
*/
deleteWorkforcemanagementBusinessunitTimeoffplan(businessUnitId, timeOffPlanId) {
// verify the required parameter 'businessUnitId' is set
if (businessUnitId === undefined || businessUnitId === null) {
throw 'Missing the required parameter "businessUnitId" when calling deleteWorkforcemanagementBusinessunitTimeoffplan';
}
// verify the required parameter 'timeOffPlanId' is set
if (timeOffPlanId === undefined || timeOffPlanId === null) {
throw 'Missing the required parameter "timeOffPlanId" when calling deleteWorkforcemanagementBusinessunitTimeoffplan';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/businessunits/{businessUnitId}/timeoffplans/{timeOffPlanId}',
'DELETE',
{ 'businessUnitId': businessUnitId,'timeOffPlanId': timeOffPlanId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Delete a schedule
*
* @param {String} businessUnitId The ID of the business unit
* @param {String} weekId First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
* @param {String} scheduleId The ID of the schedule
*/
deleteWorkforcemanagementBusinessunitWeekSchedule(businessUnitId, weekId, scheduleId) {
// verify the required parameter 'businessUnitId' is set
if (businessUnitId === undefined || businessUnitId === null) {
throw 'Missing the required parameter "businessUnitId" when calling deleteWorkforcemanagementBusinessunitWeekSchedule';
}
// verify the required parameter 'weekId' is set
if (weekId === undefined || weekId === null) {
throw 'Missing the required parameter "weekId" when calling deleteWorkforcemanagementBusinessunitWeekSchedule';
}
// verify the required parameter 'scheduleId' is set
if (scheduleId === undefined || scheduleId === null) {
throw 'Missing the required parameter "scheduleId" when calling deleteWorkforcemanagementBusinessunitWeekSchedule';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekId}/schedules/{scheduleId}',
'DELETE',
{ 'businessUnitId': businessUnitId,'weekId': weekId,'scheduleId': scheduleId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Delete a short term forecast
* Must not be tied to any schedules
* @param {String} businessUnitId The ID of the business unit to which the forecast belongs
* @param {String} weekDateId The week start date of the forecast in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
* @param {String} forecastId The ID of the forecast
*/
deleteWorkforcemanagementBusinessunitWeekShorttermforecast(businessUnitId, weekDateId, forecastId) {
// verify the required parameter 'businessUnitId' is set
if (businessUnitId === undefined || businessUnitId === null) {
throw 'Missing the required parameter "businessUnitId" when calling deleteWorkforcemanagementBusinessunitWeekShorttermforecast';
}
// verify the required parameter 'weekDateId' is set
if (weekDateId === undefined || weekDateId === null) {
throw 'Missing the required parameter "weekDateId" when calling deleteWorkforcemanagementBusinessunitWeekShorttermforecast';
}
// verify the required parameter 'forecastId' is set
if (forecastId === undefined || forecastId === null) {
throw 'Missing the required parameter "forecastId" when calling deleteWorkforcemanagementBusinessunitWeekShorttermforecast';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekDateId}/shorttermforecasts/{forecastId}',
'DELETE',
{ 'businessUnitId': businessUnitId,'weekDateId': weekDateId,'forecastId': forecastId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Delete a work plan bid
*
* @param {String} businessUnitId The ID of the business unit
* @param {String} bidId The ID of the work plan bid
*/
deleteWorkforcemanagementBusinessunitWorkplanbid(businessUnitId, bidId) {
// verify the required parameter 'businessUnitId' is set
if (businessUnitId === undefined || businessUnitId === null) {
throw 'Missing the required parameter "businessUnitId" when calling deleteWorkforcemanagementBusinessunitWorkplanbid';
}
// verify the required parameter 'bidId' is set
if (bidId === undefined || bidId === null) {
throw 'Missing the required parameter "bidId" when calling deleteWorkforcemanagementBusinessunitWorkplanbid';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/businessunits/{businessUnitId}/workplanbids/{bidId}',
'DELETE',
{ 'businessUnitId': businessUnitId,'bidId': bidId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Delete a bid group by bid group Id
*
* @param {String} businessUnitId The ID of the business unit
* @param {String} bidId The work plan bid id of the bid groups
* @param {String} bidGroupId Work Plan Bid Group id
*/
deleteWorkforcemanagementBusinessunitWorkplanbidGroup(businessUnitId, bidId, bidGroupId) {
// verify the required parameter 'businessUnitId' is set
if (businessUnitId === undefined || businessUnitId === null) {
throw 'Missing the required parameter "businessUnitId" when calling deleteWorkforcemanagementBusinessunitWorkplanbidGroup';
}
// verify the required parameter 'bidId' is set
if (bidId === undefined || bidId === null) {
throw 'Missing the required parameter "bidId" when calling deleteWorkforcemanagementBusinessunitWorkplanbidGroup';
}
// verify the required parameter 'bidGroupId' is set
if (bidGroupId === undefined || bidGroupId === null) {
throw 'Missing the required parameter "bidGroupId" when calling deleteWorkforcemanagementBusinessunitWorkplanbidGroup';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/businessunits/{businessUnitId}/workplanbids/{bidId}/groups/{bidGroupId}',
'DELETE',
{ 'businessUnitId': businessUnitId,'bidId': bidId,'bidGroupId': bidGroupId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Disable generated calendar link for the current user
*
*/
deleteWorkforcemanagementCalendarUrlIcs() {
return this.apiClient.callApi(
'/api/v2/workforcemanagement/calendar/url/ics',
'DELETE',
{ },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Delete management unit
*
* @param {String} managementUnitId The ID of the management unit, or 'mine' for the management unit of the logged-in user.
*/
deleteWorkforcemanagementManagementunit(managementUnitId) {
// verify the required parameter 'managementUnitId' is set
if (managementUnitId === undefined || managementUnitId === null) {
throw 'Missing the required parameter "managementUnitId" when calling deleteWorkforcemanagementManagementunit';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/managementunits/{managementUnitId}',
'DELETE',
{ 'managementUnitId': managementUnitId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Deletes a time off limit object
*
* @param {String} managementUnitId The ID of the management unit.
* @param {String} timeOffLimitId The ID of the time off limit object to delete
*/
deleteWorkforcemanagementManagementunitTimeofflimit(managementUnitId, timeOffLimitId) {
// verify the required parameter 'managementUnitId' is set
if (managementUnitId === undefined || managementUnitId === null) {
throw 'Missing the required parameter "managementUnitId" when calling deleteWorkforcemanagementManagementunitTimeofflimit';
}
// verify the required parameter 'timeOffLimitId' is set
if (timeOffLimitId === undefined || timeOffLimitId === null) {
throw 'Missing the required parameter "timeOffLimitId" when calling deleteWorkforcemanagementManagementunitTimeofflimit';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/managementunits/{managementUnitId}/timeofflimits/{timeOffLimitId}',
'DELETE',
{ 'managementUnitId': managementUnitId,'timeOffLimitId': timeOffLimitId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Deletes a time off plan
*
* @param {String} managementUnitId The ID of the management unit
* @param {String} timeOffPlanId The ID of the time off plan to delete
*/
deleteWorkforcemanagementManagementunitTimeoffplan(managementUnitId, timeOffPlanId) {
// verify the required parameter 'managementUnitId' is set
if (managementUnitId === undefined || managementUnitId === null) {
throw 'Missing the required parameter "managementUnitId" when calling deleteWorkforcemanagementManagementunitTimeoffplan';
}
// verify the required parameter 'timeOffPlanId' is set
if (timeOffPlanId === undefined || timeOffPlanId === null) {
throw 'Missing the required parameter "timeOffPlanId" when calling deleteWorkforcemanagementManagementunitTimeoffplan';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/managementunits/{managementUnitId}/timeoffplans/{timeOffPlanId}',
'DELETE',
{ 'managementUnitId': managementUnitId,'timeOffPlanId': timeOffPlanId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Delete a work plan
*
* @param {String} managementUnitId The ID of the management unit, or 'mine' for the management unit of the logged-in user.
* @param {String} workPlanId The ID of the work plan to delete
*/
deleteWorkforcemanagementManagementunitWorkplan(managementUnitId, workPlanId) {
// verify the required parameter 'managementUnitId' is set
if (managementUnitId === undefined || managementUnitId === null) {
throw 'Missing the required parameter "managementUnitId" when calling deleteWorkforcemanagementManagementunitWorkplan';
}
// verify the required parameter 'workPlanId' is set
if (workPlanId === undefined || workPlanId === null) {
throw 'Missing the required parameter "workPlanId" when calling deleteWorkforcemanagementManagementunitWorkplan';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/managementunits/{managementUnitId}/workplans/{workPlanId}',
'DELETE',
{ 'managementUnitId': managementUnitId,'workPlanId': workPlanId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Delete a work plan rotation
*
* @param {String} managementUnitId The ID of the management unit, or 'mine' for the management unit of the logged-in user.
* @param {String} workPlanRotationId The ID of the work plan rotation to be deleted
*/
deleteWorkforcemanagementManagementunitWorkplanrotation(managementUnitId, workPlanRotationId) {
// verify the required parameter 'managementUnitId' is set
if (managementUnitId === undefined || managementUnitId === null) {
throw 'Missing the required parameter "managementUnitId" when calling deleteWorkforcemanagementManagementunitWorkplanrotation';
}
// verify the required parameter 'workPlanRotationId' is set
if (workPlanRotationId === undefined || workPlanRotationId === null) {
throw 'Missing the required parameter "workPlanRotationId" when calling deleteWorkforcemanagementManagementunitWorkplanrotation';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/managementunits/{managementUnitId}/workplanrotations/{workPlanRotationId}',
'DELETE',
{ 'managementUnitId': managementUnitId,'workPlanRotationId': workPlanRotationId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get a list of UserScheduleAdherence records for the requested users
*
* @param {Array.<String>} userId User Id(s) for which to fetch current schedule adherence information. Min 1, Max of 100 userIds per request
*/
getWorkforcemanagementAdherence(userId) {
// verify the required parameter 'userId' is set
if (userId === undefined || userId === null) {
throw 'Missing the required parameter "userId" when calling getWorkforcemanagementAdherence';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/adherence',
'GET',
{ },
{ 'userId': this.apiClient.buildCollectionParam(userId, 'multi') },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get an adherence explanation for the current user
*
* @param {String} explanationId The ID of the explanation to update
*/
getWorkforcemanagementAdherenceExplanation(explanationId) {
// verify the required parameter 'explanationId' is set
if (explanationId === undefined || explanationId === null) {
throw 'Missing the required parameter "explanationId" when calling getWorkforcemanagementAdherenceExplanation';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/adherence/explanations/{explanationId}',
'GET',
{ 'explanationId': explanationId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Query the status of an adherence explanation operation. Only the user who started the operation can query the status
* Job details are only retained if the initial request returned a 202 ACCEPTED response
* @param {String} jobId The ID of the job
*/
getWorkforcemanagementAdherenceExplanationsJob(jobId) {
// verify the required parameter 'jobId' is set
if (jobId === undefined || jobId === null) {
throw 'Missing the required parameter "jobId" when calling getWorkforcemanagementAdherenceExplanationsJob';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/adherence/explanations/jobs/{jobId}',
'GET',
{ 'jobId': jobId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Request to fetch the status of the historical adherence bulk job. Only the user who started the operation can query the status
* Job details are only retained if the initial request returned a 202 ACCEPTED response
* @param {String} jobId ID of the job to get
*/
getWorkforcemanagementAdherenceHistoricalBulkJob(jobId) {
// verify the required parameter 'jobId' is set
if (jobId === undefined || jobId === null) {
throw 'Missing the required parameter "jobId" when calling getWorkforcemanagementAdherenceHistoricalBulkJob';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/adherence/historical/bulk/jobs/{jobId}',
'GET',
{ 'jobId': jobId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Query the status of a historical adherence request operation. Only the user who started the operation can query the status
* Job details are only retained if the initial request returned a 202 ACCEPTED response
* @param {String} jobId jobId
*/
getWorkforcemanagementAdherenceHistoricalJob(jobId) {
// verify the required parameter 'jobId' is set
if (jobId === undefined || jobId === null) {
throw 'Missing the required parameter "jobId" when calling getWorkforcemanagementAdherenceHistoricalJob';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/adherence/historical/jobs/{jobId}',
'GET',
{ 'jobId': jobId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get an adherence explanation
*
* @param {String} agentId The ID of the agent to query
* @param {String} explanationId The ID of the explanation to update
*/
getWorkforcemanagementAgentAdherenceExplanation(agentId, explanationId) {
// verify the required parameter 'agentId' is set
if (agentId === undefined || agentId === null) {
throw 'Missing the required parameter "agentId" when calling getWorkforcemanagementAgentAdherenceExplanation';
}
// verify the required parameter 'explanationId' is set
if (explanationId === undefined || explanationId === null) {
throw 'Missing the required parameter "explanationId" when calling getWorkforcemanagementAgentAdherenceExplanation';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/agents/{agentId}/adherence/explanations/{explanationId}',
'GET',
{ 'agentId': agentId,'explanationId': explanationId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get the management unit to which the agent belongs
*
* @param {String} agentId The ID of the agent to look up
*/
getWorkforcemanagementAgentManagementunit(agentId) {
// verify the required parameter 'agentId' is set
if (agentId === undefined || agentId === null) {
throw 'Missing the required parameter "agentId" when calling getWorkforcemanagementAgentManagementunit';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/agents/{agentId}/managementunit',
'GET',
{ 'agentId': agentId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get the management unit to which the currently logged in agent belongs
*
*/
getWorkforcemanagementAgentsMeManagementunit() {
return this.apiClient.callApi(
'/api/v2/workforcemanagement/agents/me/managementunit',
'GET',
{ },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Query the status of an alternative shift offers operation. Only the user who started the operation can query the status
* Job details are only retained if the initial request returned a 202 ACCEPTED response
* @param {String} jobId The ID of the job
*/
getWorkforcemanagementAlternativeshiftsOffersJob(jobId) {
// verify the required parameter 'jobId' is set
if (jobId === undefined || jobId === null) {
throw 'Missing the required parameter "jobId" when calling getWorkforcemanagementAlternativeshiftsOffersJob';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/alternativeshifts/offers/jobs/{jobId}',
'GET',
{ 'jobId': jobId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Query the status of an alternative shift search offers operation. Only the user who started the operation can query the status
* Job details are only retained if the initial request returned a 202 ACCEPTED response
* @param {String} jobId The ID of the job
*/
getWorkforcemanagementAlternativeshiftsOffersSearchJob(jobId) {
// verify the required parameter 'jobId' is set
if (jobId === undefined || jobId === null) {
throw 'Missing the required parameter "jobId" when calling getWorkforcemanagementAlternativeshiftsOffersSearchJob';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/alternativeshifts/offers/search/jobs/{jobId}',
'GET',
{ 'jobId': jobId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get alternative shifts settings from the current logged in agent’s business unit
*
*/
getWorkforcemanagementAlternativeshiftsSettings() {
return this.apiClient.callApi(
'/api/v2/workforcemanagement/alternativeshifts/settings',
'GET',
{ },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get my alternative shift trade by trade ID
*
* @param {String} tradeId The ID of the alternative shift trade
*/
getWorkforcemanagementAlternativeshiftsTrade(tradeId) {
// verify the required parameter 'tradeId' is set
if (tradeId === undefined || tradeId === null) {
throw 'Missing the required parameter "tradeId" when calling getWorkforcemanagementAlternativeshiftsTrade';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/alternativeshifts/trades/{tradeId}',
'GET',
{ 'tradeId': tradeId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get a list of my alternative shifts trades
*
* @param {Object} opts Optional parameters
* @param {Boolean} opts.forceAsync Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes
*/
getWorkforcemanagementAlternativeshiftsTrades(opts) {
opts = opts || {};
return this.apiClient.callApi(
'/api/v2/workforcemanagement/alternativeshifts/trades',
'GET',
{ },
{ 'forceAsync': opts['forceAsync'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Query the status of an alternative shift trades operation. Only the user who started the operation can query the status
* Job details are only retained if the initial request returned a 202 ACCEPTED response
* @param {String} jobId The ID of the job
*/
getWorkforcemanagementAlternativeshiftsTradesJob(jobId) {
// verify the required parameter 'jobId' is set
if (jobId === undefined || jobId === null) {
throw 'Missing the required parameter "jobId" when calling getWorkforcemanagementAlternativeshiftsTradesJob';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/alternativeshifts/trades/jobs/{jobId}',
'GET',
{ 'jobId': jobId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Query the status of an alternative shift trade state operation. Only the user who started the operation can query the status
* Job details are only retained if the initial request returned a 202 ACCEPTED response
* @param {String} jobId The ID of the job
*/
getWorkforcemanagementAlternativeshiftsTradesStateJob(jobId) {
// verify the required parameter 'jobId' is set
if (jobId === undefined || jobId === null) {
throw 'Missing the required parameter "jobId" when calling getWorkforcemanagementAlternativeshiftsTradesStateJob';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/alternativeshifts/trades/state/jobs/{jobId}',
'GET',
{ 'jobId': jobId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get business unit
* Expanding "settings" will retrieve all settings. All other expands will retrieve only the requested settings field(s).
* @param {String} businessUnitId The ID of the business unit, or 'mine' for the business unit of the logged-in user.
* @param {Object} opts Optional parameters
* @param {Array.<String>} opts.expand Include to access additional data on the business unit
*/
getWorkforcemanagementBusinessunit(businessUnitId, opts) {
opts = opts || {};
// verify the required parameter 'businessUnitId' is set
if (businessUnitId === undefined || businessUnitId === null) {
throw 'Missing the required parameter "businessUnitId" when calling getWorkforcemanagementBusinessunit';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/businessunits/{businessUnitId}',
'GET',
{ 'businessUnitId': businessUnitId },
{ 'expand': this.apiClient.buildCollectionParam(opts['expand'], 'multi') },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get an activity code
*
* @param {String} businessUnitId The ID of the business unit, or 'mine' for the business unit of the logged-in user.
* @param {String} activityCodeId The ID of the activity code to fetch
*/
getWorkforcemanagementBusinessunitActivitycode(businessUnitId, activityCodeId) {
// verify the required parameter 'businessUnitId' is set
if (businessUnitId === undefined || businessUnitId === null) {
throw 'Missing the required parameter "businessUnitId" when calling getWorkforcemanagementBusinessunitActivitycode';
}
// verify the required parameter 'activityCodeId' is set
if (activityCodeId === undefined || activityCodeId === null) {
throw 'Missing the required parameter "activityCodeId" when calling getWorkforcemanagementBusinessunitActivitycode';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/businessunits/{businessUnitId}/activitycodes/{activityCodeId}',
'GET',
{ 'businessUnitId': businessUnitId,'activityCodeId': activityCodeId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get activity codes
*
* @param {String} businessUnitId The ID of the business unit, or 'mine' for the business unit of the logged-in user.
* @param {Object} opts Optional parameters
* @param {Boolean} opts.forceDownloadService Force the result of this operation to be sent via download service. For testing/app development purposes
*/
getWorkforcemanagementBusinessunitActivitycodes(businessUnitId, opts) {
opts = opts || {};
// verify the required parameter 'businessUnitId' is set
if (businessUnitId === undefined || businessUnitId === null) {
throw 'Missing the required parameter "businessUnitId" when calling getWorkforcemanagementBusinessunitActivitycodes';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/businessunits/{businessUnitId}/activitycodes',
'GET',
{ 'businessUnitId': businessUnitId },
{ 'forceDownloadService': opts['forceDownloadService'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get an activity plan
*
* @param {String} businessUnitId The ID of the business unit
* @param {String} activityPlanId The ID of the activity plan to fetch
*/
getWorkforcemanagementBusinessunitActivityplan(businessUnitId, activityPlanId) {
// verify the required parameter 'businessUnitId' is set
if (businessUnitId === undefined || businessUnitId === null) {
throw 'Missing the required parameter "businessUnitId" when calling getWorkforcemanagementBusinessunitActivityplan';
}
// verify the required parameter 'activityPlanId' is set
if (activityPlanId === undefined || activityPlanId === null) {
throw 'Missing the required parameter "activityPlanId" when calling getWorkforcemanagementBusinessunitActivityplan';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/businessunits/{businessUnitId}/activityplans/{activityPlanId}',
'GET',
{ 'businessUnitId': businessUnitId,'activityPlanId': activityPlanId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Gets an activity plan run job
*
* @param {String} businessUnitId The ID of the business unit
* @param {String} activityPlanId The ID of the activity plan associated with the run job
* @param {String} jobId The ID of the activity plan run job
*/
getWorkforcemanagementBusinessunitActivityplanRunsJob(businessUnitId, activityPlanId, jobId) {
// verify the required parameter 'businessUnitId' is set
if (businessUnitId === undefined || businessUnitId === null) {
throw 'Missing the required parameter "businessUnitId" when calling getWorkforcemanagementBusinessunitActivityplanRunsJob';
}
// verify the required parameter 'activityPlanId' is set
if (activityPlanId === undefined || activityPlanId === null) {
throw 'Missing the required parameter "activityPlanId" when calling getWorkforcemanagementBusinessunitActivityplanRunsJob';
}
// verify the required parameter 'jobId' is set
if (jobId === undefined || jobId === null) {
throw 'Missing the required parameter "jobId" when calling getWorkforcemanagementBusinessunitActivityplanRunsJob';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/businessunits/{businessUnitId}/activityplans/{activityPlanId}/runs/jobs/{jobId}',
'GET',
{ 'businessUnitId': businessUnitId,'activityPlanId': activityPlanId,'jobId': jobId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get activity plans
*
* @param {String} businessUnitId The ID of the business unit
* @param {Object} opts Optional parameters
* @param {Object} opts.state Optionally filter by activity plan state
*/
getWorkforcemanagementBusinessunitActivityplans(businessUnitId, opts) {
opts = opts || {};
// verify the required parameter 'businessUnitId' is set
if (businessUnitId === undefined || businessUnitId === null) {
throw 'Missing the required parameter "businessUnitId" when calling getWorkforcemanagementBusinessunitActivityplans';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/businessunits/{businessUnitId}/activityplans',
'GET',
{ 'businessUnitId': businessUnitId },
{ 'state': opts['state'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Gets the latest job for all activity plans in the business unit
*
* @param {String} businessUnitId The ID of the business unit
*/
getWorkforcemanagementBusinessunitActivityplansJobs(businessUnitId) {
// verify the required parameter 'businessUnitId' is set
if (businessUnitId === undefined || businessUnitId === null) {
throw 'Missing the required parameter "businessUnitId" when calling getWorkforcemanagementBusinessunitActivityplansJobs';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/businessunits/{businessUnitId}/activityplans/jobs',
'GET',
{ 'businessUnitId': businessUnitId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get alternative shifts settings for a business unit
*
* @param {String} businessUnitId The ID of the business unit
*/
getWorkforcemanagementBusinessunitAlternativeshiftsSettings(businessUnitId) {
// verify the required parameter 'businessUnitId' is set
if (businessUnitId === undefined || businessUnitId === null) {
throw 'Missing the required parameter "businessUnitId" when calling getWorkforcemanagementBusinessunitAlternativeshiftsSettings';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/businessunits/{businessUnitId}/alternativeshifts/settings',
'GET',
{ 'businessUnitId': businessUnitId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get an alternative shifts trade in a business unit for a given trade ID
*
* @param {String} businessUnitId The ID of the business unit
* @param {String} tradeId The ID of the alternative shift trade
*/
getWorkforcemanagementBusinessunitAlternativeshiftsTrade(businessUnitId, tradeId) {
// verify the required parameter 'businessUnitId' is set
if (businessUnitId === undefined || businessUnitId === null) {
throw 'Missing the required parameter "businessUnitId" when calling getWorkforcemanagementBusinessunitAlternativeshiftsTrade';
}
// verify the required parameter 'tradeId' is set
if (tradeId === undefined || tradeId === null) {
throw 'Missing the required parameter "tradeId" when calling getWorkforcemanagementBusinessunitAlternativeshiftsTrade';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/businessunits/{businessUnitId}/alternativeshifts/trades/{tradeId}',
'GET',
{ 'businessUnitId': businessUnitId,'tradeId': tradeId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Query the status of an alternative shift search trade operation. Only the user who started the operation can query the status
* Job details are only retained if the initial request returned a 202 ACCEPTED response
* @param {String} businessUnitId The ID of the business unit
* @param {String} jobId The ID of the job
*/
getWorkforcemanagementBusinessunitAlternativeshiftsTradesSearchJob(businessUnitId, jobId) {
// verify the required parameter 'businessUnitId' is set
if (businessUnitId === undefined || businessUnitId === null) {
throw 'Missing the required parameter "businessUnitId" when calling getWorkforcemanagementBusinessunitAlternativeshiftsTradesSearchJob';
}
// verify the required parameter 'jobId' is set
if (jobId === undefined || jobId === null) {
throw 'Missing the required parameter "jobId" when calling getWorkforcemanagementBusinessunitAlternativeshiftsTradesSearchJob';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/businessunits/{businessUnitId}/alternativeshifts/trades/search/jobs/{jobId}',
'GET',
{ 'businessUnitId': businessUnitId,'jobId': jobId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get intraday planning groups for the given date
*
* @param {String} businessUnitId The ID of the business unit
* @param {String} _date yyyy-MM-dd date string interpreted in the configured business unit time zone. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
*/
getWorkforcemanagementBusinessunitIntradayPlanninggroups(businessUnitId, _date) {
// verify the required parameter 'businessUnitId' is set
if (businessUnitId === undefined || businessUnitId === null) {
throw 'Missing the required parameter "businessUnitId" when calling getWorkforcemanagementBusinessunitIntradayPlanninggroups';
}
// verify the required parameter '_date' is set
if (_date === undefined || _date === null) {
throw 'Missing the required parameter "_date" when calling getWorkforcemanagementBusinessunitIntradayPlanninggroups';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/businessunits/{businessUnitId}/intraday/planninggroups',
'GET',
{ 'businessUnitId': businessUnitId },
{ 'date': _date },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get the latest session for the business unit ID
*
* @param {String} businessUnitId
* getWorkforcemanagementBusinessunitMainforecastContinuousforecastSession is a preview method and is subject to both breaking and non-breaking changes at any time without notice
*/
getWorkforcemanagementBusinessunitMainforecastContinuousforecastSession(businessUnitId) {
// verify the required parameter 'businessUnitId' is set
if (businessUnitId === undefined || businessUnitId === null) {
throw 'Missing the required parameter "businessUnitId" when calling getWorkforcemanagementBusinessunitMainforecastContinuousforecastSession';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/businessunits/{businessUnitId}/mainforecast/continuousforecast/session',
'GET',
{ 'businessUnitId': businessUnitId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get the session details for the session ID
*
* @param {String} businessUnitId
* @param {String} sessionId
* getWorkforcemanagementBusinessunitMainforecastContinuousforecastSessionSessionId is a preview method and is subject to both breaking and non-breaking changes at any time without notice
*/
getWorkforcemanagementBusinessunitMainforecastContinuousforecastSessionSessionId(businessUnitId, sessionId) {
// verify the required parameter 'businessUnitId' is set
if (businessUnitId === undefined || businessUnitId === null) {
throw 'Missing the required parameter "businessUnitId" when calling getWorkforcemanagementBusinessunitMainforecastContinuousforecastSessionSessionId';
}
// verify the required parameter 'sessionId' is set
if (sessionId === undefined || sessionId === null) {
throw 'Missing the required parameter "sessionId" when calling getWorkforcemanagementBusinessunitMainforecastContinuousforecastSessionSessionId';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/businessunits/{businessUnitId}/mainforecast/continuousforecast/session/{sessionId}',
'GET',
{ 'businessUnitId': businessUnitId,'sessionId': sessionId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get the snapshot details for the snapshot ID
*
* @param {String} businessUnitId
* @param {String} sessionId
* @param {String} snapshotId
* getWorkforcemanagementBusinessunitMainforecastContinuousforecastSessionSessionIdSnapshotSnapshotId is a preview method and is subject to both breaking and non-breaking changes at any time without notice
*/
getWorkforcemanagementBusinessunitMainforecastContinuousforecastSessionSessionIdSnapshotSnapshotId(businessUnitId, sessionId, snapshotId) {
// verify the required parameter 'businessUnitId' is set
if (businessUnitId === undefined || businessUnitId === null) {
throw 'Missing the required parameter "businessUnitId" when calling getWorkforcemanagementBusinessunitMainforecastContinuousforecastSessionSessionIdSnapshotSnapshotId';
}
// verify the required parameter 'sessionId' is set
if (sessionId === undefined || sessionId === null) {
throw 'Missing the required parameter "sessionId" when calling getWorkforcemanagementBusinessunitMainforecastContinuousforecastSessionSessionIdSnapshotSnapshotId';
}
// verify the required parameter 'snapshotId' is set
if (snapshotId === undefined || snapshotId === null) {
throw 'Missing the required parameter "snapshotId" when calling getWorkforcemanagementBusinessunitMainforecastContinuousforecastSessionSessionIdSnapshotSnapshotId';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/businessunits/{businessUnitId}/mainforecast/continuousforecast/session/{sessionId}/snapshot/{snapshotId}',
'GET',
{ 'businessUnitId': businessUnitId,'sessionId': sessionId,'snapshotId': snapshotId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get all authorized management units in the business unit
*
* @param {String} businessUnitId The ID of the business unit, or 'mine' for the business unit of the logged-in user.
* @param {Object} opts Optional parameters
* @param {Object} opts.feature If specified, the list of management units for which the user is authorized to use the requested feature will be returned
* @param {String} opts.divisionId If specified, the list of management units belonging to the specified division will be returned
*/
getWorkforcemanagementBusinessunitManagementunits(businessUnitId, opts) {
opts = opts || {};
// verify the required parameter 'businessUnitId' is set
if (businessUnitId === undefined || businessUnitId === null) {
throw 'Missing the required parameter "businessUnitId" when calling getWorkforcemanagementBusinessunitManagementunits';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/businessunits/{businessUnitId}/managementunits',
'GET',
{ 'businessUnitId': businessUnitId },
{ 'feature': opts['feature'],'divisionId': opts['divisionId'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get a planning group
*
* @param {String} businessUnitId The ID of the business unit.
* @param {String} planningGroupId The ID of a planning group to fetch
*/
getWorkforcemanagementBusinessunitPlanninggroup(businessUnitId, planningGroupId) {
// verify the required parameter 'businessUnitId' is set
if (businessUnitId === undefined || businessUnitId === null) {
throw 'Missing the required parameter "businessUnitId" when calling getWorkforcemanagementBusinessunitPlanninggroup';
}
// verify the required parameter 'planningGroupId' is set
if (planningGroupId === undefined || planningGroupId === null) {
throw 'Missing the required parameter "planningGroupId" when calling getWorkforcemanagementBusinessunitPlanninggroup';
}
return this.apiClient.callApi(
'/api/v2/workforcemanagement/businessunits/{businessUnitId}/planninggroups/{planningGroupId}',
'GET',
{ 'businessUnitId': businessUnitId,'planningGroupId': planningGroupId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Gets list of planning groups
*
* @param {String} businessUnitId The ID of the business unit.
*/
getWorkforcemanagementBusinessunitPlanninggroups(businessUnitId) {
// verify the required parameter 'businessUnitId' is set
if (businessUnitId === undefined || businessUnitId === null) {
throw 'Missing the required parameter "businessUnitId" when calling getWorkforcemanagementBusinessunitPlanninggroups';
}
return this.apiCli