--- title: WorkforceManagementApi --- ## PureCloud::WorkforceManagementApi All URIs are relative to *https://api.mypurecloud.com* Method | Description ------------- | ------------- | ------------- [**delete_workforcemanagement_managementunit**](WorkforceManagementApi.html#delete_workforcemanagement_managementunit) | Delete management unit [**delete_workforcemanagement_managementunit_activitycode**](WorkforceManagementApi.html#delete_workforcemanagement_managementunit_activitycode) | Deletes an activity code [**delete_workforcemanagement_managementunit_scheduling_run**](WorkforceManagementApi.html#delete_workforcemanagement_managementunit_scheduling_run) | Cancel a schedule run [**delete_workforcemanagement_managementunit_servicegoalgroup**](WorkforceManagementApi.html#delete_workforcemanagement_managementunit_servicegoalgroup) | Delete a service goal group [**delete_workforcemanagement_managementunit_week_schedule**](WorkforceManagementApi.html#delete_workforcemanagement_managementunit_week_schedule) | Delete a schedule [**delete_workforcemanagement_managementunit_week_shorttermforecast**](WorkforceManagementApi.html#delete_workforcemanagement_managementunit_week_shorttermforecast) | Delete a short term forecast [**delete_workforcemanagement_managementunit_workplan**](WorkforceManagementApi.html#delete_workforcemanagement_managementunit_workplan) | Delete a work plan [**get_workforcemanagement_adherence**](WorkforceManagementApi.html#get_workforcemanagement_adherence) | Get a list of UserScheduleAdherence records for the requested users [**get_workforcemanagement_adhocmodelingjob**](WorkforceManagementApi.html#get_workforcemanagement_adhocmodelingjob) | Get status of the modeling job [**get_workforcemanagement_managementunit**](WorkforceManagementApi.html#get_workforcemanagement_managementunit) | Get management unit [**get_workforcemanagement_managementunit_activitycode**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_activitycode) | Get an activity code [**get_workforcemanagement_managementunit_activitycodes**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_activitycodes) | Get activity codes [**get_workforcemanagement_managementunit_agent**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_agent) | Get data for agent in the management unit [**get_workforcemanagement_managementunit_intraday_queues**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_intraday_queues) | Get intraday queues for the given date [**get_workforcemanagement_managementunit_scheduling_run**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_scheduling_run) | Gets the status for a specific scheduling run [**get_workforcemanagement_managementunit_scheduling_run_result**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_scheduling_run_result) | Gets the result of a specific scheduling run [**get_workforcemanagement_managementunit_scheduling_runs**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_scheduling_runs) | Get the status of all the ongoing schedule runs [**get_workforcemanagement_managementunit_servicegoalgroup**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_servicegoalgroup) | Get a service goal group [**get_workforcemanagement_managementunit_servicegoalgroups**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_servicegoalgroups) | Get service goal groups [**get_workforcemanagement_managementunit_settings**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_settings) | Get the settings for the requested management unit. Deprecated, use the GET management unit route instead [**get_workforcemanagement_managementunit_shifttrades_matched**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_shifttrades_matched) | Gets a summary of all shift trades in the matched state [**get_workforcemanagement_managementunit_shifttrades_users**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_shifttrades_users) | Gets list of users available for whom you can send direct shift trade requests [**get_workforcemanagement_managementunit_user_timeoffrequest**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_user_timeoffrequest) | Get a time off request [**get_workforcemanagement_managementunit_user_timeoffrequests**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_user_timeoffrequests) | Get a list of time off requests for a given user [**get_workforcemanagement_managementunit_users**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_users) | Get users in the management unit [**get_workforcemanagement_managementunit_week_schedule**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_week_schedule) | Get a week schedule [**get_workforcemanagement_managementunit_week_schedule_generationresults**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_week_schedule_generationresults) | Get week schedule generation results [**get_workforcemanagement_managementunit_week_schedules**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_week_schedules) | Get the list of schedules in a week in management unit [**get_workforcemanagement_managementunit_week_shorttermforecast_final**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_week_shorttermforecast_final) | Get the final result of a short term forecast calculation with modifications applied [**get_workforcemanagement_managementunit_week_shorttermforecasts**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_week_shorttermforecasts) | Get short term forecasts [**get_workforcemanagement_managementunit_workplan**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_workplan) | Get a work plan [**get_workforcemanagement_managementunit_workplans**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_workplans) | Get work plans [**get_workforcemanagement_managementunits**](WorkforceManagementApi.html#get_workforcemanagement_managementunits) | Get management units [**get_workforcemanagement_managementunits_divisionviews**](WorkforceManagementApi.html#get_workforcemanagement_managementunits_divisionviews) | Get management units across divisions [**get_workforcemanagement_notifications**](WorkforceManagementApi.html#get_workforcemanagement_notifications) | Get a list of notifications for the current user [**get_workforcemanagement_schedulingjob**](WorkforceManagementApi.html#get_workforcemanagement_schedulingjob) | Get status of the scheduling job [**get_workforcemanagement_shifttrades**](WorkforceManagementApi.html#get_workforcemanagement_shifttrades) | Gets all of my shift trades [**get_workforcemanagement_timeoffrequest**](WorkforceManagementApi.html#get_workforcemanagement_timeoffrequest) | Get a time off request for the current user [**get_workforcemanagement_timeoffrequests**](WorkforceManagementApi.html#get_workforcemanagement_timeoffrequests) | Get a list of time off requests for the current user [**patch_workforcemanagement_managementunit**](WorkforceManagementApi.html#patch_workforcemanagement_managementunit) | Update the requested management unit [**patch_workforcemanagement_managementunit_activitycode**](WorkforceManagementApi.html#patch_workforcemanagement_managementunit_activitycode) | Update an activity code [**patch_workforcemanagement_managementunit_scheduling_run**](WorkforceManagementApi.html#patch_workforcemanagement_managementunit_scheduling_run) | Marks a specific scheduling run as applied, allowing a new rescheduling run to be started [**patch_workforcemanagement_managementunit_servicegoalgroup**](WorkforceManagementApi.html#patch_workforcemanagement_managementunit_servicegoalgroup) | Update a service goal group [**patch_workforcemanagement_managementunit_settings**](WorkforceManagementApi.html#patch_workforcemanagement_managementunit_settings) | Update the settings for the requested management unit [**patch_workforcemanagement_managementunit_user_timeoffrequest**](WorkforceManagementApi.html#patch_workforcemanagement_managementunit_user_timeoffrequest) | Update a time off request [**patch_workforcemanagement_managementunit_week_schedule**](WorkforceManagementApi.html#patch_workforcemanagement_managementunit_week_schedule) | Update a week schedule [**patch_workforcemanagement_managementunit_workplan**](WorkforceManagementApi.html#patch_workforcemanagement_managementunit_workplan) | Update a work plan [**patch_workforcemanagement_timeoffrequest**](WorkforceManagementApi.html#patch_workforcemanagement_timeoffrequest) | Update a time off request for the current user [**post_workforcemanagement_adherence_historical**](WorkforceManagementApi.html#post_workforcemanagement_adherence_historical) | Request a historical adherence report for users across management units [**post_workforcemanagement_managementunit_activitycodes**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_activitycodes) | Create a new activity code [**post_workforcemanagement_managementunit_historicaladherencequery**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_historicaladherencequery) | Request a historical adherence report [**post_workforcemanagement_managementunit_intraday**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_intraday) | Get intraday data for the given date for the requested queueIds [**post_workforcemanagement_managementunit_move**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_move) | Move the requested management unit to a new business unit [**post_workforcemanagement_managementunit_schedules_search**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_schedules_search) | Query published schedules for given given time range for set of users [**post_workforcemanagement_managementunit_servicegoalgroups**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_servicegoalgroups) | Create a new service goal group [**post_workforcemanagement_managementunit_timeoffrequests**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_timeoffrequests) | Create a new time off request [**post_workforcemanagement_managementunit_timeoffrequests_fetchdetails**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_timeoffrequests_fetchdetails) | Gets a list of time off requests from lookup ids [**post_workforcemanagement_managementunit_timeoffrequests_query**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_timeoffrequests_query) | Gets the lookup ids to fetch the specified set of requests [**post_workforcemanagement_managementunit_week_schedule_copy**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_week_schedule_copy) | Copy a week schedule [**post_workforcemanagement_managementunit_week_schedule_reschedule**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_week_schedule_reschedule) | Start a scheduling run to compute the reschedule. When the scheduling run finishes, a client can get the reschedule changes and then the client can apply them to the schedule, save the schedule, and mark the scheduling run as applied [**post_workforcemanagement_managementunit_week_schedules**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_week_schedules) | Add a schedule for a week in management unit using imported data. Use partial uploads of user schedules if activity count in schedule is greater than 17500 [**post_workforcemanagement_managementunit_week_schedules_generate**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_week_schedules_generate) | Generate a week schedule [**post_workforcemanagement_managementunit_week_schedules_partialupload**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_week_schedules_partialupload) | Partial upload of user schedules where activity count is greater than 17500 [**post_workforcemanagement_managementunit_week_shorttermforecast_copy**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_week_shorttermforecast_copy) | Copy a short term forecast [**post_workforcemanagement_managementunit_week_shorttermforecasts**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_week_shorttermforecasts) | Import a short term forecast [**post_workforcemanagement_managementunit_week_shorttermforecasts_generate**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_week_shorttermforecasts_generate) | Generate a short term forecast [**post_workforcemanagement_managementunit_week_shorttermforecasts_partialupload**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_week_shorttermforecasts_partialupload) | Import a short term forecast [**post_workforcemanagement_managementunit_workplan_copy**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_workplan_copy) | Create a copy of work plan [**post_workforcemanagement_managementunit_workplans**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_workplans) | Create a new work plan [**post_workforcemanagement_managementunits**](WorkforceManagementApi.html#post_workforcemanagement_managementunits) | Add a management unit [**post_workforcemanagement_notifications_update**](WorkforceManagementApi.html#post_workforcemanagement_notifications_update) | Mark a list of notifications as read or unread [**post_workforcemanagement_schedules**](WorkforceManagementApi.html#post_workforcemanagement_schedules) | Get published schedule for the current user [**post_workforcemanagement_timeoffrequests**](WorkforceManagementApi.html#post_workforcemanagement_timeoffrequests) | Create a time off request for the current user {: class="table table-striped"} ## delete_workforcemanagement_managementunit(mu_id) Delete management unit Wraps DELETE /api/v2/workforcemanagement/managementunits/{muId} Requires ANY permissions: * wfm:managementUnit:delete ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new mu_id = "mu_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. begin #Delete management unit api_instance.delete_workforcemanagement_managementunit(mu_id) rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->delete_workforcemanagement_managementunit: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **mu_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## delete_workforcemanagement_managementunit_activitycode(mu_id, ac_id) Deletes an activity code Wraps DELETE /api/v2/workforcemanagement/managementunits/{muId}/activitycodes/{acId} Requires ANY permissions: * wfm:activityCode:delete ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new mu_id = "mu_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. ac_id = "ac_id_example" # String | The ID of the activity code to delete begin #Deletes an activity code api_instance.delete_workforcemanagement_managementunit_activitycode(mu_id, ac_id) rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->delete_workforcemanagement_managementunit_activitycode: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **mu_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **ac_id** | **String**| The ID of the activity code to delete | | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## delete_workforcemanagement_managementunit_scheduling_run(management_unit_id, run_id) Cancel a schedule run Wraps DELETE /api/v2/workforcemanagement/managementunits/{managementUnitId}/scheduling/runs/{runId} Requires ANY permissions: * wfm:schedule:generate ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The ID of the management unit. run_id = "run_id_example" # String | The ID of the schedule run begin #Cancel a schedule run api_instance.delete_workforcemanagement_managementunit_scheduling_run(management_unit_id, run_id) rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->delete_workforcemanagement_managementunit_scheduling_run: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The ID of the management unit. | | **run_id** | **String**| The ID of the schedule run | | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## delete_workforcemanagement_managementunit_servicegoalgroup(management_unit_id, service_goal_group_id) Delete a service goal group Wraps DELETE /api/v2/workforcemanagement/managementunits/{managementUnitId}/servicegoalgroups/{serviceGoalGroupId} Requires ANY permissions: * wfm:serviceGoalGroup:delete ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. service_goal_group_id = "service_goal_group_id_example" # String | The ID of the service goal group to delete begin #Delete a service goal group api_instance.delete_workforcemanagement_managementunit_servicegoalgroup(management_unit_id, service_goal_group_id) rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->delete_workforcemanagement_managementunit_servicegoalgroup: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **service_goal_group_id** | **String**| The ID of the service goal group to delete | | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## delete_workforcemanagement_managementunit_week_schedule(management_unit_id, week_id, schedule_id) Delete a schedule Wraps DELETE /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekId}/schedules/{scheduleId} Requires ANY permissions: * wfm:schedule:delete ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. week_id = "week_id_example" # String | First day of schedule week in yyyy-MM-dd format. schedule_id = "schedule_id_example" # String | The ID of theschedule to delete begin #Delete a schedule api_instance.delete_workforcemanagement_managementunit_week_schedule(management_unit_id, week_id, schedule_id) rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->delete_workforcemanagement_managementunit_week_schedule: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **week_id** | **String**| First day of schedule week in yyyy-MM-dd format. | | **schedule_id** | **String**| The ID of theschedule to delete | | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## delete_workforcemanagement_managementunit_week_shorttermforecast(management_unit_id, week_date_id, forecast_id) Delete a short term forecast Must not be tied to any schedules Wraps DELETE /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shorttermforecasts/{forecastId} Requires ANY permissions: * wfm:shortTermForecast:delete ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The management unit ID of the management unit to which the forecast belongs week_date_id = "week_date_id_example" # String | The week start date of the forecast in yyyy-MM-dd format forecast_id = "forecast_id_example" # String | The ID of the forecast begin #Delete a short term forecast api_instance.delete_workforcemanagement_managementunit_week_shorttermforecast(management_unit_id, week_date_id, forecast_id) rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->delete_workforcemanagement_managementunit_week_shorttermforecast: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The management unit ID of the management unit to which the forecast belongs | | **week_date_id** | **String**| The week start date of the forecast in yyyy-MM-dd format | | **forecast_id** | **String**| The ID of the forecast | | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## delete_workforcemanagement_managementunit_workplan(management_unit_id, work_plan_id) Delete a work plan Wraps DELETE /api/v2/workforcemanagement/managementunits/{managementUnitId}/workplans/{workPlanId} Requires ANY permissions: * wfm:workPlan:delete ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. work_plan_id = "work_plan_id_example" # String | The ID of the work plan to delete begin #Delete a work plan api_instance.delete_workforcemanagement_managementunit_workplan(management_unit_id, work_plan_id) rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->delete_workforcemanagement_managementunit_workplan: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **work_plan_id** | **String**| The ID of the work plan to delete | | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**Array<UserScheduleAdherence>**](UserScheduleAdherence.html) get_workforcemanagement_adherence(user_id) Get a list of UserScheduleAdherence records for the requested users Wraps GET /api/v2/workforcemanagement/adherence Requires ANY permissions: * wfm:realtimeAdherence:view ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new user_id = ["user_id_example"] # Array | User Id(s) for which to fetch current schedule adherence information. Min 1, Max of 100 userIds per request begin #Get a list of UserScheduleAdherence records for the requested users result = api_instance.get_workforcemanagement_adherence(user_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_adherence: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_id** | [**Array<String>**](String.html)| User Id(s) for which to fetch current schedule adherence information. Min 1, Max of 100 userIds per request | | {: class="table table-striped"} ### Return type [**Array<UserScheduleAdherence>**](UserScheduleAdherence.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ModelingStatusResponse**](ModelingStatusResponse.html) get_workforcemanagement_adhocmodelingjob(job_id) Get status of the modeling job Wraps GET /api/v2/workforcemanagement/adhocmodelingjobs/{jobId} Requires ANY permissions: * wfm:adhocModel:view ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new job_id = "job_id_example" # String | The id of the modeling job begin #Get status of the modeling job result = api_instance.get_workforcemanagement_adhocmodelingjob(job_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_adhocmodelingjob: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **job_id** | **String**| The id of the modeling job | | {: class="table table-striped"} ### Return type [**ModelingStatusResponse**](ModelingStatusResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ManagementUnit**](ManagementUnit.html) get_workforcemanagement_managementunit(mu_id, opts) Get management unit Wraps GET /api/v2/workforcemanagement/managementunits/{muId} Requires ANY permissions: * wfm:activityCode:add * wfm:activityCode:delete * wfm:activityCode:edit * wfm:activityCode:view * wfm:agent:edit * wfm:agentSchedule:view * wfm:agentTimeOffRequest:submit * wfm:agent:view * wfm:businessUnit:add * wfm:businessUnit:delete * wfm:businessUnit:edit * wfm:businessUnit:view * wfm:historicalAdherence:view * wfm:intraday:view * wfm:managementUnit:add * wfm:managementUnit:delete * wfm:managementUnit:edit * wfm:managementUnit:view * wfm:publishedSchedule:view * wfm:realtimeAdherence:view * wfm:schedule:add * wfm:schedule:delete * wfm:schedule:edit * wfm:schedule:generate * wfm:schedule:view * wfm:serviceGoalGroup:add * wfm:serviceGoalGroup:delete * wfm:serviceGoalGroup:edit * wfm:serviceGoalGroup:view * wfm:shiftTradeRequest:edit * wfm:shiftTradeRequest:view * wfm:agentShiftTradeRequest:participate * wfm:shortTermForecast:add * wfm:shortTermForecast:delete * wfm:shortTermForecast:edit * wfm:shortTermForecast:view * wfm:timeOffRequest:add * wfm:timeOffRequest:edit * wfm:timeOffRequest:view * wfm:workPlan:add * wfm:workPlan:delete * wfm:workPlan:edit * wfm:workPlan:view ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new mu_id = "mu_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. opts = { expand: ["expand_example"] # Array | } begin #Get management unit result = api_instance.get_workforcemanagement_managementunit(mu_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **mu_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **expand** | [**Array<String>**](String.html)| | [optional]
**Values**: settings, settings.adherence, settings.timeOff, settings.scheduling, settings.shortTermForecasting, settings.shiftTrading | {: class="table table-striped"} ### Return type [**ManagementUnit**](ManagementUnit.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ActivityCode**](ActivityCode.html) get_workforcemanagement_managementunit_activitycode(mu_id, ac_id) Get an activity code Wraps GET /api/v2/workforcemanagement/managementunits/{muId}/activitycodes/{acId} Requires ANY permissions: * wfm:activityCode:view ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new mu_id = "mu_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. ac_id = "ac_id_example" # String | The ID of the activity code to fetch begin #Get an activity code result = api_instance.get_workforcemanagement_managementunit_activitycode(mu_id, ac_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_activitycode: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **mu_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **ac_id** | **String**| The ID of the activity code to fetch | | {: class="table table-striped"} ### Return type [**ActivityCode**](ActivityCode.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ActivityCodeContainer**](ActivityCodeContainer.html) get_workforcemanagement_managementunit_activitycodes(mu_id) Get activity codes Wraps GET /api/v2/workforcemanagement/managementunits/{muId}/activitycodes Requires ANY permissions: * wfm:activityCode:add * wfm:activityCode:delete * wfm:activityCode:edit * wfm:activityCode:view * wfm:agent:edit * wfm:agentSchedule:view * wfm:agentTimeOffRequest:submit * wfm:agent:view * wfm:businessUnit:add * wfm:businessUnit:delete * wfm:businessUnit:edit * wfm:businessUnit:view * wfm:historicalAdherence:view * wfm:intraday:view * wfm:managementUnit:add * wfm:managementUnit:delete * wfm:managementUnit:edit * wfm:managementUnit:view * wfm:publishedSchedule:view * wfm:realtimeAdherence:view * wfm:schedule:add * wfm:schedule:delete * wfm:schedule:edit * wfm:schedule:generate * wfm:schedule:view * wfm:serviceGoalGroup:add * wfm:serviceGoalGroup:delete * wfm:serviceGoalGroup:edit * wfm:serviceGoalGroup:view * wfm:shortTermForecast:add * wfm:shortTermForecast:delete * wfm:shortTermForecast:edit * wfm:shortTermForecast:view * wfm:timeOffRequest:add * wfm:timeOffRequest:edit * wfm:timeOffRequest:view * wfm:workPlan:add * wfm:workPlan:delete * wfm:workPlan:edit * wfm:workPlan:view ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new mu_id = "mu_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. begin #Get activity codes result = api_instance.get_workforcemanagement_managementunit_activitycodes(mu_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_activitycodes: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **mu_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | {: class="table table-striped"} ### Return type [**ActivityCodeContainer**](ActivityCodeContainer.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**WfmAgent**](WfmAgent.html) get_workforcemanagement_managementunit_agent(management_unit_id, agent_id) Get data for agent in the management unit Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/agents/{agentId} Requires ANY permissions: * wfm:agent:view ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The id of the management unit, or 'mine' for the management unit of the logged-in user. agent_id = "agent_id_example" # String | The agent id begin #Get data for agent in the management unit result = api_instance.get_workforcemanagement_managementunit_agent(management_unit_id, agent_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_agent: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The id of the management unit, or 'mine' for the management unit of the logged-in user. | | **agent_id** | **String**| The agent id | | {: class="table table-striped"} ### Return type [**WfmAgent**](WfmAgent.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**WfmIntradayQueueListing**](WfmIntradayQueueListing.html) get_workforcemanagement_managementunit_intraday_queues(mu_id, date) Get intraday queues for the given date Wraps GET /api/v2/workforcemanagement/managementunits/{muId}/intraday/queues Requires ANY permissions: * wfm:intraday:view ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new mu_id = "mu_id_example" # String | The management unit ID of the management unit date = "date_example" # String | yyyy-MM-dd date string interpreted in the configured management unit time zone begin #Get intraday queues for the given date result = api_instance.get_workforcemanagement_managementunit_intraday_queues(mu_id, date) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_intraday_queues: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **mu_id** | **String**| The management unit ID of the management unit | | **date** | **String**| yyyy-MM-dd date string interpreted in the configured management unit time zone | | {: class="table table-striped"} ### Return type [**WfmIntradayQueueListing**](WfmIntradayQueueListing.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**SchedulingRunResponse**](SchedulingRunResponse.html) get_workforcemanagement_managementunit_scheduling_run(management_unit_id, run_id) Gets the status for a specific scheduling run Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/scheduling/runs/{runId} Requires ANY permissions: * wfm:schedule:generate ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The ID of the management unit. run_id = "run_id_example" # String | The ID of the schedule run begin #Gets the status for a specific scheduling run result = api_instance.get_workforcemanagement_managementunit_scheduling_run(management_unit_id, run_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_scheduling_run: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The ID of the management unit. | | **run_id** | **String**| The ID of the schedule run | | {: class="table table-striped"} ### Return type [**SchedulingRunResponse**](SchedulingRunResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**RescheduleResult**](RescheduleResult.html) get_workforcemanagement_managementunit_scheduling_run_result(management_unit_id, run_id) Gets the result of a specific scheduling run Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/scheduling/runs/{runId}/result Requires ANY permissions: * wfm:schedule:generate ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The ID of the management unit. run_id = "run_id_example" # String | The ID of the schedule run begin #Gets the result of a specific scheduling run result = api_instance.get_workforcemanagement_managementunit_scheduling_run_result(management_unit_id, run_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_scheduling_run_result: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The ID of the management unit. | | **run_id** | **String**| The ID of the schedule run | | {: class="table table-striped"} ### Return type [**RescheduleResult**](RescheduleResult.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**SchedulingRunListResponse**](SchedulingRunListResponse.html) get_workforcemanagement_managementunit_scheduling_runs(management_unit_id) Get the status of all the ongoing schedule runs Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/scheduling/runs Requires ANY permissions: * wfm:schedule:generate ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The ID of the management unit. begin #Get the status of all the ongoing schedule runs result = api_instance.get_workforcemanagement_managementunit_scheduling_runs(management_unit_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_scheduling_runs: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The ID of the management unit. | | {: class="table table-striped"} ### Return type [**SchedulingRunListResponse**](SchedulingRunListResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ServiceGoalGroup**](ServiceGoalGroup.html) get_workforcemanagement_managementunit_servicegoalgroup(management_unit_id, service_goal_group_id) Get a service goal group Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/servicegoalgroups/{serviceGoalGroupId} Requires ANY permissions: * wfm:serviceGoalGroup:view ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. service_goal_group_id = "service_goal_group_id_example" # String | The ID of the service goal group to fetch begin #Get a service goal group result = api_instance.get_workforcemanagement_managementunit_servicegoalgroup(management_unit_id, service_goal_group_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_servicegoalgroup: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **service_goal_group_id** | **String**| The ID of the service goal group to fetch | | {: class="table table-striped"} ### Return type [**ServiceGoalGroup**](ServiceGoalGroup.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ServiceGoalGroupList**](ServiceGoalGroupList.html) get_workforcemanagement_managementunit_servicegoalgroups(management_unit_id) Get service goal groups Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/servicegoalgroups Requires ANY permissions: * wfm:serviceGoalGroup:view * wfm:shortTermForecast:view ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. begin #Get service goal groups result = api_instance.get_workforcemanagement_managementunit_servicegoalgroups(management_unit_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_servicegoalgroups: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | {: class="table table-striped"} ### Return type [**ServiceGoalGroupList**](ServiceGoalGroupList.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ManagementUnitSettings**](ManagementUnitSettings.html) get_workforcemanagement_managementunit_settings(mu_id) DEPRECATED Get the settings for the requested management unit. Deprecated, use the GET management unit route instead Wraps GET /api/v2/workforcemanagement/managementunits/{muId}/settings Requires ANY permissions: * wfm:managementUnit:view ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new mu_id = "mu_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. begin #Get the settings for the requested management unit. Deprecated, use the GET management unit route instead result = api_instance.get_workforcemanagement_managementunit_settings(mu_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_settings: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **mu_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | {: class="table table-striped"} ### Return type [**ManagementUnitSettings**](ManagementUnitSettings.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ShiftTradeMatchesSummaryResponse**](ShiftTradeMatchesSummaryResponse.html) get_workforcemanagement_managementunit_shifttrades_matched(mu_id) Gets a summary of all shift trades in the matched state Wraps GET /api/v2/workforcemanagement/managementunits/{muId}/shifttrades/matched Requires ANY permissions: * wfm:shiftTradeRequest:view * wfm:shiftTradeRequest:edit ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new mu_id = "mu_id_example" # String | The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user. begin #Gets a summary of all shift trades in the matched state result = api_instance.get_workforcemanagement_managementunit_shifttrades_matched(mu_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_shifttrades_matched: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **mu_id** | **String**| The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user. | | {: class="table table-striped"} ### Return type [**ShiftTradeMatchesSummaryResponse**](ShiftTradeMatchesSummaryResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**WfmUserEntityListing**](WfmUserEntityListing.html) get_workforcemanagement_managementunit_shifttrades_users(mu_id) Gets list of users available for whom you can send direct shift trade requests Wraps GET /api/v2/workforcemanagement/managementunits/{muId}/shifttrades/users Requires ANY permissions: * wfm:agentShiftTradeRequest:participate ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new mu_id = "mu_id_example" # String | The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user. begin #Gets list of users available for whom you can send direct shift trade requests result = api_instance.get_workforcemanagement_managementunit_shifttrades_users(mu_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_shifttrades_users: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **mu_id** | **String**| The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user. | | {: class="table table-striped"} ### Return type [**WfmUserEntityListing**](WfmUserEntityListing.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**TimeOffRequestResponse**](TimeOffRequestResponse.html) get_workforcemanagement_managementunit_user_timeoffrequest(mu_id, user_id, time_off_request_id) Get a time off request Wraps GET /api/v2/workforcemanagement/managementunits/{muId}/users/{userId}/timeoffrequests/{timeOffRequestId} Requires ANY permissions: * wfm:timeOffRequest:view ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new mu_id = "mu_id_example" # String | The muId of the management unit, or 'mine' for the management unit of the logged-in user. user_id = "user_id_example" # String | The userId to whom the Time Off Request applies. time_off_request_id = "time_off_request_id_example" # String | Time Off Request Id begin #Get a time off request result = api_instance.get_workforcemanagement_managementunit_user_timeoffrequest(mu_id, user_id, time_off_request_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_user_timeoffrequest: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **mu_id** | **String**| The muId of the management unit, or 'mine' for the management unit of the logged-in user. | | **user_id** | **String**| The userId to whom the Time Off Request applies. | | **time_off_request_id** | **String**| Time Off Request Id | | {: class="table table-striped"} ### Return type [**TimeOffRequestResponse**](TimeOffRequestResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**TimeOffRequestList**](TimeOffRequestList.html) get_workforcemanagement_managementunit_user_timeoffrequests(mu_id, user_id, opts) Get a list of time off requests for a given user Wraps GET /api/v2/workforcemanagement/managementunits/{muId}/users/{userId}/timeoffrequests Requires ANY permissions: * wfm:timeOffRequest:view ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new mu_id = "mu_id_example" # String | The muId of the management unit, or 'mine' for the management unit of the logged-in user. user_id = "user_id_example" # String | The userId to whom the Time Off Request applies. opts = { recently_reviewed: false # BOOLEAN | Limit results to requests that have been reviewed within the preceding 30 days } begin #Get a list of time off requests for a given user result = api_instance.get_workforcemanagement_managementunit_user_timeoffrequests(mu_id, user_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_user_timeoffrequests: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **mu_id** | **String**| The muId of the management unit, or 'mine' for the management unit of the logged-in user. | | **user_id** | **String**| The userId to whom the Time Off Request applies. | | **recently_reviewed** | **BOOLEAN**| Limit results to requests that have been reviewed within the preceding 30 days | [optional] [default to false] | {: class="table table-striped"} ### Return type [**TimeOffRequestList**](TimeOffRequestList.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**WfmUserEntityListing**](WfmUserEntityListing.html) get_workforcemanagement_managementunit_users(mu_id) Get users in the management unit Wraps GET /api/v2/workforcemanagement/managementunits/{muId}/users Requires ANY permissions: * wfm:agent:view * wfm:historicalAdherence:view * wfm:publishedSchedule:view * wfm:realtimeAdherence:view * wfm:schedule:view * wfm:timeOffRequest:view * wfm:workPlan:view ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new mu_id = "mu_id_example" # String | The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user. begin #Get users in the management unit result = api_instance.get_workforcemanagement_managementunit_users(mu_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_users: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **mu_id** | **String**| The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user. | | {: class="table table-striped"} ### Return type [**WfmUserEntityListing**](WfmUserEntityListing.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**WeekScheduleResponse**](WeekScheduleResponse.html) get_workforcemanagement_managementunit_week_schedule(management_unit_id, week_id, schedule_id, opts) Get a week schedule Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekId}/schedules/{scheduleId} Requires ANY permissions: * wfm:publishedSchedule:view * wfm:schedule:view ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. week_id = "week_id_example" # String | First day of schedule week in yyyy-MM-dd format. schedule_id = "schedule_id_example" # String | The ID of the schedule to fetch opts = { expand: "expand_example", # String | Which fields, if any, to expand force_download_service: true # BOOLEAN | Force the result of this operation to be sent via download service. For testing/app development purposes } begin #Get a week schedule result = api_instance.get_workforcemanagement_managementunit_week_schedule(management_unit_id, week_id, schedule_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_week_schedule: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **week_id** | **String**| First day of schedule week in yyyy-MM-dd format. | | **schedule_id** | **String**| The ID of the schedule to fetch | | **expand** | **String**| Which fields, if any, to expand | [optional]
**Values**: generationResults, headcountForecast | **force_download_service** | **BOOLEAN**| Force the result of this operation to be sent via download service. For testing/app development purposes | [optional] | {: class="table table-striped"} ### Return type [**WeekScheduleResponse**](WeekScheduleResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**WeekScheduleGenerationResult**](WeekScheduleGenerationResult.html) get_workforcemanagement_managementunit_week_schedule_generationresults(management_unit_id, week_id, schedule_id) Get week schedule generation results Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekId}/schedules/{scheduleId}/generationresults Requires ANY permissions: * wfm:publishedSchedule:view * wfm:schedule:view ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. week_id = "week_id_example" # String | First day of schedule week in yyyy-MM-dd format. schedule_id = "schedule_id_example" # String | The ID of the schedule to fetch generation results begin #Get week schedule generation results result = api_instance.get_workforcemanagement_managementunit_week_schedule_generationresults(management_unit_id, week_id, schedule_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_week_schedule_generationresults: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **week_id** | **String**| First day of schedule week in yyyy-MM-dd format. | | **schedule_id** | **String**| The ID of the schedule to fetch generation results | | {: class="table table-striped"} ### Return type [**WeekScheduleGenerationResult**](WeekScheduleGenerationResult.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**WeekScheduleListResponse**](WeekScheduleListResponse.html) get_workforcemanagement_managementunit_week_schedules(management_unit_id, week_id, opts) Get the list of schedules in a week in management unit Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekId}/schedules Requires ANY permissions: * wfm:publishedSchedule:view * wfm:schedule:view ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. week_id = "week_id_example" # String | First day of schedule week in yyyy-MM-dd format. opts = { include_only_published: true, # BOOLEAN | Return only published schedules earliest_week_date: "earliest_week_date_example", # String | The start date of the earliest week to query in yyyy-MM-dd format latest_week_date: "latest_week_date_example" # String | The start date of the latest week to query in yyyy-MM-dd format } begin #Get the list of schedules in a week in management unit result = api_instance.get_workforcemanagement_managementunit_week_schedules(management_unit_id, week_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_week_schedules: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **week_id** | **String**| First day of schedule week in yyyy-MM-dd format. | | **include_only_published** | **BOOLEAN**| Return only published schedules | [optional] | **earliest_week_date** | **String**| The start date of the earliest week to query in yyyy-MM-dd format | [optional] | **latest_week_date** | **String**| The start date of the latest week to query in yyyy-MM-dd format | [optional] | {: class="table table-striped"} ### Return type [**WeekScheduleListResponse**](WeekScheduleListResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ForecastResultResponse**](ForecastResultResponse.html) get_workforcemanagement_managementunit_week_shorttermforecast_final(management_unit_id, week_date_id, forecast_id, opts) Get the final result of a short term forecast calculation with modifications applied Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shorttermforecasts/{forecastId}/final Requires ANY permissions: * wfm:shortTermForecast:view ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The management unit ID of the management unit to which the forecast belongs week_date_id = "week_date_id_example" # String | The week start date of the forecast in yyyy-MM-dd format forecast_id = "forecast_id_example" # String | The ID of the forecast opts = { force_download_service: true # BOOLEAN | Force the result of this operation to be sent via download service. For testing/app development purposes } begin #Get the final result of a short term forecast calculation with modifications applied result = api_instance.get_workforcemanagement_managementunit_week_shorttermforecast_final(management_unit_id, week_date_id, forecast_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_week_shorttermforecast_final: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The management unit ID of the management unit to which the forecast belongs | | **week_date_id** | **String**| The week start date of the forecast in yyyy-MM-dd format | | **forecast_id** | **String**| The ID of the forecast | | **force_download_service** | **BOOLEAN**| Force the result of this operation to be sent via download service. For testing/app development purposes | [optional] | {: class="table table-striped"} ### Return type [**ForecastResultResponse**](ForecastResultResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ShortTermForecastListResponse**](ShortTermForecastListResponse.html) get_workforcemanagement_managementunit_week_shorttermforecasts(management_unit_id, week_date_id) Get short term forecasts Use \"recent\" for the `weekDateId` path parameter to fetch all forecasts for +/- 26 weeks from the current date Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shorttermforecasts Requires ANY permissions: * wfm:schedule:generate * wfm:shortTermForecast:view ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The management unit ID of the management unit to which the forecast belongs week_date_id = "week_date_id_example" # String | The week start date of the forecast in yyyy-MM-dd format begin #Get short term forecasts result = api_instance.get_workforcemanagement_managementunit_week_shorttermforecasts(management_unit_id, week_date_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_week_shorttermforecasts: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The management unit ID of the management unit to which the forecast belongs | | **week_date_id** | **String**| The week start date of the forecast in yyyy-MM-dd format | | {: class="table table-striped"} ### Return type [**ShortTermForecastListResponse**](ShortTermForecastListResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**WorkPlan**](WorkPlan.html) get_workforcemanagement_managementunit_workplan(management_unit_id, work_plan_id) Get a work plan Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/workplans/{workPlanId} Requires ANY permissions: * wfm:workPlan:view * wfm:schedule:edit ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. work_plan_id = "work_plan_id_example" # String | The ID of the work plan to fetch begin #Get a work plan result = api_instance.get_workforcemanagement_managementunit_workplan(management_unit_id, work_plan_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_workplan: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **work_plan_id** | **String**| The ID of the work plan to fetch | | {: class="table table-striped"} ### Return type [**WorkPlan**](WorkPlan.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**WorkPlanListResponse**](WorkPlanListResponse.html) get_workforcemanagement_managementunit_workplans(management_unit_id, opts) Get work plans Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/workplans Requires ANY permissions: * wfm:agent:view * wfm:publishedSchedule:view * wfm:schedule:view * wfm:workPlan:view ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. opts = { expand: ["expand_example"] # Array | } begin #Get work plans result = api_instance.get_workforcemanagement_managementunit_workplans(management_unit_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_workplans: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **expand** | [**Array<String>**](String.html)| | [optional]
**Values**: agentCount, details | {: class="table table-striped"} ### Return type [**WorkPlanListResponse**](WorkPlanListResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ManagementUnitListing**](ManagementUnitListing.html) get_workforcemanagement_managementunits(opts) Get management units Wraps GET /api/v2/workforcemanagement/managementunits Requires NO permissions: ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new opts = { page_size: 56, # Integer | page_number: 56, # Integer | expand: "expand_example", # String | feature: "feature_example", # String | division_id: "division_id_example" # String | } begin #Get management units result = api_instance.get_workforcemanagement_managementunits(opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunits: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **page_size** | **Integer**| | [optional] | **page_number** | **Integer**| | [optional] | **expand** | **String**| | [optional]
**Values**: details | **feature** | **String**| | [optional]
**Values**: AgentSchedule, AgentTimeOffRequest, ActivityCodes, Agents, BusinessUnitActivityCodes, BusinessUnits, HistoricalAdherence, IntradayMonitoring, ManagementUnits, RealTimeAdherence, Schedules, ServiceGoalGroups, ServiceGoalTemplates, PlanningGroups, ShiftTrading, ShortTermForecasts, TimeOffRequests, WorkPlans | **division_id** | **String**| | [optional] | {: class="table table-striped"} ### Return type [**ManagementUnitListing**](ManagementUnitListing.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ManagementUnitListing**](ManagementUnitListing.html) get_workforcemanagement_managementunits_divisionviews(opts) Get management units across divisions Wraps GET /api/v2/workforcemanagement/managementunits/divisionviews Requires ANY permissions: * wfm:managementUnit:search ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new opts = { division_id: ["division_id_example"] # Array | The divisionIds to filter by. If omitted, will return all divisions } begin #Get management units across divisions result = api_instance.get_workforcemanagement_managementunits_divisionviews(opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunits_divisionviews: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **division_id** | [**Array<String>**](String.html)| The divisionIds to filter by. If omitted, will return all divisions | [optional] | {: class="table table-striped"} ### Return type [**ManagementUnitListing**](ManagementUnitListing.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**NotificationsResponse**](NotificationsResponse.html) get_workforcemanagement_notifications Get a list of notifications for the current user Wraps GET /api/v2/workforcemanagement/notifications Requires NO permissions: ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new begin #Get a list of notifications for the current user result = api_instance.get_workforcemanagement_notifications p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_notifications: #{e}" end ``` ### Parameters This endpoint does not need any parameter. {: class="table table-striped"} ### Return type [**NotificationsResponse**](NotificationsResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**SchedulingStatusResponse**](SchedulingStatusResponse.html) get_workforcemanagement_schedulingjob(job_id) Get status of the scheduling job Wraps GET /api/v2/workforcemanagement/schedulingjobs/{jobId} Requires ANY permissions: * wfm:schedulingrequest:view ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new job_id = "job_id_example" # String | The id of the scheduling job begin #Get status of the scheduling job result = api_instance.get_workforcemanagement_schedulingjob(job_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_schedulingjob: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **job_id** | **String**| The id of the scheduling job | | {: class="table table-striped"} ### Return type [**SchedulingStatusResponse**](SchedulingStatusResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ShiftTradeListResponse**](ShiftTradeListResponse.html) get_workforcemanagement_shifttrades Gets all of my shift trades Wraps GET /api/v2/workforcemanagement/shifttrades Requires ANY permissions: * wfm:shiftTradeRequest:edit * wfm:shiftTradeRequest:view * wfm:agentShiftTradeRequest:participate ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new begin #Gets all of my shift trades result = api_instance.get_workforcemanagement_shifttrades p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_shifttrades: #{e}" end ``` ### Parameters This endpoint does not need any parameter. {: class="table table-striped"} ### Return type [**ShiftTradeListResponse**](ShiftTradeListResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**TimeOffRequestResponse**](TimeOffRequestResponse.html) get_workforcemanagement_timeoffrequest(time_off_request_id) Get a time off request for the current user Wraps GET /api/v2/workforcemanagement/timeoffrequests/{timeOffRequestId} Requires ANY permissions: * wfm:agentSchedule:view * wfm:agentTimeOffRequest:submit ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new time_off_request_id = "time_off_request_id_example" # String | Time Off Request Id begin #Get a time off request for the current user result = api_instance.get_workforcemanagement_timeoffrequest(time_off_request_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_timeoffrequest: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **time_off_request_id** | **String**| Time Off Request Id | | {: class="table table-striped"} ### Return type [**TimeOffRequestResponse**](TimeOffRequestResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**TimeOffRequestList**](TimeOffRequestList.html) get_workforcemanagement_timeoffrequests(opts) Get a list of time off requests for the current user Wraps GET /api/v2/workforcemanagement/timeoffrequests Requires ANY permissions: * wfm:agentSchedule:view * wfm:agentTimeOffRequest:submit ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new opts = { recently_reviewed: false # BOOLEAN | Limit results to requests that have been reviewed within the preceding 30 days } begin #Get a list of time off requests for the current user result = api_instance.get_workforcemanagement_timeoffrequests(opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_timeoffrequests: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **recently_reviewed** | **BOOLEAN**| Limit results to requests that have been reviewed within the preceding 30 days | [optional] [default to false] | {: class="table table-striped"} ### Return type [**TimeOffRequestList**](TimeOffRequestList.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ManagementUnit**](ManagementUnit.html) patch_workforcemanagement_managementunit(mu_id, opts) Update the requested management unit Wraps PATCH /api/v2/workforcemanagement/managementunits/{muId} Requires ANY permissions: * wfm:managementUnit:edit ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new mu_id = "mu_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. opts = { body: PureCloud::UpdateManagementUnitRequest.new # UpdateManagementUnitRequest | body } begin #Update the requested management unit result = api_instance.patch_workforcemanagement_managementunit(mu_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->patch_workforcemanagement_managementunit: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **mu_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **body** | [**UpdateManagementUnitRequest**](UpdateManagementUnitRequest.html)| body | [optional] | {: class="table table-striped"} ### Return type [**ManagementUnit**](ManagementUnit.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ActivityCode**](ActivityCode.html) patch_workforcemanagement_managementunit_activitycode(mu_id, ac_id, opts) Update an activity code Wraps PATCH /api/v2/workforcemanagement/managementunits/{muId}/activitycodes/{acId} Requires ANY permissions: * wfm:activityCode:edit ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new mu_id = "mu_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. ac_id = "ac_id_example" # String | The ID of the activity code to update opts = { body: PureCloud::UpdateActivityCodeRequest.new # UpdateActivityCodeRequest | body } begin #Update an activity code result = api_instance.patch_workforcemanagement_managementunit_activitycode(mu_id, ac_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->patch_workforcemanagement_managementunit_activitycode: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **mu_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **ac_id** | **String**| The ID of the activity code to update | | **body** | [**UpdateActivityCodeRequest**](UpdateActivityCodeRequest.html)| body | [optional] | {: class="table table-striped"} ### Return type [**ActivityCode**](ActivityCode.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**RescheduleResult**](RescheduleResult.html) patch_workforcemanagement_managementunit_scheduling_run(management_unit_id, run_id, opts) Marks a specific scheduling run as applied, allowing a new rescheduling run to be started Wraps PATCH /api/v2/workforcemanagement/managementunits/{managementUnitId}/scheduling/runs/{runId} Requires ANY permissions: * wfm:schedule:generate ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The ID of the management unit. run_id = "run_id_example" # String | The ID of the schedule run opts = { body: PureCloud::UpdateSchedulingRunRequest.new # UpdateSchedulingRunRequest | body } begin #Marks a specific scheduling run as applied, allowing a new rescheduling run to be started result = api_instance.patch_workforcemanagement_managementunit_scheduling_run(management_unit_id, run_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->patch_workforcemanagement_managementunit_scheduling_run: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The ID of the management unit. | | **run_id** | **String**| The ID of the schedule run | | **body** | [**UpdateSchedulingRunRequest**](UpdateSchedulingRunRequest.html)| body | [optional] | {: class="table table-striped"} ### Return type [**RescheduleResult**](RescheduleResult.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ServiceGoalGroup**](ServiceGoalGroup.html) patch_workforcemanagement_managementunit_servicegoalgroup(management_unit_id, service_goal_group_id, opts) Update a service goal group Wraps PATCH /api/v2/workforcemanagement/managementunits/{managementUnitId}/servicegoalgroups/{serviceGoalGroupId} Requires ANY permissions: * wfm:serviceGoalGroup:edit ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. service_goal_group_id = "service_goal_group_id_example" # String | The ID of the service goal group to update opts = { body: PureCloud::ServiceGoalGroup.new # ServiceGoalGroup | body } begin #Update a service goal group result = api_instance.patch_workforcemanagement_managementunit_servicegoalgroup(management_unit_id, service_goal_group_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->patch_workforcemanagement_managementunit_servicegoalgroup: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **service_goal_group_id** | **String**| The ID of the service goal group to update | | **body** | [**ServiceGoalGroup**](ServiceGoalGroup.html)| body | [optional] | {: class="table table-striped"} ### Return type [**ServiceGoalGroup**](ServiceGoalGroup.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ManagementUnitSettings**](ManagementUnitSettings.html) patch_workforcemanagement_managementunit_settings(mu_id, opts) Update the settings for the requested management unit Wraps PATCH /api/v2/workforcemanagement/managementunits/{muId}/settings Requires ANY permissions: * wfm:managementUnit:edit ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new mu_id = "mu_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. opts = { body: PureCloud::ManagementUnitSettings.new # ManagementUnitSettings | config } begin #Update the settings for the requested management unit result = api_instance.patch_workforcemanagement_managementunit_settings(mu_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->patch_workforcemanagement_managementunit_settings: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **mu_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **body** | [**ManagementUnitSettings**](ManagementUnitSettings.html)| config | [optional] | {: class="table table-striped"} ### Return type [**ManagementUnitSettings**](ManagementUnitSettings.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**TimeOffRequestResponse**](TimeOffRequestResponse.html) patch_workforcemanagement_managementunit_user_timeoffrequest(mu_id, user_id, time_off_request_id, opts) Update a time off request Wraps PATCH /api/v2/workforcemanagement/managementunits/{muId}/users/{userId}/timeoffrequests/{timeOffRequestId} Requires ANY permissions: * wfm:timeOffRequest:edit ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new mu_id = "mu_id_example" # String | The muId of the management unit, or 'mine' for the management unit of the logged-in user. user_id = "user_id_example" # String | The id of the user the requested time off request belongs to time_off_request_id = "time_off_request_id_example" # String | The id of the time off request to update opts = { body: PureCloud::AdminTimeOffRequestPatch.new # AdminTimeOffRequestPatch | body } begin #Update a time off request result = api_instance.patch_workforcemanagement_managementunit_user_timeoffrequest(mu_id, user_id, time_off_request_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->patch_workforcemanagement_managementunit_user_timeoffrequest: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **mu_id** | **String**| The muId of the management unit, or 'mine' for the management unit of the logged-in user. | | **user_id** | **String**| The id of the user the requested time off request belongs to | | **time_off_request_id** | **String**| The id of the time off request to update | | **body** | [**AdminTimeOffRequestPatch**](AdminTimeOffRequestPatch.html)| body | [optional] | {: class="table table-striped"} ### Return type [**TimeOffRequestResponse**](TimeOffRequestResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**AsyncWeekScheduleResponse**](AsyncWeekScheduleResponse.html) patch_workforcemanagement_managementunit_week_schedule(management_unit_id, week_id, schedule_id, opts) Update a week schedule Wraps PATCH /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekId}/schedules/{scheduleId} Requires ANY permissions: * wfm:schedule:edit ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. week_id = "week_id_example" # String | First day of schedule week in yyyy-MM-dd format. schedule_id = "schedule_id_example" # String | The ID of the schedule to update. Use partial uploads of user schedules if activity count in schedule is greater than 17500 opts = { force_async: true, # BOOLEAN | Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes force_download_service: true, # BOOLEAN | Force the result of this operation to be sent via download service. For testing/app development purposes body: PureCloud::UpdateWeekScheduleRequest.new # UpdateWeekScheduleRequest | body } begin #Update a week schedule result = api_instance.patch_workforcemanagement_managementunit_week_schedule(management_unit_id, week_id, schedule_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->patch_workforcemanagement_managementunit_week_schedule: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **week_id** | **String**| First day of schedule week in yyyy-MM-dd format. | | **schedule_id** | **String**| The ID of the schedule to update. Use partial uploads of user schedules if activity count in schedule is greater than 17500 | | **force_async** | **BOOLEAN**| Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes | [optional] | **force_download_service** | **BOOLEAN**| Force the result of this operation to be sent via download service. For testing/app development purposes | [optional] | **body** | [**UpdateWeekScheduleRequest**](UpdateWeekScheduleRequest.html)| body | [optional] | {: class="table table-striped"} ### Return type [**AsyncWeekScheduleResponse**](AsyncWeekScheduleResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**WorkPlan**](WorkPlan.html) patch_workforcemanagement_managementunit_workplan(management_unit_id, work_plan_id, opts) Update a work plan Wraps PATCH /api/v2/workforcemanagement/managementunits/{managementUnitId}/workplans/{workPlanId} Requires ANY permissions: * wfm:workPlan:edit ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. work_plan_id = "work_plan_id_example" # String | The ID of the work plan to update opts = { body: PureCloud::WorkPlan.new # WorkPlan | body } begin #Update a work plan result = api_instance.patch_workforcemanagement_managementunit_workplan(management_unit_id, work_plan_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->patch_workforcemanagement_managementunit_workplan: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **work_plan_id** | **String**| The ID of the work plan to update | | **body** | [**WorkPlan**](WorkPlan.html)| body | [optional] | {: class="table table-striped"} ### Return type [**WorkPlan**](WorkPlan.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**TimeOffRequestResponse**](TimeOffRequestResponse.html) patch_workforcemanagement_timeoffrequest(time_off_request_id, opts) Update a time off request for the current user Wraps PATCH /api/v2/workforcemanagement/timeoffrequests/{timeOffRequestId} Requires ANY permissions: * wfm:agentTimeOffRequest:submit ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new time_off_request_id = "time_off_request_id_example" # String | Time Off Request Id opts = { body: PureCloud::AgentTimeOffRequestPatch.new # AgentTimeOffRequestPatch | body } begin #Update a time off request for the current user result = api_instance.patch_workforcemanagement_timeoffrequest(time_off_request_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->patch_workforcemanagement_timeoffrequest: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **time_off_request_id** | **String**| Time Off Request Id | | **body** | [**AgentTimeOffRequestPatch**](AgentTimeOffRequestPatch.html)| body | [optional] | {: class="table table-striped"} ### Return type [**TimeOffRequestResponse**](TimeOffRequestResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**WfmHistoricalAdherenceResponse**](WfmHistoricalAdherenceResponse.html) post_workforcemanagement_adherence_historical(opts) Request a historical adherence report for users across management units Wraps POST /api/v2/workforcemanagement/adherence/historical Requires ANY permissions: * wfm:historicalAdherence:view ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new opts = { body: PureCloud::WfmHistoricalAdherenceQueryForUsers.new # WfmHistoricalAdherenceQueryForUsers | body } begin #Request a historical adherence report for users across management units result = api_instance.post_workforcemanagement_adherence_historical(opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_adherence_historical: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**WfmHistoricalAdherenceQueryForUsers**](WfmHistoricalAdherenceQueryForUsers.html)| body | [optional] | {: class="table table-striped"} ### Return type [**WfmHistoricalAdherenceResponse**](WfmHistoricalAdherenceResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ActivityCode**](ActivityCode.html) post_workforcemanagement_managementunit_activitycodes(mu_id, opts) Create a new activity code Wraps POST /api/v2/workforcemanagement/managementunits/{muId}/activitycodes Requires ANY permissions: * wfm:activityCode:add ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new mu_id = "mu_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. opts = { body: PureCloud::CreateActivityCodeRequest.new # CreateActivityCodeRequest | body } begin #Create a new activity code result = api_instance.post_workforcemanagement_managementunit_activitycodes(mu_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_activitycodes: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **mu_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **body** | [**CreateActivityCodeRequest**](CreateActivityCodeRequest.html)| body | [optional] | {: class="table table-striped"} ### Return type [**ActivityCode**](ActivityCode.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**WfmHistoricalAdherenceResponse**](WfmHistoricalAdherenceResponse.html) post_workforcemanagement_managementunit_historicaladherencequery(mu_id, opts) Request a historical adherence report The maximum supported range for historical adherence queries is 31 days, or 7 days with includeExceptions = true Wraps POST /api/v2/workforcemanagement/managementunits/{muId}/historicaladherencequery Requires ANY permissions: * wfm:historicalAdherence:view ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new mu_id = "mu_id_example" # String | The management unit ID of the management unit opts = { body: PureCloud::WfmHistoricalAdherenceQuery.new # WfmHistoricalAdherenceQuery | body } begin #Request a historical adherence report result = api_instance.post_workforcemanagement_managementunit_historicaladherencequery(mu_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_historicaladherencequery: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **mu_id** | **String**| The management unit ID of the management unit | | **body** | [**WfmHistoricalAdherenceQuery**](WfmHistoricalAdherenceQuery.html)| body | [optional] | {: class="table table-striped"} ### Return type [**WfmHistoricalAdherenceResponse**](WfmHistoricalAdherenceResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**IntradayResponse**](IntradayResponse.html) post_workforcemanagement_managementunit_intraday(mu_id, opts) Get intraday data for the given date for the requested queueIds Wraps POST /api/v2/workforcemanagement/managementunits/{muId}/intraday Requires ANY permissions: * wfm:intraday:view ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new mu_id = "mu_id_example" # String | The management unit ID of the management unit opts = { body: PureCloud::IntradayQueryDataCommand.new # IntradayQueryDataCommand | body } begin #Get intraday data for the given date for the requested queueIds result = api_instance.post_workforcemanagement_managementunit_intraday(mu_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_intraday: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **mu_id** | **String**| The management unit ID of the management unit | | **body** | [**IntradayQueryDataCommand**](IntradayQueryDataCommand.html)| body | [optional] | {: class="table table-striped"} ### Return type [**IntradayResponse**](IntradayResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**MoveManagementUnitResponse**](MoveManagementUnitResponse.html) post_workforcemanagement_managementunit_move(mu_id, opts) Move the requested management unit to a new business unit Returns status 200 if the management unit is already in the requested business unit Wraps POST /api/v2/workforcemanagement/managementunits/{muId}/move Requires ANY permissions: * wfm:managementUnit:edit ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new mu_id = "mu_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. opts = { body: PureCloud::MoveManagementUnitRequest.new # MoveManagementUnitRequest | body } begin #Move the requested management unit to a new business unit result = api_instance.post_workforcemanagement_managementunit_move(mu_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_move: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **mu_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **body** | [**MoveManagementUnitRequest**](MoveManagementUnitRequest.html)| body | [optional] | {: class="table table-striped"} ### Return type [**MoveManagementUnitResponse**](MoveManagementUnitResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**UserScheduleContainer**](UserScheduleContainer.html) post_workforcemanagement_managementunit_schedules_search(mu_id, opts) Query published schedules for given given time range for set of users Wraps POST /api/v2/workforcemanagement/managementunits/{muId}/schedules/search Requires ANY permissions: * wfm:publishedSchedule:view * wfm:schedule:view ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new mu_id = "mu_id_example" # String | The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user. opts = { body: PureCloud::UserListScheduleRequestBody.new # UserListScheduleRequestBody | body } begin #Query published schedules for given given time range for set of users result = api_instance.post_workforcemanagement_managementunit_schedules_search(mu_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_schedules_search: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **mu_id** | **String**| The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **body** | [**UserListScheduleRequestBody**](UserListScheduleRequestBody.html)| body | [optional] | {: class="table table-striped"} ### Return type [**UserScheduleContainer**](UserScheduleContainer.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ServiceGoalGroup**](ServiceGoalGroup.html) post_workforcemanagement_managementunit_servicegoalgroups(management_unit_id, opts) Create a new service goal group Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/servicegoalgroups Requires ANY permissions: * wfm:serviceGoalGroup:add ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. opts = { body: PureCloud::CreateServiceGoalGroupRequest.new # CreateServiceGoalGroupRequest | body } begin #Create a new service goal group result = api_instance.post_workforcemanagement_managementunit_servicegoalgroups(management_unit_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_servicegoalgroups: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **body** | [**CreateServiceGoalGroupRequest**](CreateServiceGoalGroupRequest.html)| body | [optional] | {: class="table table-striped"} ### Return type [**ServiceGoalGroup**](ServiceGoalGroup.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**TimeOffRequestList**](TimeOffRequestList.html) post_workforcemanagement_managementunit_timeoffrequests(mu_id, opts) Create a new time off request Wraps POST /api/v2/workforcemanagement/managementunits/{muId}/timeoffrequests Requires ANY permissions: * wfm:timeOffRequest:add ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new mu_id = "mu_id_example" # String | The muId of the management unit, or 'mine' for the management unit of the logged-in user. opts = { body: PureCloud::CreateAdminTimeOffRequest.new # CreateAdminTimeOffRequest | body } begin #Create a new time off request result = api_instance.post_workforcemanagement_managementunit_timeoffrequests(mu_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_timeoffrequests: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **mu_id** | **String**| The muId of the management unit, or 'mine' for the management unit of the logged-in user. | | **body** | [**CreateAdminTimeOffRequest**](CreateAdminTimeOffRequest.html)| body | [optional] | {: class="table table-striped"} ### Return type [**TimeOffRequestList**](TimeOffRequestList.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**TimeOffRequestEntityList**](TimeOffRequestEntityList.html) post_workforcemanagement_managementunit_timeoffrequests_fetchdetails(mu_id, opts) Gets a list of time off requests from lookup ids Wraps POST /api/v2/workforcemanagement/managementunits/{muId}/timeoffrequests/fetchdetails Requires ANY permissions: * wfm:timeOffRequest:view ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new mu_id = "mu_id_example" # String | The muId of the management unit, or 'mine' for the management unit of the logged-in user. opts = { body: PureCloud::TimeOffRequestLookupList.new # TimeOffRequestLookupList | body } begin #Gets a list of time off requests from lookup ids result = api_instance.post_workforcemanagement_managementunit_timeoffrequests_fetchdetails(mu_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_timeoffrequests_fetchdetails: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **mu_id** | **String**| The muId of the management unit, or 'mine' for the management unit of the logged-in user. | | **body** | [**TimeOffRequestLookupList**](TimeOffRequestLookupList.html)| body | [optional] | {: class="table table-striped"} ### Return type [**TimeOffRequestEntityList**](TimeOffRequestEntityList.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**TimeOffRequestLookupList**](TimeOffRequestLookupList.html) post_workforcemanagement_managementunit_timeoffrequests_query(mu_id, opts) Gets the lookup ids to fetch the specified set of requests Wraps POST /api/v2/workforcemanagement/managementunits/{muId}/timeoffrequests/query Requires ANY permissions: * wfm:timeOffRequest:view ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new mu_id = "mu_id_example" # String | The muId of the management unit, or 'mine' for the management unit of the logged-in user. opts = { body: PureCloud::TimeOffRequestQueryBody.new # TimeOffRequestQueryBody | body } begin #Gets the lookup ids to fetch the specified set of requests result = api_instance.post_workforcemanagement_managementunit_timeoffrequests_query(mu_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_timeoffrequests_query: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **mu_id** | **String**| The muId of the management unit, or 'mine' for the management unit of the logged-in user. | | **body** | [**TimeOffRequestQueryBody**](TimeOffRequestQueryBody.html)| body | [optional] | {: class="table table-striped"} ### Return type [**TimeOffRequestLookupList**](TimeOffRequestLookupList.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**AsyncWeekScheduleResponse**](AsyncWeekScheduleResponse.html) post_workforcemanagement_managementunit_week_schedule_copy(management_unit_id, week_id, schedule_id, opts) Copy a week schedule Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekId}/schedules/{scheduleId}/copy Requires ANY permissions: * wfm:schedule:add ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. week_id = "week_id_example" # String | First day of schedule week in yyyy-MM-dd format. schedule_id = "schedule_id_example" # String | The ID of the schedule to copy from opts = { force_async: true, # BOOLEAN | Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes force_download_service: true, # BOOLEAN | Force the result of this operation to be sent via download service. For testing/app development purposes body: PureCloud::CopyWeekScheduleRequest.new # CopyWeekScheduleRequest | body } begin #Copy a week schedule result = api_instance.post_workforcemanagement_managementunit_week_schedule_copy(management_unit_id, week_id, schedule_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_week_schedule_copy: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **week_id** | **String**| First day of schedule week in yyyy-MM-dd format. | | **schedule_id** | **String**| The ID of the schedule to copy from | | **force_async** | **BOOLEAN**| Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes | [optional] | **force_download_service** | **BOOLEAN**| Force the result of this operation to be sent via download service. For testing/app development purposes | [optional] | **body** | [**CopyWeekScheduleRequest**](CopyWeekScheduleRequest.html)| body | [optional] | {: class="table table-striped"} ### Return type [**AsyncWeekScheduleResponse**](AsyncWeekScheduleResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**AsyncWeekScheduleResponse**](AsyncWeekScheduleResponse.html) post_workforcemanagement_managementunit_week_schedule_reschedule(management_unit_id, week_id, schedule_id, opts) Start a scheduling run to compute the reschedule. When the scheduling run finishes, a client can get the reschedule changes and then the client can apply them to the schedule, save the schedule, and mark the scheduling run as applied Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekId}/schedules/{scheduleId}/reschedule Requires ANY permissions: * wfm:schedule:edit ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. week_id = "week_id_example" # String | First day of schedule week in yyyy-MM-dd format. schedule_id = "schedule_id_example" # String | The ID of the schedule to re-optimize opts = { body: PureCloud::RescheduleRequest.new # RescheduleRequest | body } begin #Start a scheduling run to compute the reschedule. When the scheduling run finishes, a client can get the reschedule changes and then the client can apply them to the schedule, save the schedule, and mark the scheduling run as applied result = api_instance.post_workforcemanagement_managementunit_week_schedule_reschedule(management_unit_id, week_id, schedule_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_week_schedule_reschedule: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **week_id** | **String**| First day of schedule week in yyyy-MM-dd format. | | **schedule_id** | **String**| The ID of the schedule to re-optimize | | **body** | [**RescheduleRequest**](RescheduleRequest.html)| body | [optional] | {: class="table table-striped"} ### Return type [**AsyncWeekScheduleResponse**](AsyncWeekScheduleResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**AsyncWeekScheduleResponse**](AsyncWeekScheduleResponse.html) post_workforcemanagement_managementunit_week_schedules(management_unit_id, week_id, opts) Add a schedule for a week in management unit using imported data. Use partial uploads of user schedules if activity count in schedule is greater than 17500 Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekId}/schedules Requires ANY permissions: * wfm:schedule:add ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. week_id = "week_id_example" # String | First day of schedule week in yyyy-MM-dd format. opts = { force_async: true, # BOOLEAN | Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes force_download_service: true, # BOOLEAN | Force the result of this operation to be sent via download service. For testing/app development purposes body: PureCloud::ImportWeekScheduleRequest.new # ImportWeekScheduleRequest | body } begin #Add a schedule for a week in management unit using imported data. Use partial uploads of user schedules if activity count in schedule is greater than 17500 result = api_instance.post_workforcemanagement_managementunit_week_schedules(management_unit_id, week_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_week_schedules: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **week_id** | **String**| First day of schedule week in yyyy-MM-dd format. | | **force_async** | **BOOLEAN**| Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes | [optional] | **force_download_service** | **BOOLEAN**| Force the result of this operation to be sent via download service. For testing/app development purposes | [optional] | **body** | [**ImportWeekScheduleRequest**](ImportWeekScheduleRequest.html)| body | [optional] | {: class="table table-striped"} ### Return type [**AsyncWeekScheduleResponse**](AsyncWeekScheduleResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**GenerateWeekScheduleResponse**](GenerateWeekScheduleResponse.html) post_workforcemanagement_managementunit_week_schedules_generate(management_unit_id, week_id, opts) Generate a week schedule Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekId}/schedules/generate Requires ANY permissions: * wfm:schedule:generate ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. week_id = "week_id_example" # String | First day of schedule week in yyyy-MM-dd format. opts = { body: PureCloud::GenerateWeekScheduleRequest.new # GenerateWeekScheduleRequest | body } begin #Generate a week schedule result = api_instance.post_workforcemanagement_managementunit_week_schedules_generate(management_unit_id, week_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_week_schedules_generate: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **week_id** | **String**| First day of schedule week in yyyy-MM-dd format. | | **body** | [**GenerateWeekScheduleRequest**](GenerateWeekScheduleRequest.html)| body | [optional] | {: class="table table-striped"} ### Return type [**GenerateWeekScheduleResponse**](GenerateWeekScheduleResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**PartialUploadResponse**](PartialUploadResponse.html) post_workforcemanagement_managementunit_week_schedules_partialupload(management_unit_id, week_id, opts) Partial upload of user schedules where activity count is greater than 17500 Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekId}/schedules/partialupload Requires ANY permissions: * wfm:schedule:add * wfm:schedule:edit ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. week_id = "week_id_example" # String | First day of schedule week in yyyy-MM-dd format. opts = { body: PureCloud::UserSchedulesPartialUploadRequest.new # UserSchedulesPartialUploadRequest | body } begin #Partial upload of user schedules where activity count is greater than 17500 result = api_instance.post_workforcemanagement_managementunit_week_schedules_partialupload(management_unit_id, week_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_week_schedules_partialupload: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **week_id** | **String**| First day of schedule week in yyyy-MM-dd format. | | **body** | [**UserSchedulesPartialUploadRequest**](UserSchedulesPartialUploadRequest.html)| body | [optional] | {: class="table table-striped"} ### Return type [**PartialUploadResponse**](PartialUploadResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ShortTermForecastResponse**](ShortTermForecastResponse.html) post_workforcemanagement_managementunit_week_shorttermforecast_copy(management_unit_id, week_date_id, forecast_id, body, opts) Copy a short term forecast Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shorttermforecasts/{forecastId}/copy Requires ANY permissions: * wfm:shortTermForecast:add ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The management unit ID of the management unit to which the forecast belongs week_date_id = "week_date_id_example" # String | The week start date of the forecast in yyyy-MM-dd format forecast_id = "forecast_id_example" # String | The ID of the forecast to copy body = PureCloud::CopyShortTermForecastRequest.new # CopyShortTermForecastRequest | body opts = { force_async: true # BOOLEAN | Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes } begin #Copy a short term forecast result = api_instance.post_workforcemanagement_managementunit_week_shorttermforecast_copy(management_unit_id, week_date_id, forecast_id, body, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_week_shorttermforecast_copy: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The management unit ID of the management unit to which the forecast belongs | | **week_date_id** | **String**| The week start date of the forecast in yyyy-MM-dd format | | **forecast_id** | **String**| The ID of the forecast to copy | | **body** | [**CopyShortTermForecastRequest**](CopyShortTermForecastRequest.html)| body | | **force_async** | **BOOLEAN**| Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes | [optional] | {: class="table table-striped"} ### Return type [**ShortTermForecastResponse**](ShortTermForecastResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ShortTermForecastResponse**](ShortTermForecastResponse.html) post_workforcemanagement_managementunit_week_shorttermforecasts(management_unit_id, week_date_id, body, opts) Import a short term forecast Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shorttermforecasts Requires ANY permissions: * wfm:shortTermForecast:add ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The management unit ID of the management unit to which the forecast belongs week_date_id = "week_date_id_example" # String | The week start date of the forecast in yyyy-MM-dd format body = PureCloud::ImportShortTermForecastRequest.new # ImportShortTermForecastRequest | body opts = { force_async: true # BOOLEAN | Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes } begin #Import a short term forecast result = api_instance.post_workforcemanagement_managementunit_week_shorttermforecasts(management_unit_id, week_date_id, body, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_week_shorttermforecasts: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The management unit ID of the management unit to which the forecast belongs | | **week_date_id** | **String**| The week start date of the forecast in yyyy-MM-dd format | | **body** | [**ImportShortTermForecastRequest**](ImportShortTermForecastRequest.html)| body | | **force_async** | **BOOLEAN**| Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes | [optional] | {: class="table table-striped"} ### Return type [**ShortTermForecastResponse**](ShortTermForecastResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**GenerateShortTermForecastResponse**](GenerateShortTermForecastResponse.html) post_workforcemanagement_managementunit_week_shorttermforecasts_generate(management_unit_id, week_date_id, body, opts) Generate a short term forecast Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shorttermforecasts/generate Requires ANY permissions: * wfm:shortTermForecast:add ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The management unit ID of the management unit to which the forecast belongs week_date_id = "week_date_id_example" # String | The week start date of the forecast in yyyy-MM-dd format body = PureCloud::GenerateShortTermForecastRequest.new # GenerateShortTermForecastRequest | opts = { force_async: true # BOOLEAN | Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes } begin #Generate a short term forecast result = api_instance.post_workforcemanagement_managementunit_week_shorttermforecasts_generate(management_unit_id, week_date_id, body, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_week_shorttermforecasts_generate: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The management unit ID of the management unit to which the forecast belongs | | **week_date_id** | **String**| The week start date of the forecast in yyyy-MM-dd format | | **body** | [**GenerateShortTermForecastRequest**](GenerateShortTermForecastRequest.html)| | | **force_async** | **BOOLEAN**| Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes | [optional] | {: class="table table-striped"} ### Return type [**GenerateShortTermForecastResponse**](GenerateShortTermForecastResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**PartialUploadResponse**](PartialUploadResponse.html) post_workforcemanagement_managementunit_week_shorttermforecasts_partialupload(management_unit_id, week_date_id, body) Import a short term forecast Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shorttermforecasts/partialupload Requires ANY permissions: * wfm:shortTermForecast:add ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The management unit ID of the management unit to which the forecast belongs week_date_id = "week_date_id_example" # String | The week start date of the forecast in yyyy-MM-dd format body = PureCloud::RouteGroupList.new # RouteGroupList | body begin #Import a short term forecast result = api_instance.post_workforcemanagement_managementunit_week_shorttermforecasts_partialupload(management_unit_id, week_date_id, body) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_week_shorttermforecasts_partialupload: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The management unit ID of the management unit to which the forecast belongs | | **week_date_id** | **String**| The week start date of the forecast in yyyy-MM-dd format | | **body** | [**RouteGroupList**](RouteGroupList.html)| body | | {: class="table table-striped"} ### Return type [**PartialUploadResponse**](PartialUploadResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**WorkPlan**](WorkPlan.html) post_workforcemanagement_managementunit_workplan_copy(management_unit_id, work_plan_id, opts) Create a copy of work plan Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/workplans/{workPlanId}/copy Requires ANY permissions: * wfm:workPlan:add ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. work_plan_id = "work_plan_id_example" # String | The ID of the work plan to create a copy opts = { body: PureCloud::CopyWorkPlan.new # CopyWorkPlan | body } begin #Create a copy of work plan result = api_instance.post_workforcemanagement_managementunit_workplan_copy(management_unit_id, work_plan_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_workplan_copy: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **work_plan_id** | **String**| The ID of the work plan to create a copy | | **body** | [**CopyWorkPlan**](CopyWorkPlan.html)| body | [optional] | {: class="table table-striped"} ### Return type [**WorkPlan**](WorkPlan.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**WorkPlan**](WorkPlan.html) post_workforcemanagement_managementunit_workplans(management_unit_id, opts) Create a new work plan Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/workplans Requires ANY permissions: * wfm:workPlan:add ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. opts = { body: PureCloud::CreateWorkPlan.new # CreateWorkPlan | body } begin #Create a new work plan result = api_instance.post_workforcemanagement_managementunit_workplans(management_unit_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_workplans: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **body** | [**CreateWorkPlan**](CreateWorkPlan.html)| body | [optional] | {: class="table table-striped"} ### Return type [**WorkPlan**](WorkPlan.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ManagementUnit**](ManagementUnit.html) post_workforcemanagement_managementunits(opts) Add a management unit Wraps POST /api/v2/workforcemanagement/managementunits Requires ANY permissions: * wfm:managementUnit:add ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new opts = { body: PureCloud::CreateManagementUnitApiRequest.new # CreateManagementUnitApiRequest | body } begin #Add a management unit result = api_instance.post_workforcemanagement_managementunits(opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunits: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**CreateManagementUnitApiRequest**](CreateManagementUnitApiRequest.html)| body | [optional] | {: class="table table-striped"} ### Return type [**ManagementUnit**](ManagementUnit.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**UpdateNotificationsResponse**](UpdateNotificationsResponse.html) post_workforcemanagement_notifications_update(opts) Mark a list of notifications as read or unread Wraps POST /api/v2/workforcemanagement/notifications/update Requires NO permissions: ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new opts = { body: PureCloud::UpdateNotificationsRequest.new # UpdateNotificationsRequest | body } begin #Mark a list of notifications as read or unread result = api_instance.post_workforcemanagement_notifications_update(opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_notifications_update: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**UpdateNotificationsRequest**](UpdateNotificationsRequest.html)| body | [optional] | {: class="table table-striped"} ### Return type [**UpdateNotificationsResponse**](UpdateNotificationsResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**UserScheduleContainer**](UserScheduleContainer.html) post_workforcemanagement_schedules(opts) Get published schedule for the current user Wraps POST /api/v2/workforcemanagement/schedules Requires ANY permissions: * wfm:agentSchedule:view * wfm:publishedSchedule:view ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new opts = { body: PureCloud::CurrentUserScheduleRequestBody.new # CurrentUserScheduleRequestBody | body } begin #Get published schedule for the current user result = api_instance.post_workforcemanagement_schedules(opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_schedules: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**CurrentUserScheduleRequestBody**](CurrentUserScheduleRequestBody.html)| body | [optional] | {: class="table table-striped"} ### Return type [**UserScheduleContainer**](UserScheduleContainer.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**TimeOffRequestResponse**](TimeOffRequestResponse.html) post_workforcemanagement_timeoffrequests(opts) Create a time off request for the current user Wraps POST /api/v2/workforcemanagement/timeoffrequests Requires ANY permissions: * wfm:agentTimeOffRequest:submit ### Example ```{"language":"ruby"} # load the gem require 'purecloudplatformclientv2' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::WorkforceManagementApi.new opts = { body: PureCloud::CreateAgentTimeOffRequest.new # CreateAgentTimeOffRequest | body } begin #Create a time off request for the current user result = api_instance.post_workforcemanagement_timeoffrequests(opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_timeoffrequests: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**CreateAgentTimeOffRequest**](CreateAgentTimeOffRequest.html)| body | [optional] | {: class="table table-striped"} ### Return type [**TimeOffRequestResponse**](TimeOffRequestResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json