--- title: WorkforceManagementApi --- :::error **The Ruby SDK is deprecated as of 9/16/2020** The Genesys Cloud Ruby SDK (v96.0.0) will be frozen at its current version level. Any new enhancements to our API or bug fixes will not be backported. If you do need to take advantage of new features or bug fixes outside the Genesys Cloud Ruby SDK, you will need to use the Genesys Cloud REST endpoints directly. More information can be found in the [Official Announcement](https://developer.mypurecloud.com/forum/t/announcement-genesys-cloud-ruby-sdk-end-of-life/8850). ::: ## PureCloud::WorkforceManagementApi All URIs are relative to *https://api.mypurecloud.com* Method | Description ------------- | ------------- | ------------- [**delete_workforcemanagement_businessunit**](WorkforceManagementApi.html#delete_workforcemanagement_businessunit) | Delete business unit [**delete_workforcemanagement_businessunit_activitycode**](WorkforceManagementApi.html#delete_workforcemanagement_businessunit_activitycode) | Deletes an activity code [**delete_workforcemanagement_businessunit_planninggroup**](WorkforceManagementApi.html#delete_workforcemanagement_businessunit_planninggroup) | Deletes the planning group [**delete_workforcemanagement_businessunit_scheduling_run**](WorkforceManagementApi.html#delete_workforcemanagement_businessunit_scheduling_run) | Cancel a scheduling run [**delete_workforcemanagement_businessunit_servicegoaltemplate**](WorkforceManagementApi.html#delete_workforcemanagement_businessunit_servicegoaltemplate) | Delete a service goal template [**delete_workforcemanagement_businessunit_week_schedule**](WorkforceManagementApi.html#delete_workforcemanagement_businessunit_week_schedule) | Delete a schedule [**delete_workforcemanagement_businessunit_week_shorttermforecast**](WorkforceManagementApi.html#delete_workforcemanagement_businessunit_week_shorttermforecast) | Delete a short term forecast [**delete_workforcemanagement_managementunit**](WorkforceManagementApi.html#delete_workforcemanagement_managementunit) | Delete management unit [**delete_workforcemanagement_managementunit_activitycode**](WorkforceManagementApi.html#delete_workforcemanagement_managementunit_activitycode) | Deprecated/Gone: Use the new business unit activity code resources [**delete_workforcemanagement_managementunit_scheduling_run**](WorkforceManagementApi.html#delete_workforcemanagement_managementunit_scheduling_run) | Gone. Scheduling has moved under business units [**delete_workforcemanagement_managementunit_servicegoalgroup**](WorkforceManagementApi.html#delete_workforcemanagement_managementunit_servicegoalgroup) | Gone. Replaced with service goal templates and planning groups under business units [**delete_workforcemanagement_managementunit_week_schedule**](WorkforceManagementApi.html#delete_workforcemanagement_managementunit_week_schedule) | Gone. Scheduling has moved under business units [**delete_workforcemanagement_managementunit_week_shorttermforecast**](WorkforceManagementApi.html#delete_workforcemanagement_managementunit_week_shorttermforecast) | Gone. Use equivalent business unit resource instead [**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_businessunit**](WorkforceManagementApi.html#get_workforcemanagement_businessunit) | Get business unit [**get_workforcemanagement_businessunit_activitycode**](WorkforceManagementApi.html#get_workforcemanagement_businessunit_activitycode) | Get an activity code [**get_workforcemanagement_businessunit_activitycodes**](WorkforceManagementApi.html#get_workforcemanagement_businessunit_activitycodes) | Get activity codes [**get_workforcemanagement_businessunit_intraday_planninggroups**](WorkforceManagementApi.html#get_workforcemanagement_businessunit_intraday_planninggroups) | Get intraday planning groups for the given date [**get_workforcemanagement_businessunit_managementunits**](WorkforceManagementApi.html#get_workforcemanagement_businessunit_managementunits) | Get all authorized management units in the business unit [**get_workforcemanagement_businessunit_planninggroup**](WorkforceManagementApi.html#get_workforcemanagement_businessunit_planninggroup) | Get a planning group [**get_workforcemanagement_businessunit_planninggroups**](WorkforceManagementApi.html#get_workforcemanagement_businessunit_planninggroups) | Gets list of planning groups [**get_workforcemanagement_businessunit_scheduling_run**](WorkforceManagementApi.html#get_workforcemanagement_businessunit_scheduling_run) | Get a scheduling run [**get_workforcemanagement_businessunit_scheduling_run_result**](WorkforceManagementApi.html#get_workforcemanagement_businessunit_scheduling_run_result) | Get the result of a rescheduling operation [**get_workforcemanagement_businessunit_scheduling_runs**](WorkforceManagementApi.html#get_workforcemanagement_businessunit_scheduling_runs) | Get the list of scheduling runs [**get_workforcemanagement_businessunit_servicegoaltemplate**](WorkforceManagementApi.html#get_workforcemanagement_businessunit_servicegoaltemplate) | Get a service goal template [**get_workforcemanagement_businessunit_servicegoaltemplates**](WorkforceManagementApi.html#get_workforcemanagement_businessunit_servicegoaltemplates) | Gets list of service goal templates [**get_workforcemanagement_businessunit_week_schedule**](WorkforceManagementApi.html#get_workforcemanagement_businessunit_week_schedule) | Get the metadata for the schedule, describing which management units and agents are in the scheduleSchedule data can then be loaded with the query route [**get_workforcemanagement_businessunit_week_schedule_generationresults**](WorkforceManagementApi.html#get_workforcemanagement_businessunit_week_schedule_generationresults) | Get the generation results for a generated schedule [**get_workforcemanagement_businessunit_week_schedule_headcountforecast**](WorkforceManagementApi.html#get_workforcemanagement_businessunit_week_schedule_headcountforecast) | Get the headcount forecast by planning group for the schedule [**get_workforcemanagement_businessunit_week_schedules**](WorkforceManagementApi.html#get_workforcemanagement_businessunit_week_schedules) | Get the list of week schedules for the specified week [**get_workforcemanagement_businessunit_week_shorttermforecast**](WorkforceManagementApi.html#get_workforcemanagement_businessunit_week_shorttermforecast) | Get a short term forecast [**get_workforcemanagement_businessunit_week_shorttermforecast_data**](WorkforceManagementApi.html#get_workforcemanagement_businessunit_week_shorttermforecast_data) | Get the result of a short term forecast calculation [**get_workforcemanagement_businessunit_week_shorttermforecast_generationresults**](WorkforceManagementApi.html#get_workforcemanagement_businessunit_week_shorttermforecast_generationresults) | Gets the forecast generation results [**get_workforcemanagement_businessunit_week_shorttermforecast_planninggroups**](WorkforceManagementApi.html#get_workforcemanagement_businessunit_week_shorttermforecast_planninggroups) | Gets the forecast planning group snapshot [**get_workforcemanagement_businessunit_week_shorttermforecasts**](WorkforceManagementApi.html#get_workforcemanagement_businessunit_week_shorttermforecasts) | Get short term forecasts [**get_workforcemanagement_businessunits**](WorkforceManagementApi.html#get_workforcemanagement_businessunits) | Get business units [**get_workforcemanagement_businessunits_divisionviews**](WorkforceManagementApi.html#get_workforcemanagement_businessunits_divisionviews) | Get business units across divisions [**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_adherence**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_adherence) | Get a list of user schedule adherence records for the requested management unit [**get_workforcemanagement_managementunit_agent**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_agent) | Get data for agent in the management unit [**get_workforcemanagement_managementunit_agent_shifttrades**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_agent_shifttrades) | Gets all the shift trades for a given agent [**get_workforcemanagement_managementunit_intraday_queues**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_intraday_queues) | Gone. Moved under business units [**get_workforcemanagement_managementunit_scheduling_run**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_scheduling_run) | Gone. Scheduling has moved under business units [**get_workforcemanagement_managementunit_scheduling_run_result**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_scheduling_run_result) | Gone. Scheduling has moved under business units [**get_workforcemanagement_managementunit_scheduling_runs**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_scheduling_runs) | Gone. Scheduling has moved under business units [**get_workforcemanagement_managementunit_servicegoalgroup**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_servicegoalgroup) | Gone. Replaced with service goal templates and planning groups under business units [**get_workforcemanagement_managementunit_servicegoalgroups**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_servicegoalgroups) | Gone. Replaced with service goal templates and planning groups under business units [**get_workforcemanagement_managementunit_settings**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_settings) | Gone. Get management unit settings via expand parameters on the GET management unit [**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) | Deprecated. Use the equivalent business unit resource instead. Get a week schedule [**get_workforcemanagement_managementunit_week_schedule_generationresults**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_week_schedule_generationresults) | Gone. Scheduling has moved under business units [**get_workforcemanagement_managementunit_week_schedules**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_week_schedules) | Deprecated. Use the equivalent business unit resource instead. Get the list of schedules in a week in management unit [**get_workforcemanagement_managementunit_week_shifttrades**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_week_shifttrades) | Gets all the shift trades for a given week [**get_workforcemanagement_managementunit_week_shorttermforecast_final**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_week_shorttermforecast_final) | Gone. Use equivalent business unit resource instead [**get_workforcemanagement_managementunit_week_shorttermforecasts**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_week_shorttermforecasts) | Gone. Use equivalent business unit resource instead [**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_businessunit**](WorkforceManagementApi.html#patch_workforcemanagement_businessunit) | Update business unit [**patch_workforcemanagement_businessunit_activitycode**](WorkforceManagementApi.html#patch_workforcemanagement_businessunit_activitycode) | Update an activity code [**patch_workforcemanagement_businessunit_planninggroup**](WorkforceManagementApi.html#patch_workforcemanagement_businessunit_planninggroup) | Updates the planning group [**patch_workforcemanagement_businessunit_scheduling_run**](WorkforceManagementApi.html#patch_workforcemanagement_businessunit_scheduling_run) | Mark a schedule run as applied [**patch_workforcemanagement_businessunit_servicegoaltemplate**](WorkforceManagementApi.html#patch_workforcemanagement_businessunit_servicegoaltemplate) | Updates a service goal template [**patch_workforcemanagement_managementunit**](WorkforceManagementApi.html#patch_workforcemanagement_managementunit) | Update the requested management unit [**patch_workforcemanagement_managementunit_activitycode**](WorkforceManagementApi.html#patch_workforcemanagement_managementunit_activitycode) | Deprecated/Gone: Use the new business unit activity code resources [**patch_workforcemanagement_managementunit_scheduling_run**](WorkforceManagementApi.html#patch_workforcemanagement_managementunit_scheduling_run) | Gone. Scheduling has moved under business units [**patch_workforcemanagement_managementunit_servicegoalgroup**](WorkforceManagementApi.html#patch_workforcemanagement_managementunit_servicegoalgroup) | Gone. Replaced with service goal templates and planning groups under business units [**patch_workforcemanagement_managementunit_settings**](WorkforceManagementApi.html#patch_workforcemanagement_managementunit_settings) | Gone. Update settings by PATCHing the 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) | Gone. Scheduling has moved under business units [**patch_workforcemanagement_managementunit_week_shifttrade**](WorkforceManagementApi.html#patch_workforcemanagement_managementunit_week_shifttrade) | Updates a shift trade. This route can only be called by the initiating agent [**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_agentschedules_mine**](WorkforceManagementApi.html#post_workforcemanagement_agentschedules_mine) | Get published schedule for the current user [**post_workforcemanagement_businessunit_activitycodes**](WorkforceManagementApi.html#post_workforcemanagement_businessunit_activitycodes) | Create a new activity code [**post_workforcemanagement_businessunit_agentschedules_search**](WorkforceManagementApi.html#post_workforcemanagement_businessunit_agentschedules_search) | Search published schedules [**post_workforcemanagement_businessunit_intraday**](WorkforceManagementApi.html#post_workforcemanagement_businessunit_intraday) | Get intraday data for the given date for the requested planningGroupIds [**post_workforcemanagement_businessunit_planninggroups**](WorkforceManagementApi.html#post_workforcemanagement_businessunit_planninggroups) | Adds a new planning group [**post_workforcemanagement_businessunit_servicegoaltemplates**](WorkforceManagementApi.html#post_workforcemanagement_businessunit_servicegoaltemplates) | Adds a new service goal template [**post_workforcemanagement_businessunit_week_schedule_agentschedules_query**](WorkforceManagementApi.html#post_workforcemanagement_businessunit_week_schedule_agentschedules_query) | Loads agent schedule data from the schedule. Used in combination with the metadata route [**post_workforcemanagement_businessunit_week_schedule_copy**](WorkforceManagementApi.html#post_workforcemanagement_businessunit_week_schedule_copy) | Copy a schedule [**post_workforcemanagement_businessunit_week_schedule_reschedule**](WorkforceManagementApi.html#post_workforcemanagement_businessunit_week_schedule_reschedule) | Start a rescheduling run [**post_workforcemanagement_businessunit_week_schedules**](WorkforceManagementApi.html#post_workforcemanagement_businessunit_week_schedules) | Create a blank schedule [**post_workforcemanagement_businessunit_week_schedules_generate**](WorkforceManagementApi.html#post_workforcemanagement_businessunit_week_schedules_generate) | Generate a schedule [**post_workforcemanagement_businessunit_week_shorttermforecast_copy**](WorkforceManagementApi.html#post_workforcemanagement_businessunit_week_shorttermforecast_copy) | Copy a short term forecast [**post_workforcemanagement_businessunit_week_shorttermforecasts_generate**](WorkforceManagementApi.html#post_workforcemanagement_businessunit_week_shorttermforecasts_generate) | Generate a short term forecast [**post_workforcemanagement_businessunits**](WorkforceManagementApi.html#post_workforcemanagement_businessunits) | Add a new business unit [**post_workforcemanagement_managementunit_activitycodes**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_activitycodes) | Deprecated/Gone: Use the new business unit activity code resources [**post_workforcemanagement_managementunit_agentschedules_search**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_agentschedules_search) | Query published schedules for given given time range for set of users [**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) | Gone. Moved under business units [**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) | Gone. Replaced with service goal templates and planning groups under business units [**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) | Gone. All data is now returned in the query route [**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) | Gone. Scheduling has moved under business units [**post_workforcemanagement_managementunit_week_schedule_reschedule**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_week_schedule_reschedule) | Gone. Scheduling has moved under business units [**post_workforcemanagement_managementunit_week_schedules**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_week_schedules) | Gone. Scheduling has moved under business units [**post_workforcemanagement_managementunit_week_schedules_generate**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_week_schedules_generate) | Gone. Scheduling has moved under business units [**post_workforcemanagement_managementunit_week_schedules_partialupload**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_week_schedules_partialupload) | Gone. Scheduling has moved under business units [**post_workforcemanagement_managementunit_week_shifttrade_match**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_week_shifttrade_match) | Matches a shift trade. This route can only be called by the receiving agent [**post_workforcemanagement_managementunit_week_shifttrades**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_week_shifttrades) | Adds a shift trade [**post_workforcemanagement_managementunit_week_shifttrades_search**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_week_shifttrades_search) | Searches for potential shift trade matches for the current agent [**post_workforcemanagement_managementunit_week_shifttrades_state_bulk**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_week_shifttrades_state_bulk) | Updates the state of a batch of shift trades [**post_workforcemanagement_managementunit_week_shorttermforecast_copy**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_week_shorttermforecast_copy) | Gone. Use equivalent business unit resource instead [**post_workforcemanagement_managementunit_week_shorttermforecasts**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_week_shorttermforecasts) | Gone. Use equivalent business unit resource instead [**post_workforcemanagement_managementunit_week_shorttermforecasts_generate**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_week_shorttermforecasts_generate) | Gone. Use equivalent business unit resource instead [**post_workforcemanagement_managementunit_week_shorttermforecasts_partialupload**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_week_shorttermforecasts_partialupload) | Gone. Use equivalent business unit resource instead [**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_businessunit(business_unit_id) Delete business unit A business unit cannot be deleted if it contains one or more management units Wraps DELETE /api/v2/workforcemanagement/businessunits/{businessUnitId} Requires ANY permissions: * wfm:businessUnit: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 business_unit_id = "business_unit_id_example" # String | The ID of the business unit, or 'mine' for the business unit of the logged-in user. begin #Delete business unit api_instance.delete_workforcemanagement_businessunit(business_unit_id) rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->delete_workforcemanagement_businessunit: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The ID of the business unit, or 'mine' for the business 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_businessunit_activitycode(bu_id, ac_id) Deletes an activity code Wraps DELETE /api/v2/workforcemanagement/businessunits/{buId}/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 bu_id = "bu_id_example" # String | The ID of the business unit, or 'mine' for the business 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_businessunit_activitycode(bu_id, ac_id) rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->delete_workforcemanagement_businessunit_activitycode: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bu_id** | **String**| The ID of the business unit, or 'mine' for the business 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_businessunit_planninggroup(business_unit_id, planning_group_id) Deletes the planning group Wraps DELETE /api/v2/workforcemanagement/businessunits/{businessUnitId}/planninggroups/{planningGroupId} Requires ANY permissions: * wfm:planningGroup: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 business_unit_id = "business_unit_id_example" # String | The ID of the business unit. planning_group_id = "planning_group_id_example" # String | The ID of a planning group to delete begin #Deletes the planning group api_instance.delete_workforcemanagement_businessunit_planninggroup(business_unit_id, planning_group_id) rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->delete_workforcemanagement_businessunit_planninggroup: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The ID of the business unit. | | **planning_group_id** | **String**| The ID of a planning 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_businessunit_scheduling_run(business_unit_id, run_id) Cancel a scheduling run Wraps DELETE /api/v2/workforcemanagement/businessunits/{businessUnitId}/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 business_unit_id = "business_unit_id_example" # String | The ID of the business unit run_id = "run_id_example" # String | The ID of the schedule run begin #Cancel a scheduling run api_instance.delete_workforcemanagement_businessunit_scheduling_run(business_unit_id, run_id) rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->delete_workforcemanagement_businessunit_scheduling_run: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The ID of the business 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_businessunit_servicegoaltemplate(business_unit_id, service_goal_template_id) Delete a service goal template Wraps DELETE /api/v2/workforcemanagement/businessunits/{businessUnitId}/servicegoaltemplates/{serviceGoalTemplateId} Requires ANY permissions: * wfm:serviceGoalTemplate: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 business_unit_id = "business_unit_id_example" # String | The ID of the business unit. service_goal_template_id = "service_goal_template_id_example" # String | The ID of the service goal template to delete begin #Delete a service goal template api_instance.delete_workforcemanagement_businessunit_servicegoaltemplate(business_unit_id, service_goal_template_id) rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->delete_workforcemanagement_businessunit_servicegoaltemplate: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The ID of the business unit. | | **service_goal_template_id** | **String**| The ID of the service goal template to delete | | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**BuAsyncScheduleResponse**](BuAsyncScheduleResponse.html) delete_workforcemanagement_businessunit_week_schedule(business_unit_id, week_id, schedule_id) Delete a schedule Wraps DELETE /api/v2/workforcemanagement/businessunits/{businessUnitId}/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 business_unit_id = "business_unit_id_example" # String | The ID of the business unit week_id = Date.parse("2013-10-20") # Date | First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd schedule_id = "schedule_id_example" # String | The ID of the schedule begin #Delete a schedule result = api_instance.delete_workforcemanagement_businessunit_week_schedule(business_unit_id, week_id, schedule_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->delete_workforcemanagement_businessunit_week_schedule: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The ID of the business unit | | **week_id** | **Date**| First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd | | **schedule_id** | **String**| The ID of the schedule | | {: class="table table-striped"} ### Return type [**BuAsyncScheduleResponse**](BuAsyncScheduleResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## delete_workforcemanagement_businessunit_week_shorttermforecast(business_unit_id, week_date_id, forecast_id) Delete a short term forecast Must not be tied to any schedules Wraps DELETE /api/v2/workforcemanagement/businessunits/{businessUnitId}/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 business_unit_id = "business_unit_id_example" # String | The business unit ID of the business unit to which the forecast belongs week_date_id = Date.parse("2013-10-20") # Date | The week start date of the forecast in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd forecast_id = "forecast_id_example" # String | The ID of the forecast begin #Delete a short term forecast api_instance.delete_workforcemanagement_businessunit_week_shorttermforecast(business_unit_id, week_date_id, forecast_id) rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->delete_workforcemanagement_businessunit_week_shorttermforecast: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The business unit ID of the business unit to which the forecast belongs | | **week_date_id** | **Date**| The week start date of the forecast in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd | | **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(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) DEPRECATED Deprecated/Gone: Use the new business unit activity code resources Wraps DELETE /api/v2/workforcemanagement/managementunits/{muId}/activitycodes/{acId} 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 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 #Deprecated/Gone: Use the new business unit activity code resources 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) DEPRECATED Gone. Scheduling has moved under business units Wraps DELETE /api/v2/workforcemanagement/managementunits/{managementUnitId}/scheduling/runs/{runId} 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 management_unit_id = "management_unit_id_example" # String | (Deprecated/gone): The ID of the management unit. run_id = "run_id_example" # String | The ID of the schedule run begin #Gone. Scheduling has moved under business units 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**| (Deprecated/gone): 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) DEPRECATED Gone. Replaced with service goal templates and planning groups under business units Wraps DELETE /api/v2/workforcemanagement/managementunits/{managementUnitId}/servicegoalgroups/{serviceGoalGroupId} 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 management_unit_id = "management_unit_id_example" # String | (Deprecated/gone): 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 | Gone. The ID of the service goal group to delete begin #Gone. Replaced with service goal templates and planning groups under business units 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**| (Deprecated/gone): The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **service_goal_group_id** | **String**| Gone. 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) DEPRECATED Gone. Scheduling has moved under business units Wraps DELETE /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekId}/schedules/{scheduleId} 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 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 | Gone/deprecated. The ID of the schedule to delete begin #Gone. Scheduling has moved under business units 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**| Gone/deprecated. The ID of the schedule 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) DEPRECATED Gone. Use equivalent business unit resource instead Wraps DELETE /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shorttermforecasts/{forecastId} 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 management_unit_id = "management_unit_id_example" # String | (Deprecated/gone): The id of the management unit. week_date_id = "week_date_id_example" # String | (Deprecated/gone): The week start date of the forecast in yyyy-MM-dd format forecast_id = "forecast_id_example" # String | (Gone/Deprecated): The ID of the forecast begin #Gone. Use equivalent business unit resource instead 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**| (Deprecated/gone): The id of the management unit. | | **week_date_id** | **String**| (Deprecated/gone): The week start date of the forecast in yyyy-MM-dd format | | **forecast_id** | **String**| (Gone/Deprecated): 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 ## [**BusinessUnit**](BusinessUnit.html) get_workforcemanagement_businessunit(business_unit_id, opts) Get business unit Expanding \"settings\" will retrieve all settings. All other expands will retrieve only the requested settings field(s). Wraps GET /api/v2/workforcemanagement/businessunits/{businessUnitId} 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:serviceGoalTemplate:add * wfm:serviceGoalTemplate:delete * wfm:serviceGoalTemplate:edit * wfm:serviceGoalTemplate:view * wfm:planningGroup:add * wfm:planningGroup:delete * wfm:planningGroup:edit * wfm:planningGroup: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 * wfm:workPlanRotation:add * wfm:workPlanRotation:delete * wfm:workPlanRotation:edit * wfm:workPlanRotation:view * coaching:appointment:add * coaching:appointment: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 business_unit_id = "business_unit_id_example" # String | The ID of the business unit, or 'mine' for the business unit of the logged-in user. opts = { expand: ["expand_example"] # Array | } begin #Get business unit result = api_instance.get_workforcemanagement_businessunit(business_unit_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The ID of the business unit, or 'mine' for the business unit of the logged-in user. | | **expand** | [**Array<String>**](String.html)| | [optional]
**Values**: settings, settings.timeZone, settings.startDayOfWeek, settings.shortTermForecasting | {: class="table table-striped"} ### Return type [**BusinessUnit**](BusinessUnit.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**BusinessUnitActivityCode**](BusinessUnitActivityCode.html) get_workforcemanagement_businessunit_activitycode(bu_id, ac_id) Get an activity code Wraps GET /api/v2/workforcemanagement/businessunits/{buId}/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 bu_id = "bu_id_example" # String | The ID of the business unit, or 'mine' for the business 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_businessunit_activitycode(bu_id, ac_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_activitycode: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bu_id** | **String**| The ID of the business unit, or 'mine' for the business unit of the logged-in user. | | **ac_id** | **String**| The ID of the activity code to fetch | | {: class="table table-striped"} ### Return type [**BusinessUnitActivityCode**](BusinessUnitActivityCode.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**BusinessUnitActivityCodeListing**](BusinessUnitActivityCodeListing.html) get_workforcemanagement_businessunit_activitycodes(bu_id) Get activity codes Wraps GET /api/v2/workforcemanagement/businessunits/{buId}/activitycodes Requires ANY permissions: * wfm:agentSchedule:view * wfm:agentTimeOffRequest:submit * wfm:activityCode:add * wfm:activityCode:delete * wfm:activityCode:edit * wfm:activityCode:view * wfm:agent:edit * 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:realtimeAdherence:view * wfm:schedule:add * wfm:schedule:delete * wfm:schedule:edit * wfm:schedule:generate * wfm:schedule:view * wfm:publishedSchedule:view * wfm:serviceGoalTemplate:add * wfm:serviceGoalTemplate:delete * wfm:serviceGoalTemplate:edit * wfm:serviceGoalTemplate:view * wfm:planningGroup:add * wfm:planningGroup:delete * wfm:planningGroup:edit * wfm:planningGroup:view * wfm:shiftTradeRequest:edit * wfm:shiftTradeRequest: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 bu_id = "bu_id_example" # String | The ID of the business unit, or 'mine' for the business unit of the logged-in user. begin #Get activity codes result = api_instance.get_workforcemanagement_businessunit_activitycodes(bu_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_activitycodes: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bu_id** | **String**| The ID of the business unit, or 'mine' for the business unit of the logged-in user. | | {: class="table table-striped"} ### Return type [**BusinessUnitActivityCodeListing**](BusinessUnitActivityCodeListing.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**WfmIntradayPlanningGroupListing**](WfmIntradayPlanningGroupListing.html) get_workforcemanagement_businessunit_intraday_planninggroups(business_unit_id, date) Get intraday planning groups for the given date Wraps GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/intraday/planninggroups 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 business_unit_id = "business_unit_id_example" # String | The business unit ID of the business unit date = Date.parse("2013-10-20") # Date | yyyy-MM-dd date string interpreted in the configured business unit time zone. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd begin #Get intraday planning groups for the given date result = api_instance.get_workforcemanagement_businessunit_intraday_planninggroups(business_unit_id, date) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_intraday_planninggroups: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The business unit ID of the business unit | | **date** | **Date**| yyyy-MM-dd date string interpreted in the configured business unit time zone. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd | | {: class="table table-striped"} ### Return type [**WfmIntradayPlanningGroupListing**](WfmIntradayPlanningGroupListing.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ManagementUnitListing**](ManagementUnitListing.html) get_workforcemanagement_businessunit_managementunits(business_unit_id, opts) Get all authorized management units in the business unit Wraps GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/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 business_unit_id = "business_unit_id_example" # String | The ID of the business unit, or 'mine' for the business unit of the logged-in user. opts = { feature: "feature_example", # String | division_id: "division_id_example" # String | } begin #Get all authorized management units in the business unit result = api_instance.get_workforcemanagement_businessunit_managementunits(business_unit_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_managementunits: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The ID of the business unit, or 'mine' for the business unit of the logged-in user. | | **feature** | **String**| | [optional]
**Values**: AgentSchedule, AgentTimeOffRequest, Coaching, ActivityCodes, Agents, BuActivityCodes, BusinessUnits, HistoricalAdherence, IntradayMonitoring, BuIntradayMonitoring, ManagementUnits, RealTimeAdherence, Schedules, BuSchedules, ServiceGoalGroups, ServiceGoalTemplates, PlanningGroups, ShiftTrading, ShortTermForecasts, BuShortTermForecasts, TimeOffRequests, WorkPlanRotations, WorkPlans | **division_id** | **String**| | [optional] | {: class="table table-striped"} ### Return type [**ManagementUnitListing**](ManagementUnitListing.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**PlanningGroup**](PlanningGroup.html) get_workforcemanagement_businessunit_planninggroup(business_unit_id, planning_group_id) Get a planning group Wraps GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/planninggroups/{planningGroupId} Requires ANY permissions: * wfm:planningGroup: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 business_unit_id = "business_unit_id_example" # String | The ID of the business unit. planning_group_id = "planning_group_id_example" # String | The ID of a planning group to fetch begin #Get a planning group result = api_instance.get_workforcemanagement_businessunit_planninggroup(business_unit_id, planning_group_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_planninggroup: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The ID of the business unit. | | **planning_group_id** | **String**| The ID of a planning group to fetch | | {: class="table table-striped"} ### Return type [**PlanningGroup**](PlanningGroup.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**PlanningGroupList**](PlanningGroupList.html) get_workforcemanagement_businessunit_planninggroups(business_unit_id) Gets list of planning groups Wraps GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/planninggroups Requires ANY permissions: * wfm:planningGroup:view * wfm:shortTermForecast:view * wfm:intraday:view * wfm:agent:view * wfm:schedule: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 business_unit_id = "business_unit_id_example" # String | The ID of the business unit. begin #Gets list of planning groups result = api_instance.get_workforcemanagement_businessunit_planninggroups(business_unit_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_planninggroups: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The ID of the business unit. | | {: class="table table-striped"} ### Return type [**PlanningGroupList**](PlanningGroupList.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**BuScheduleRun**](BuScheduleRun.html) get_workforcemanagement_businessunit_scheduling_run(business_unit_id, run_id) Get a scheduling run Wraps GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/scheduling/runs/{runId} Requires ANY permissions: * wfm:schedule:generate * 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 business_unit_id = "business_unit_id_example" # String | The ID of the business unit run_id = "run_id_example" # String | The ID of the schedule run begin #Get a scheduling run result = api_instance.get_workforcemanagement_businessunit_scheduling_run(business_unit_id, run_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_scheduling_run: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The ID of the business unit | | **run_id** | **String**| The ID of the schedule run | | {: class="table table-striped"} ### Return type [**BuScheduleRun**](BuScheduleRun.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**BuRescheduleResult**](BuRescheduleResult.html) get_workforcemanagement_businessunit_scheduling_run_result(business_unit_id, run_id, management_unit_ids, expand) Get the result of a rescheduling operation Wraps GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/scheduling/runs/{runId}/result Requires ANY permissions: * wfm:schedule:edit * 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 business_unit_id = "business_unit_id_example" # String | The ID of the business unit run_id = "run_id_example" # String | The ID of the schedule run management_unit_ids = ["management_unit_ids_example"] # Array | The IDs of the management units for which to fetch the reschedule results expand = ["expand_example"] # Array | The fields to expand. Omitting will return an empty response begin #Get the result of a rescheduling operation result = api_instance.get_workforcemanagement_businessunit_scheduling_run_result(business_unit_id, run_id, management_unit_ids, expand) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_scheduling_run_result: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The ID of the business unit | | **run_id** | **String**| The ID of the schedule run | | **management_unit_ids** | [**Array<String>**](String.html)| The IDs of the management units for which to fetch the reschedule results | | **expand** | [**Array<String>**](String.html)| The fields to expand. Omitting will return an empty response |
**Values**: headcountForecast, generationResults, agentSchedules | {: class="table table-striped"} ### Return type [**BuRescheduleResult**](BuRescheduleResult.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**BuScheduleRunListing**](BuScheduleRunListing.html) get_workforcemanagement_businessunit_scheduling_runs(business_unit_id) Get the list of scheduling runs Wraps GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/scheduling/runs Requires ANY permissions: * wfm:schedule:generate * 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 business_unit_id = "business_unit_id_example" # String | The ID of the business unit begin #Get the list of scheduling runs result = api_instance.get_workforcemanagement_businessunit_scheduling_runs(business_unit_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_scheduling_runs: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The ID of the business unit | | {: class="table table-striped"} ### Return type [**BuScheduleRunListing**](BuScheduleRunListing.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ServiceGoalTemplate**](ServiceGoalTemplate.html) get_workforcemanagement_businessunit_servicegoaltemplate(business_unit_id, service_goal_template_id) Get a service goal template Wraps GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/servicegoaltemplates/{serviceGoalTemplateId} Requires ANY permissions: * wfm:serviceGoalTemplate: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 business_unit_id = "business_unit_id_example" # String | The ID of the business unit. service_goal_template_id = "service_goal_template_id_example" # String | The ID of a service goal template to fetch begin #Get a service goal template result = api_instance.get_workforcemanagement_businessunit_servicegoaltemplate(business_unit_id, service_goal_template_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_servicegoaltemplate: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The ID of the business unit. | | **service_goal_template_id** | **String**| The ID of a service goal template to fetch | | {: class="table table-striped"} ### Return type [**ServiceGoalTemplate**](ServiceGoalTemplate.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ServiceGoalTemplateList**](ServiceGoalTemplateList.html) get_workforcemanagement_businessunit_servicegoaltemplates(business_unit_id) Gets list of service goal templates Wraps GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/servicegoaltemplates Requires ANY permissions: * wfm:serviceGoalTemplate:view * wfm:planningGroup: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 business_unit_id = "business_unit_id_example" # String | The ID of the business unit. begin #Gets list of service goal templates result = api_instance.get_workforcemanagement_businessunit_servicegoaltemplates(business_unit_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_servicegoaltemplates: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The ID of the business unit. | | {: class="table table-striped"} ### Return type [**ServiceGoalTemplateList**](ServiceGoalTemplateList.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**BuScheduleMetadata**](BuScheduleMetadata.html) get_workforcemanagement_businessunit_week_schedule(business_unit_id, week_id, schedule_id) Get the metadata for the schedule, describing which management units and agents are in the scheduleSchedule data can then be loaded with the query route Wraps GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekId}/schedules/{scheduleId} Requires ANY permissions: * wfm:schedule: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 business_unit_id = "business_unit_id_example" # String | The ID of the business unit week_id = Date.parse("2013-10-20") # Date | First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd schedule_id = "schedule_id_example" # String | The ID of the schedule begin #Get the metadata for the schedule, describing which management units and agents are in the scheduleSchedule data can then be loaded with the query route result = api_instance.get_workforcemanagement_businessunit_week_schedule(business_unit_id, week_id, schedule_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_week_schedule: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The ID of the business unit | | **week_id** | **Date**| First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd | | **schedule_id** | **String**| The ID of the schedule | | {: class="table table-striped"} ### Return type [**BuScheduleMetadata**](BuScheduleMetadata.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ScheduleGenerationResult**](ScheduleGenerationResult.html) get_workforcemanagement_businessunit_week_schedule_generationresults(business_unit_id, week_id, schedule_id) Get the generation results for a generated schedule Wraps GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekId}/schedules/{scheduleId}/generationresults Requires ANY permissions: * wfm:schedule: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 business_unit_id = "business_unit_id_example" # String | The ID of the business unit week_id = Date.parse("2013-10-20") # Date | First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd schedule_id = "schedule_id_example" # String | The ID of the schedule begin #Get the generation results for a generated schedule result = api_instance.get_workforcemanagement_businessunit_week_schedule_generationresults(business_unit_id, week_id, schedule_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_week_schedule_generationresults: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The ID of the business unit | | **week_id** | **Date**| First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd | | **schedule_id** | **String**| The ID of the schedule | | {: class="table table-striped"} ### Return type [**ScheduleGenerationResult**](ScheduleGenerationResult.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**BuHeadcountForecastResponse**](BuHeadcountForecastResponse.html) get_workforcemanagement_businessunit_week_schedule_headcountforecast(business_unit_id, week_id, schedule_id, opts) Get the headcount forecast by planning group for the schedule Wraps GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekId}/schedules/{scheduleId}/headcountforecast Requires ANY permissions: * wfm:schedule: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 business_unit_id = "business_unit_id_example" # String | The ID of the business unit week_id = Date.parse("2013-10-20") # Date | First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd schedule_id = "schedule_id_example" # String | The ID of the schedule opts = { force_download: true # BOOLEAN | Whether to force the result to come via download url. For testing purposes only } begin #Get the headcount forecast by planning group for the schedule result = api_instance.get_workforcemanagement_businessunit_week_schedule_headcountforecast(business_unit_id, week_id, schedule_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_week_schedule_headcountforecast: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The ID of the business unit | | **week_id** | **Date**| First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd | | **schedule_id** | **String**| The ID of the schedule | | **force_download** | **BOOLEAN**| Whether to force the result to come via download url. For testing purposes only | [optional] | {: class="table table-striped"} ### Return type [**BuHeadcountForecastResponse**](BuHeadcountForecastResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**BuScheduleListing**](BuScheduleListing.html) get_workforcemanagement_businessunit_week_schedules(business_unit_id, week_id, opts) Get the list of week schedules for the specified week Use \"recent\" for the `weekId` path parameter to fetch all forecasts for +/- 26 weeks from the current date. Response will include any schedule which spans the specified week Wraps GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekId}/schedules Requires ANY permissions: * wfm:schedule: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 business_unit_id = "business_unit_id_example" # String | The ID of the business unit week_id = "week_id_example" # String | First day of schedule week in yyyy-MM-dd format, or 'recent' to get recent schedules opts = { include_only_published: true, # BOOLEAN | includeOnlyPublished expand: "expand_example" # String | expand } begin #Get the list of week schedules for the specified week result = api_instance.get_workforcemanagement_businessunit_week_schedules(business_unit_id, week_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_week_schedules: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The ID of the business unit | | **week_id** | **String**| First day of schedule week in yyyy-MM-dd format, or 'recent' to get recent schedules | | **include_only_published** | **BOOLEAN**| includeOnlyPublished | [optional] | **expand** | **String**| expand | [optional]
**Values**: forecast.description | {: class="table table-striped"} ### Return type [**BuScheduleListing**](BuScheduleListing.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**BuShortTermForecast**](BuShortTermForecast.html) get_workforcemanagement_businessunit_week_shorttermforecast(business_unit_id, week_date_id, forecast_id, opts) Get a short term forecast Wraps GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekDateId}/shorttermforecasts/{forecastId} 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 business_unit_id = "business_unit_id_example" # String | The business unit ID of the business unit to which the forecast belongs week_date_id = Date.parse("2013-10-20") # Date | The week start date of the forecast in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd forecast_id = "forecast_id_example" # String | The ID of the forecast opts = { expand: ["expand_example"] # Array | } begin #Get a short term forecast result = api_instance.get_workforcemanagement_businessunit_week_shorttermforecast(business_unit_id, week_date_id, forecast_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_week_shorttermforecast: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The business unit ID of the business unit to which the forecast belongs | | **week_date_id** | **Date**| The week start date of the forecast in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd | | **forecast_id** | **String**| The ID of the forecast | | **expand** | [**Array<String>**](String.html)| | [optional]
**Values**: planningGroups, generationResults | {: class="table table-striped"} ### Return type [**BuShortTermForecast**](BuShortTermForecast.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**BuForecastResultResponse**](BuForecastResultResponse.html) get_workforcemanagement_businessunit_week_shorttermforecast_data(business_unit_id, week_date_id, forecast_id, opts) Get the result of a short term forecast calculation Includes modifications unless you pass the doNotApplyModifications query parameter Wraps GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekDateId}/shorttermforecasts/{forecastId}/data 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 business_unit_id = "business_unit_id_example" # String | The business unit ID of the business unit to which the forecast belongs week_date_id = Date.parse("2013-10-20") # Date | The week start date of the forecast in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd forecast_id = "forecast_id_example" # String | The ID of the forecast opts = { week_number: 56, # Integer | The week number to fetch (for multi-week forecasts) 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 result of a short term forecast calculation result = api_instance.get_workforcemanagement_businessunit_week_shorttermforecast_data(business_unit_id, week_date_id, forecast_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_week_shorttermforecast_data: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The business unit ID of the business unit to which the forecast belongs | | **week_date_id** | **Date**| The week start date of the forecast in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd | | **forecast_id** | **String**| The ID of the forecast | | **week_number** | **Integer**| The week number to fetch (for multi-week forecasts) | [optional] | **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 [**BuForecastResultResponse**](BuForecastResultResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**BuForecastGenerationResult**](BuForecastGenerationResult.html) get_workforcemanagement_businessunit_week_shorttermforecast_generationresults(business_unit_id, week_date_id, forecast_id) Gets the forecast generation results Wraps GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekDateId}/shorttermforecasts/{forecastId}/generationresults 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 business_unit_id = "business_unit_id_example" # String | The business unit ID of the business unit to which the forecast belongs week_date_id = Date.parse("2013-10-20") # Date | The week start date of the forecast in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd forecast_id = "forecast_id_example" # String | The ID of the forecast begin #Gets the forecast generation results result = api_instance.get_workforcemanagement_businessunit_week_shorttermforecast_generationresults(business_unit_id, week_date_id, forecast_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_week_shorttermforecast_generationresults: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The business unit ID of the business unit to which the forecast belongs | | **week_date_id** | **Date**| The week start date of the forecast in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd | | **forecast_id** | **String**| The ID of the forecast | | {: class="table table-striped"} ### Return type [**BuForecastGenerationResult**](BuForecastGenerationResult.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ForecastPlanningGroupsResponse**](ForecastPlanningGroupsResponse.html) get_workforcemanagement_businessunit_week_shorttermforecast_planninggroups(business_unit_id, week_date_id, forecast_id) Gets the forecast planning group snapshot Wraps GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekDateId}/shorttermforecasts/{forecastId}/planninggroups Requires ANY permissions: * wfm:shortTermForecast:view * wfm:schedule: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 business_unit_id = "business_unit_id_example" # String | The business unit ID of the business unit to which the forecast belongs week_date_id = Date.parse("2013-10-20") # Date | The week start date of the forecast in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd forecast_id = "forecast_id_example" # String | The ID of the forecast begin #Gets the forecast planning group snapshot result = api_instance.get_workforcemanagement_businessunit_week_shorttermforecast_planninggroups(business_unit_id, week_date_id, forecast_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_week_shorttermforecast_planninggroups: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The business unit ID of the business unit to which the forecast belongs | | **week_date_id** | **Date**| The week start date of the forecast in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd | | **forecast_id** | **String**| The ID of the forecast | | {: class="table table-striped"} ### Return type [**ForecastPlanningGroupsResponse**](ForecastPlanningGroupsResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**BuShortTermForecastListing**](BuShortTermForecastListing.html) get_workforcemanagement_businessunit_week_shorttermforecasts(business_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. Response will include any forecast which spans the specified week Wraps GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/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 business_unit_id = "business_unit_id_example" # String | The business unit ID of the business 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 or 'recent' to fetch recent forecasts begin #Get short term forecasts result = api_instance.get_workforcemanagement_businessunit_week_shorttermforecasts(business_unit_id, week_date_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_week_shorttermforecasts: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The business unit ID of the business unit to which the forecast belongs | | **week_date_id** | **String**| The week start date of the forecast in yyyy-MM-dd format or 'recent' to fetch recent forecasts | | {: class="table table-striped"} ### Return type [**BuShortTermForecastListing**](BuShortTermForecastListing.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**BusinessUnitListing**](BusinessUnitListing.html) get_workforcemanagement_businessunits(opts) Get business units Wraps GET /api/v2/workforcemanagement/businessunits 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 = { feature: "feature_example", # String | division_id: "division_id_example" # String | } begin #Get business units result = api_instance.get_workforcemanagement_businessunits(opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunits: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **feature** | **String**| | [optional]
**Values**: AgentSchedule, AgentTimeOffRequest, Coaching, ActivityCodes, Agents, BuActivityCodes, BusinessUnits, HistoricalAdherence, IntradayMonitoring, BuIntradayMonitoring, ManagementUnits, RealTimeAdherence, Schedules, BuSchedules, ServiceGoalGroups, ServiceGoalTemplates, PlanningGroups, ShiftTrading, ShortTermForecasts, BuShortTermForecasts, TimeOffRequests, WorkPlanRotations, WorkPlans | **division_id** | **String**| | [optional] | {: class="table table-striped"} ### Return type [**BusinessUnitListing**](BusinessUnitListing.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**BusinessUnitListing**](BusinessUnitListing.html) get_workforcemanagement_businessunits_divisionviews(opts) Get business units across divisions Wraps GET /api/v2/workforcemanagement/businessunits/divisionviews Requires ANY permissions: * wfm:businessUnit: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 business units in all divisions } begin #Get business units across divisions result = api_instance.get_workforcemanagement_businessunits_divisionviews(opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunits_divisionviews: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **division_id** | [**Array<String>**](String.html)| The divisionIds to filter by. If omitted, will return business units in all divisions | [optional] | {: class="table table-striped"} ### Return type [**BusinessUnitListing**](BusinessUnitListing.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:serviceGoalTemplate:add * wfm:serviceGoalTemplate:delete * wfm:serviceGoalTemplate:edit * wfm:serviceGoalTemplate:view * wfm:planningGroup:add * wfm:planningGroup:delete * wfm:planningGroup:edit * wfm:planningGroup: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 * wfm:workPlanRotation:add * wfm:workPlanRotation:delete * wfm:workPlanRotation:edit * wfm:workPlanRotation: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) DEPRECATED 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) DEPRECATED 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 ## [**UserScheduleAdherenceListing**](UserScheduleAdherenceListing.html) get_workforcemanagement_managementunit_adherence(management_unit_id, opts) Get a list of user schedule adherence records for the requested management unit Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/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 management_unit_id = "management_unit_id_example" # String | The management unit ID of the management unit. 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 a list of user schedule adherence records for the requested management unit result = api_instance.get_workforcemanagement_managementunit_adherence(management_unit_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_adherence: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The management unit ID of the management unit. | | **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 [**UserScheduleAdherenceListing**](UserScheduleAdherenceListing.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**WfmAgent**](WfmAgent.html) get_workforcemanagement_managementunit_agent(management_unit_id, agent_id, opts) 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 opts = { exclude_capabilities: true # BOOLEAN | Excludes all capabilities of the agent such as queues, languages, and skills } begin #Get data for agent in the management unit result = api_instance.get_workforcemanagement_managementunit_agent(management_unit_id, agent_id, opts) 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 | | **exclude_capabilities** | **BOOLEAN**| Excludes all capabilities of the agent such as queues, languages, and skills | [optional] | {: class="table table-striped"} ### Return type [**WfmAgent**](WfmAgent.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ShiftTradeListResponse**](ShiftTradeListResponse.html) get_workforcemanagement_managementunit_agent_shifttrades(management_unit_id, agent_id) Gets all the shift trades for a given agent Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/agents/{agentId}/shifttrades Requires ANY permissions: * wfm:shiftTradeRequest:edit * wfm:shiftTradeRequest: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 #Gets all the shift trades for a given agent result = api_instance.get_workforcemanagement_managementunit_agent_shifttrades(management_unit_id, agent_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_agent_shifttrades: #{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 [**ShiftTradeListResponse**](ShiftTradeListResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## get_workforcemanagement_managementunit_intraday_queues(mu_id) DEPRECATED Gone. Moved under business units Wraps GET /api/v2/workforcemanagement/managementunits/{muId}/intraday/queues 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 mu_id = "mu_id_example" # String | The management unit ID of the management unit begin #Gone. Moved under business units api_instance.get_workforcemanagement_managementunit_intraday_queues(mu_id) 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 | | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## get_workforcemanagement_managementunit_scheduling_run(management_unit_id, run_id) DEPRECATED Gone. Scheduling has moved under business units Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/scheduling/runs/{runId} 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 management_unit_id = "management_unit_id_example" # String | (Deprecated/gone): The ID of the management unit. run_id = "run_id_example" # String | The ID of the schedule run begin #Gone. Scheduling has moved under business units api_instance.get_workforcemanagement_managementunit_scheduling_run(management_unit_id, run_id) 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**| (Deprecated/gone): 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 ## get_workforcemanagement_managementunit_scheduling_run_result(management_unit_id, run_id) DEPRECATED Gone. Scheduling has moved under business units Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/scheduling/runs/{runId}/result 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 management_unit_id = "management_unit_id_example" # String | (Deprecated/gone): The ID of the management unit. run_id = "run_id_example" # String | The ID of the schedule run begin #Gone. Scheduling has moved under business units api_instance.get_workforcemanagement_managementunit_scheduling_run_result(management_unit_id, run_id) 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**| (Deprecated/gone): 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 ## get_workforcemanagement_managementunit_scheduling_runs(management_unit_id) DEPRECATED Gone. Scheduling has moved under business units Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/scheduling/runs 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 management_unit_id = "management_unit_id_example" # String | (Deprecated/gone): The ID of the management unit. begin #Gone. Scheduling has moved under business units api_instance.get_workforcemanagement_managementunit_scheduling_runs(management_unit_id) 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**| (Deprecated/gone): The ID of the management unit. | | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## get_workforcemanagement_managementunit_servicegoalgroup(management_unit_id, service_goal_group_id) DEPRECATED Gone. Replaced with service goal templates and planning groups under business units Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/servicegoalgroups/{serviceGoalGroupId} 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 management_unit_id = "management_unit_id_example" # String | (Deprecated/gone): 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 | Gone. The ID of the service goal group to fetch begin #Gone. Replaced with service goal templates and planning groups under business units api_instance.get_workforcemanagement_managementunit_servicegoalgroup(management_unit_id, service_goal_group_id) rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_servicegoalgroup: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| (Deprecated/gone): The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **service_goal_group_id** | **String**| Gone. The ID of the service goal group to fetch | | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## get_workforcemanagement_managementunit_servicegoalgroups(management_unit_id) DEPRECATED Gone. Replaced with service goal templates and planning groups under business units Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/servicegoalgroups 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 management_unit_id = "management_unit_id_example" # String | (Deprecated/gone): The ID of the management unit, or 'mine' for the management unit of the logged-in user. begin #Gone. Replaced with service goal templates and planning groups under business units api_instance.get_workforcemanagement_managementunit_servicegoalgroups(management_unit_id) rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_servicegoalgroups: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| (Deprecated/gone): 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 ## get_workforcemanagement_managementunit_settings(mu_id) DEPRECATED Gone. Get management unit settings via expand parameters on the GET management unit Wraps GET /api/v2/workforcemanagement/managementunits/{muId}/settings 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 mu_id = "mu_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. begin #Gone. Get management unit settings via expand parameters on the GET management unit api_instance.get_workforcemanagement_managementunit_settings(mu_id) 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 nil (empty response body) ### 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:workPlanRotation: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) DEPRECATED Deprecated. Use the equivalent business unit resource instead. 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 #Deprecated. Use the equivalent business unit resource instead. 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 ## get_workforcemanagement_managementunit_week_schedule_generationresults(management_unit_id, week_id, schedule_id) DEPRECATED Gone. Scheduling has moved under business units Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekId}/schedules/{scheduleId}/generationresults 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 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 | Gone/deprecated. The ID of the schedule to fetch generation results begin #Gone. Scheduling has moved under business units api_instance.get_workforcemanagement_managementunit_week_schedule_generationresults(management_unit_id, week_id, schedule_id) 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**| Gone/deprecated. The ID of the schedule to fetch generation results | | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**WeekScheduleListResponse**](WeekScheduleListResponse.html) get_workforcemanagement_managementunit_week_schedules(management_unit_id, week_id, opts) DEPRECATED Deprecated. Use the equivalent business unit resource instead. 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 #Deprecated. Use the equivalent business unit resource instead. 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 ## [**WeekShiftTradeListResponse**](WeekShiftTradeListResponse.html) get_workforcemanagement_managementunit_week_shifttrades(management_unit_id, week_date_id, opts) Gets all the shift trades for a given week Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shifttrades 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 management_unit_id = "management_unit_id_example" # String | The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user. week_date_id = Date.parse("2013-10-20") # Date | The start date of the week schedule in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd opts = { evaluate_matches: true # BOOLEAN | Whether to evaluate the matches for violations } begin #Gets all the shift trades for a given week result = api_instance.get_workforcemanagement_managementunit_week_shifttrades(management_unit_id, week_date_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_week_shifttrades: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **week_date_id** | **Date**| The start date of the week schedule in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd | | **evaluate_matches** | **BOOLEAN**| Whether to evaluate the matches for violations | [optional] [default to true] | {: class="table table-striped"} ### Return type [**WeekShiftTradeListResponse**](WeekShiftTradeListResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## get_workforcemanagement_managementunit_week_shorttermforecast_final(management_unit_id, week_date_id, forecast_id) DEPRECATED Gone. Use equivalent business unit resource instead Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shorttermforecasts/{forecastId}/final 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 management_unit_id = "management_unit_id_example" # String | (Deprecated/gone): The id of the management unit. week_date_id = "week_date_id_example" # String | (Deprecated/gone): The week start date of the forecast in yyyy-MM-dd format forecast_id = "forecast_id_example" # String | (Gone/Deprecated): The ID of the forecast begin #Gone. Use equivalent business unit resource instead api_instance.get_workforcemanagement_managementunit_week_shorttermforecast_final(management_unit_id, week_date_id, forecast_id) 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**| (Deprecated/gone): The id of the management unit. | | **week_date_id** | **String**| (Deprecated/gone): The week start date of the forecast in yyyy-MM-dd format | | **forecast_id** | **String**| (Gone/Deprecated): 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 ## get_workforcemanagement_managementunit_week_shorttermforecasts(management_unit_id, week_date_id) DEPRECATED Gone. Use equivalent business unit resource instead Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shorttermforecasts 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 management_unit_id = "management_unit_id_example" # String | (Deprecated/gone): The id of the management unit. week_date_id = "week_date_id_example" # String | (Deprecated/gone): The week start date of the forecast in yyyy-MM-dd format begin #Gone. Use equivalent business unit resource instead api_instance.get_workforcemanagement_managementunit_week_shorttermforecasts(management_unit_id, week_date_id) 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**| (Deprecated/gone): The id of the management unit. | | **week_date_id** | **String**| (Deprecated/gone): The week start date of the forecast in yyyy-MM-dd format | | {: class="table table-striped"} ### Return type nil (empty response body) ### 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:workPlanRotation:view * 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:workPlanRotation: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, Coaching, ActivityCodes, Agents, BuActivityCodes, BusinessUnits, HistoricalAdherence, IntradayMonitoring, BuIntradayMonitoring, ManagementUnits, RealTimeAdherence, Schedules, BuSchedules, ServiceGoalGroups, ServiceGoalTemplates, PlanningGroups, ShiftTrading, ShortTermForecasts, BuShortTermForecasts, TimeOffRequests, WorkPlanRotations, 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 ## [**BusinessUnit**](BusinessUnit.html) patch_workforcemanagement_businessunit(business_unit_id, opts) Update business unit Wraps PATCH /api/v2/workforcemanagement/businessunits/{businessUnitId} Requires ANY permissions: * wfm:businessUnit: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 business_unit_id = "business_unit_id_example" # String | The ID of the business unit, or 'mine' for the business unit of the logged-in user. opts = { body: PureCloud::UpdateBusinessUnitRequest.new # UpdateBusinessUnitRequest | body } begin #Update business unit result = api_instance.patch_workforcemanagement_businessunit(business_unit_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->patch_workforcemanagement_businessunit: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The ID of the business unit, or 'mine' for the business unit of the logged-in user. | | **body** | [**UpdateBusinessUnitRequest**](UpdateBusinessUnitRequest.html)| body | [optional] | {: class="table table-striped"} ### Return type [**BusinessUnit**](BusinessUnit.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**BusinessUnitActivityCode**](BusinessUnitActivityCode.html) patch_workforcemanagement_businessunit_activitycode(bu_id, ac_id, opts) Update an activity code Wraps PATCH /api/v2/workforcemanagement/businessunits/{buId}/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 bu_id = "bu_id_example" # String | The ID of the business unit, or 'mine' for the business 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_businessunit_activitycode(bu_id, ac_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->patch_workforcemanagement_businessunit_activitycode: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bu_id** | **String**| The ID of the business unit, or 'mine' for the business 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 [**BusinessUnitActivityCode**](BusinessUnitActivityCode.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**PlanningGroup**](PlanningGroup.html) patch_workforcemanagement_businessunit_planninggroup(business_unit_id, planning_group_id, opts) Updates the planning group Wraps PATCH /api/v2/workforcemanagement/businessunits/{businessUnitId}/planninggroups/{planningGroupId} Requires ANY permissions: * wfm:planningGroup: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 business_unit_id = "business_unit_id_example" # String | The ID of the business unit. planning_group_id = "planning_group_id_example" # String | The ID of a planning group to update opts = { body: PureCloud::UpdatePlanningGroupRequest.new # UpdatePlanningGroupRequest | body } begin #Updates the planning group result = api_instance.patch_workforcemanagement_businessunit_planninggroup(business_unit_id, planning_group_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->patch_workforcemanagement_businessunit_planninggroup: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The ID of the business unit. | | **planning_group_id** | **String**| The ID of a planning group to update | | **body** | [**UpdatePlanningGroupRequest**](UpdatePlanningGroupRequest.html)| body | [optional] | {: class="table table-striped"} ### Return type [**PlanningGroup**](PlanningGroup.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## patch_workforcemanagement_businessunit_scheduling_run(business_unit_id, run_id, opts) Mark a schedule run as applied Wraps PATCH /api/v2/workforcemanagement/businessunits/{businessUnitId}/scheduling/runs/{runId} 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 business_unit_id = "business_unit_id_example" # String | The ID of the business unit run_id = "run_id_example" # String | The ID of the schedule run opts = { body: PureCloud::PatchBuScheduleRunRequest.new # PatchBuScheduleRunRequest | body } begin #Mark a schedule run as applied api_instance.patch_workforcemanagement_businessunit_scheduling_run(business_unit_id, run_id, opts) rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->patch_workforcemanagement_businessunit_scheduling_run: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The ID of the business unit | | **run_id** | **String**| The ID of the schedule run | | **body** | [**PatchBuScheduleRunRequest**](PatchBuScheduleRunRequest.html)| body | [optional] | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ServiceGoalTemplate**](ServiceGoalTemplate.html) patch_workforcemanagement_businessunit_servicegoaltemplate(business_unit_id, service_goal_template_id, opts) Updates a service goal template Wraps PATCH /api/v2/workforcemanagement/businessunits/{businessUnitId}/servicegoaltemplates/{serviceGoalTemplateId} Requires ANY permissions: * wfm:serviceGoalTemplate: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 business_unit_id = "business_unit_id_example" # String | The ID of the business unit. service_goal_template_id = "service_goal_template_id_example" # String | The ID of a service goal template to update opts = { body: PureCloud::UpdateServiceGoalTemplate.new # UpdateServiceGoalTemplate | body } begin #Updates a service goal template result = api_instance.patch_workforcemanagement_businessunit_servicegoaltemplate(business_unit_id, service_goal_template_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->patch_workforcemanagement_businessunit_servicegoaltemplate: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The ID of the business unit. | | **service_goal_template_id** | **String**| The ID of a service goal template to update | | **body** | [**UpdateServiceGoalTemplate**](UpdateServiceGoalTemplate.html)| body | [optional] | {: class="table table-striped"} ### Return type [**ServiceGoalTemplate**](ServiceGoalTemplate.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 ## patch_workforcemanagement_managementunit_activitycode(mu_id, ac_id, opts) DEPRECATED Deprecated/Gone: Use the new business unit activity code resources Wraps PATCH /api/v2/workforcemanagement/managementunits/{muId}/activitycodes/{acId} 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 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 #Deprecated/Gone: Use the new business unit activity code resources api_instance.patch_workforcemanagement_managementunit_activitycode(mu_id, ac_id, opts) 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 nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## patch_workforcemanagement_managementunit_scheduling_run(management_unit_id, run_id, opts) DEPRECATED Gone. Scheduling has moved under business units Wraps PATCH /api/v2/workforcemanagement/managementunits/{managementUnitId}/scheduling/runs/{runId} 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 management_unit_id = "management_unit_id_example" # String | (Deprecated/gone): 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 #Gone. Scheduling has moved under business units api_instance.patch_workforcemanagement_managementunit_scheduling_run(management_unit_id, run_id, opts) 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**| (Deprecated/gone): 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 nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## patch_workforcemanagement_managementunit_servicegoalgroup(management_unit_id, service_goal_group_id) DEPRECATED Gone. Replaced with service goal templates and planning groups under business units Wraps PATCH /api/v2/workforcemanagement/managementunits/{managementUnitId}/servicegoalgroups/{serviceGoalGroupId} 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 management_unit_id = "management_unit_id_example" # String | (Deprecated/gone): 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 | Gone. The ID of the service goal group to update begin #Gone. Replaced with service goal templates and planning groups under business units api_instance.patch_workforcemanagement_managementunit_servicegoalgroup(management_unit_id, service_goal_group_id) rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->patch_workforcemanagement_managementunit_servicegoalgroup: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| (Deprecated/gone): The ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **service_goal_group_id** | **String**| Gone. The ID of the service goal group to update | | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## patch_workforcemanagement_managementunit_settings(mu_id) DEPRECATED Gone. Update settings by PATCHing the management unit Wraps PATCH /api/v2/workforcemanagement/managementunits/{muId}/settings 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 mu_id = "mu_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. begin #Gone. Update settings by PATCHing the management unit api_instance.patch_workforcemanagement_managementunit_settings(mu_id) 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. | | {: class="table table-striped"} ### Return type nil (empty response body) ### 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 ## patch_workforcemanagement_managementunit_week_schedule(management_unit_id, week_id, schedule_id) DEPRECATED Gone. Scheduling has moved under business units Wraps PATCH /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekId}/schedules/{scheduleId} 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 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 | Gone/deprecated. The ID of the schedule to update. Use partial uploads of user schedules if activity count in schedule is greater than 17500 begin #Gone. Scheduling has moved under business units api_instance.patch_workforcemanagement_managementunit_week_schedule(management_unit_id, week_id, schedule_id) 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**| Gone/deprecated. The ID of the schedule to update. Use partial uploads of user schedules if activity count in schedule is greater than 17500 | | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ShiftTradeResponse**](ShiftTradeResponse.html) patch_workforcemanagement_managementunit_week_shifttrade(management_unit_id, week_date_id, body, trade_id) Updates a shift trade. This route can only be called by the initiating agent Wraps PATCH /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shifttrades/{tradeId} 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 management_unit_id = "management_unit_id_example" # String | The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user. week_date_id = Date.parse("2013-10-20") # Date | The start date of the week schedule in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd body = PureCloud::PatchShiftTradeRequest.new # PatchShiftTradeRequest | body trade_id = "trade_id_example" # String | The ID of the shift trade to update begin #Updates a shift trade. This route can only be called by the initiating agent result = api_instance.patch_workforcemanagement_managementunit_week_shifttrade(management_unit_id, week_date_id, body, trade_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->patch_workforcemanagement_managementunit_week_shifttrade: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **week_date_id** | **Date**| The start date of the week schedule in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd | | **body** | [**PatchShiftTradeRequest**](PatchShiftTradeRequest.html)| body | | **trade_id** | **String**| The ID of the shift trade to update | | {: class="table table-striped"} ### Return type [**ShiftTradeResponse**](ShiftTradeResponse.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 ## [**BuCurrentAgentScheduleSearchResponse**](BuCurrentAgentScheduleSearchResponse.html) post_workforcemanagement_agentschedules_mine(opts) Get published schedule for the current user Wraps POST /api/v2/workforcemanagement/agentschedules/mine Requires ANY permissions: * wfm:agentSchedule: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::BuGetCurrentAgentScheduleRequest.new # BuGetCurrentAgentScheduleRequest | body } begin #Get published schedule for the current user result = api_instance.post_workforcemanagement_agentschedules_mine(opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_agentschedules_mine: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**BuGetCurrentAgentScheduleRequest**](BuGetCurrentAgentScheduleRequest.html)| body | [optional] | {: class="table table-striped"} ### Return type [**BuCurrentAgentScheduleSearchResponse**](BuCurrentAgentScheduleSearchResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**BusinessUnitActivityCode**](BusinessUnitActivityCode.html) post_workforcemanagement_businessunit_activitycodes(bu_id, opts) Create a new activity code Wraps POST /api/v2/workforcemanagement/businessunits/{buId}/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 bu_id = "bu_id_example" # String | The ID of the business unit, or 'mine' for the business unit of the logged-in user. opts = { body: PureCloud::CreateActivityCodeRequest.new # CreateActivityCodeRequest | body } begin #Create a new activity code result = api_instance.post_workforcemanagement_businessunit_activitycodes(bu_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_activitycodes: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **bu_id** | **String**| The ID of the business unit, or 'mine' for the business unit of the logged-in user. | | **body** | [**CreateActivityCodeRequest**](CreateActivityCodeRequest.html)| body | [optional] | {: class="table table-striped"} ### Return type [**BusinessUnitActivityCode**](BusinessUnitActivityCode.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**BuAsyncAgentSchedulesSearchResponse**](BuAsyncAgentSchedulesSearchResponse.html) post_workforcemanagement_businessunit_agentschedules_search(business_unit_id, opts) Search published schedules Wraps POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/agentschedules/search Requires ANY permissions: * wfm:schedule: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 business_unit_id = "business_unit_id_example" # String | The ID of the business unit opts = { body: PureCloud::BuSearchAgentSchedulesRequest.new, # BuSearchAgentSchedulesRequest | body 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 } begin #Search published schedules result = api_instance.post_workforcemanagement_businessunit_agentschedules_search(business_unit_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_agentschedules_search: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The ID of the business unit | | **body** | [**BuSearchAgentSchedulesRequest**](BuSearchAgentSchedulesRequest.html)| body | [optional] | **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] | {: class="table table-striped"} ### Return type [**BuAsyncAgentSchedulesSearchResponse**](BuAsyncAgentSchedulesSearchResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**AsyncIntradayResponse**](AsyncIntradayResponse.html) post_workforcemanagement_businessunit_intraday(business_unit_id, opts) Get intraday data for the given date for the requested planningGroupIds Wraps POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/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 business_unit_id = "business_unit_id_example" # String | The business unit ID of the business unit opts = { force_async: true, # BOOLEAN | Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes body: PureCloud::IntradayPlanningGroupRequest.new # IntradayPlanningGroupRequest | body } begin #Get intraday data for the given date for the requested planningGroupIds result = api_instance.post_workforcemanagement_businessunit_intraday(business_unit_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_intraday: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The business unit ID of the business unit | | **force_async** | **BOOLEAN**| Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes | [optional] | **body** | [**IntradayPlanningGroupRequest**](IntradayPlanningGroupRequest.html)| body | [optional] | {: class="table table-striped"} ### Return type [**AsyncIntradayResponse**](AsyncIntradayResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**PlanningGroup**](PlanningGroup.html) post_workforcemanagement_businessunit_planninggroups(business_unit_id, opts) Adds a new planning group Wraps POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/planninggroups Requires ANY permissions: * wfm:planningGroup: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 business_unit_id = "business_unit_id_example" # String | The ID of the business unit. opts = { body: PureCloud::CreatePlanningGroupRequest.new # CreatePlanningGroupRequest | body } begin #Adds a new planning group result = api_instance.post_workforcemanagement_businessunit_planninggroups(business_unit_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_planninggroups: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The ID of the business unit. | | **body** | [**CreatePlanningGroupRequest**](CreatePlanningGroupRequest.html)| body | [optional] | {: class="table table-striped"} ### Return type [**PlanningGroup**](PlanningGroup.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ServiceGoalTemplate**](ServiceGoalTemplate.html) post_workforcemanagement_businessunit_servicegoaltemplates(business_unit_id, opts) Adds a new service goal template Wraps POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/servicegoaltemplates Requires ANY permissions: * wfm:serviceGoalTemplate: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 business_unit_id = "business_unit_id_example" # String | The ID of the business unit. opts = { body: PureCloud::CreateServiceGoalTemplate.new # CreateServiceGoalTemplate | body } begin #Adds a new service goal template result = api_instance.post_workforcemanagement_businessunit_servicegoaltemplates(business_unit_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_servicegoaltemplates: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The ID of the business unit. | | **body** | [**CreateServiceGoalTemplate**](CreateServiceGoalTemplate.html)| body | [optional] | {: class="table table-striped"} ### Return type [**ServiceGoalTemplate**](ServiceGoalTemplate.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**BuAsyncAgentSchedulesQueryResponse**](BuAsyncAgentSchedulesQueryResponse.html) post_workforcemanagement_businessunit_week_schedule_agentschedules_query(business_unit_id, week_id, schedule_id, body, opts) Loads agent schedule data from the schedule. Used in combination with the metadata route Wraps POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekId}/schedules/{scheduleId}/agentschedules/query Requires ANY permissions: * wfm:schedule: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 business_unit_id = "business_unit_id_example" # String | The ID of the business unit week_id = Date.parse("2013-10-20") # Date | First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd schedule_id = "schedule_id_example" # String | The ID of the schedule body = PureCloud::BuQueryAgentSchedulesRequest.new # BuQueryAgentSchedulesRequest | body 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 } begin #Loads agent schedule data from the schedule. Used in combination with the metadata route result = api_instance.post_workforcemanagement_businessunit_week_schedule_agentschedules_query(business_unit_id, week_id, schedule_id, body, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_week_schedule_agentschedules_query: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The ID of the business unit | | **week_id** | **Date**| First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd | | **schedule_id** | **String**| The ID of the schedule | | **body** | [**BuQueryAgentSchedulesRequest**](BuQueryAgentSchedulesRequest.html)| body | | **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] | {: class="table table-striped"} ### Return type [**BuAsyncAgentSchedulesQueryResponse**](BuAsyncAgentSchedulesQueryResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**BuAsyncScheduleResponse**](BuAsyncScheduleResponse.html) post_workforcemanagement_businessunit_week_schedule_copy(business_unit_id, week_id, schedule_id, body) Copy a schedule Wraps POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/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 business_unit_id = "business_unit_id_example" # String | The ID of the business unit week_id = Date.parse("2013-10-20") # Date | First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd schedule_id = "schedule_id_example" # String | The ID of the schedule to copy body = PureCloud::BuCopyScheduleRequest.new # BuCopyScheduleRequest | body begin #Copy a schedule result = api_instance.post_workforcemanagement_businessunit_week_schedule_copy(business_unit_id, week_id, schedule_id, body) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_week_schedule_copy: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The ID of the business unit | | **week_id** | **Date**| First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd | | **schedule_id** | **String**| The ID of the schedule to copy | | **body** | [**BuCopyScheduleRequest**](BuCopyScheduleRequest.html)| body | | {: class="table table-striped"} ### Return type [**BuAsyncScheduleResponse**](BuAsyncScheduleResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**BuAsyncScheduleRunResponse**](BuAsyncScheduleRunResponse.html) post_workforcemanagement_businessunit_week_schedule_reschedule(business_unit_id, week_id, schedule_id, body) Start a rescheduling run Wraps POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekId}/schedules/{scheduleId}/reschedule 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 business_unit_id = "business_unit_id_example" # String | The ID of the business unit week_id = Date.parse("2013-10-20") # Date | First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd schedule_id = "schedule_id_example" # String | The ID of the schedule body = PureCloud::BuRescheduleRequest.new # BuRescheduleRequest | body begin #Start a rescheduling run result = api_instance.post_workforcemanagement_businessunit_week_schedule_reschedule(business_unit_id, week_id, schedule_id, body) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_week_schedule_reschedule: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The ID of the business unit | | **week_id** | **Date**| First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd | | **schedule_id** | **String**| The ID of the schedule | | **body** | [**BuRescheduleRequest**](BuRescheduleRequest.html)| body | | {: class="table table-striped"} ### Return type [**BuAsyncScheduleRunResponse**](BuAsyncScheduleRunResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**BuScheduleMetadata**](BuScheduleMetadata.html) post_workforcemanagement_businessunit_week_schedules(business_unit_id, week_id, body) Create a blank schedule Wraps POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/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 business_unit_id = "business_unit_id_example" # String | The ID of the business unit week_id = Date.parse("2013-10-20") # Date | First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd body = PureCloud::BuCreateBlankScheduleRequest.new # BuCreateBlankScheduleRequest | body begin #Create a blank schedule result = api_instance.post_workforcemanagement_businessunit_week_schedules(business_unit_id, week_id, body) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_week_schedules: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The ID of the business unit | | **week_id** | **Date**| First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd | | **body** | [**BuCreateBlankScheduleRequest**](BuCreateBlankScheduleRequest.html)| body | | {: class="table table-striped"} ### Return type [**BuScheduleMetadata**](BuScheduleMetadata.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**BuAsyncScheduleRunResponse**](BuAsyncScheduleRunResponse.html) post_workforcemanagement_businessunit_week_schedules_generate(business_unit_id, week_id, body) Generate a schedule Wraps POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/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 business_unit_id = "business_unit_id_example" # String | The ID of the business unit week_id = Date.parse("2013-10-20") # Date | First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd body = PureCloud::BuGenerateScheduleRequest.new # BuGenerateScheduleRequest | body begin #Generate a schedule result = api_instance.post_workforcemanagement_businessunit_week_schedules_generate(business_unit_id, week_id, body) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_week_schedules_generate: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The ID of the business unit | | **week_id** | **Date**| First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd | | **body** | [**BuGenerateScheduleRequest**](BuGenerateScheduleRequest.html)| body | | {: class="table table-striped"} ### Return type [**BuAsyncScheduleRunResponse**](BuAsyncScheduleRunResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**AsyncForecastOperationResult**](AsyncForecastOperationResult.html) post_workforcemanagement_businessunit_week_shorttermforecast_copy(business_unit_id, week_date_id, forecast_id, body, opts) Copy a short term forecast Wraps POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/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 business_unit_id = "business_unit_id_example" # String | The business unit ID of the business unit to which the forecast belongs week_date_id = Date.parse("2013-10-20") # Date | The week start date of the forecast in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd forecast_id = "forecast_id_example" # String | The ID of the forecast to copy body = PureCloud::CopyBuForecastRequest.new # CopyBuForecastRequest | 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_businessunit_week_shorttermforecast_copy(business_unit_id, week_date_id, forecast_id, body, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_week_shorttermforecast_copy: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The business unit ID of the business unit to which the forecast belongs | | **week_date_id** | **Date**| The week start date of the forecast in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd | | **forecast_id** | **String**| The ID of the forecast to copy | | **body** | [**CopyBuForecastRequest**](CopyBuForecastRequest.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 [**AsyncForecastOperationResult**](AsyncForecastOperationResult.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**AsyncForecastOperationResult**](AsyncForecastOperationResult.html) post_workforcemanagement_businessunit_week_shorttermforecasts_generate(business_unit_id, week_date_id, body, opts) Generate a short term forecast Wraps POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/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 business_unit_id = "business_unit_id_example" # String | The business unit ID of the business unit to which the forecast belongs week_date_id = Date.parse("2013-10-20") # Date | The week start date of the forecast in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd body = PureCloud::GenerateBuForecastRequest.new # GenerateBuForecastRequest | 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_businessunit_week_shorttermforecasts_generate(business_unit_id, week_date_id, body, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_week_shorttermforecasts_generate: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business_unit_id** | **String**| The business unit ID of the business unit to which the forecast belongs | | **week_date_id** | **Date**| The week start date of the forecast in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd | | **body** | [**GenerateBuForecastRequest**](GenerateBuForecastRequest.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 [**AsyncForecastOperationResult**](AsyncForecastOperationResult.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**BusinessUnit**](BusinessUnit.html) post_workforcemanagement_businessunits(opts) Add a new business unit It may take a minute or two for a new business unit to be available for api operations Wraps POST /api/v2/workforcemanagement/businessunits Requires ANY permissions: * wfm:businessUnit: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::CreateBusinessUnitRequest.new # CreateBusinessUnitRequest | body } begin #Add a new business unit result = api_instance.post_workforcemanagement_businessunits(opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunits: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**CreateBusinessUnitRequest**](CreateBusinessUnitRequest.html)| body | [optional] | {: class="table table-striped"} ### Return type [**BusinessUnit**](BusinessUnit.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## post_workforcemanagement_managementunit_activitycodes(mu_id) DEPRECATED Deprecated/Gone: Use the new business unit activity code resources Wraps POST /api/v2/workforcemanagement/managementunits/{muId}/activitycodes 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 mu_id = "mu_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user. begin #Deprecated/Gone: Use the new business unit activity code resources api_instance.post_workforcemanagement_managementunit_activitycodes(mu_id) 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. | | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**BuAsyncAgentSchedulesSearchResponse**](BuAsyncAgentSchedulesSearchResponse.html) post_workforcemanagement_managementunit_agentschedules_search(mu_id, opts) Query published schedules for given given time range for set of users Wraps POST /api/v2/workforcemanagement/managementunits/{muId}/agentschedules/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::BuSearchAgentSchedulesRequest.new, # BuSearchAgentSchedulesRequest | body 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 } begin #Query published schedules for given given time range for set of users result = api_instance.post_workforcemanagement_managementunit_agentschedules_search(mu_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_agentschedules_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** | [**BuSearchAgentSchedulesRequest**](BuSearchAgentSchedulesRequest.html)| body | [optional] | **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] | {: class="table table-striped"} ### Return type [**BuAsyncAgentSchedulesSearchResponse**](BuAsyncAgentSchedulesSearchResponse.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 ## post_workforcemanagement_managementunit_intraday(mu_id) DEPRECATED Gone. Moved under business units Wraps POST /api/v2/workforcemanagement/managementunits/{muId}/intraday 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 mu_id = "mu_id_example" # String | The management unit ID of the management unit begin #Gone. Moved under business units api_instance.post_workforcemanagement_managementunit_intraday(mu_id) 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 | | {: class="table table-striped"} ### Return type nil (empty response body) ### 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) DEPRECATED 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 ## post_workforcemanagement_managementunit_servicegoalgroups(management_unit_id) DEPRECATED Gone. Replaced with service goal templates and planning groups under business units Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/servicegoalgroups 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 management_unit_id = "management_unit_id_example" # String | (Deprecated/gone): The ID of the management unit, or 'mine' for the management unit of the logged-in user. begin #Gone. Replaced with service goal templates and planning groups under business units api_instance.post_workforcemanagement_managementunit_servicegoalgroups(management_unit_id) rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_servicegoalgroups: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| (Deprecated/gone): 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 ## [**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 ## post_workforcemanagement_managementunit_timeoffrequests_fetchdetails(mu_id, opts) DEPRECATED Gone. All data is now returned in the query route Wraps POST /api/v2/workforcemanagement/managementunits/{muId}/timeoffrequests/fetchdetails 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 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::TimeOffRequestListing.new # TimeOffRequestListing | body } begin #Gone. All data is now returned in the query route api_instance.post_workforcemanagement_managementunit_timeoffrequests_fetchdetails(mu_id, opts) 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** | [**TimeOffRequestListing**](TimeOffRequestListing.html)| body | [optional] | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**TimeOffRequestListing**](TimeOffRequestListing.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 [**TimeOffRequestListing**](TimeOffRequestListing.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## post_workforcemanagement_managementunit_week_schedule_copy(management_unit_id, week_id, schedule_id) DEPRECATED Gone. Scheduling has moved under business units Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekId}/schedules/{scheduleId}/copy 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 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 | Gone/deprecated. The ID of the schedule to copy from begin #Gone. Scheduling has moved under business units api_instance.post_workforcemanagement_managementunit_week_schedule_copy(management_unit_id, week_id, schedule_id) 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**| Gone/deprecated. The ID of the schedule to copy from | | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## post_workforcemanagement_managementunit_week_schedule_reschedule(management_unit_id, week_id, schedule_id) DEPRECATED Gone. Scheduling has moved under business units Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekId}/schedules/{scheduleId}/reschedule 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 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 | Gone/deprecated. The ID of the schedule to re-optimize begin #Gone. Scheduling has moved under business units api_instance.post_workforcemanagement_managementunit_week_schedule_reschedule(management_unit_id, week_id, schedule_id) 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**| Gone/deprecated. The ID of the schedule to re-optimize | | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## post_workforcemanagement_managementunit_week_schedules(management_unit_id, week_id) DEPRECATED Gone. Scheduling has moved under business units Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekId}/schedules 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 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. begin #Gone. Scheduling has moved under business units api_instance.post_workforcemanagement_managementunit_week_schedules(management_unit_id, week_id) 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. | | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## post_workforcemanagement_managementunit_week_schedules_generate(management_unit_id, week_id) DEPRECATED Gone. Scheduling has moved under business units 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. begin #Gone. Scheduling has moved under business units api_instance.post_workforcemanagement_managementunit_week_schedules_generate(management_unit_id, week_id) 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. | | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## post_workforcemanagement_managementunit_week_schedules_partialupload(management_unit_id, week_id) DEPRECATED Gone. Scheduling has moved under business units Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekId}/schedules/partialupload 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 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. begin #Gone. Scheduling has moved under business units api_instance.post_workforcemanagement_managementunit_week_schedules_partialupload(management_unit_id, week_id) 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. | | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**MatchShiftTradeResponse**](MatchShiftTradeResponse.html) post_workforcemanagement_managementunit_week_shifttrade_match(management_unit_id, week_date_id, body, trade_id) Matches a shift trade. This route can only be called by the receiving agent Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shifttrades/{tradeId}/match 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 management_unit_id = "management_unit_id_example" # String | The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user. week_date_id = Date.parse("2013-10-20") # Date | The start date of the week schedule in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd body = PureCloud::MatchShiftTradeRequest.new # MatchShiftTradeRequest | body trade_id = "trade_id_example" # String | The ID of the shift trade to update begin #Matches a shift trade. This route can only be called by the receiving agent result = api_instance.post_workforcemanagement_managementunit_week_shifttrade_match(management_unit_id, week_date_id, body, trade_id) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_week_shifttrade_match: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **week_date_id** | **Date**| The start date of the week schedule in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd | | **body** | [**MatchShiftTradeRequest**](MatchShiftTradeRequest.html)| body | | **trade_id** | **String**| The ID of the shift trade to update | | {: class="table table-striped"} ### Return type [**MatchShiftTradeResponse**](MatchShiftTradeResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**ShiftTradeResponse**](ShiftTradeResponse.html) post_workforcemanagement_managementunit_week_shifttrades(management_unit_id, week_date_id, body) Adds a shift trade Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shifttrades 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 management_unit_id = "management_unit_id_example" # String | The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user. week_date_id = Date.parse("2013-10-20") # Date | The start date of the week schedule in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd body = PureCloud::AddShiftTradeRequest.new # AddShiftTradeRequest | body begin #Adds a shift trade result = api_instance.post_workforcemanagement_managementunit_week_shifttrades(management_unit_id, week_date_id, body) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_week_shifttrades: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **week_date_id** | **Date**| The start date of the week schedule in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd | | **body** | [**AddShiftTradeRequest**](AddShiftTradeRequest.html)| body | | {: class="table table-striped"} ### Return type [**ShiftTradeResponse**](ShiftTradeResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**SearchShiftTradesResponse**](SearchShiftTradesResponse.html) post_workforcemanagement_managementunit_week_shifttrades_search(management_unit_id, week_date_id, body) Searches for potential shift trade matches for the current agent Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shifttrades/search 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 management_unit_id = "management_unit_id_example" # String | The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user. week_date_id = Date.parse("2013-10-20") # Date | The start date of the week schedule in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd body = PureCloud::SearchShiftTradesRequest.new # SearchShiftTradesRequest | body begin #Searches for potential shift trade matches for the current agent result = api_instance.post_workforcemanagement_managementunit_week_shifttrades_search(management_unit_id, week_date_id, body) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_week_shifttrades_search: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **week_date_id** | **Date**| The start date of the week schedule in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd | | **body** | [**SearchShiftTradesRequest**](SearchShiftTradesRequest.html)| body | | {: class="table table-striped"} ### Return type [**SearchShiftTradesResponse**](SearchShiftTradesResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## [**BulkUpdateShiftTradeStateResponse**](BulkUpdateShiftTradeStateResponse.html) post_workforcemanagement_managementunit_week_shifttrades_state_bulk(management_unit_id, week_date_id, body, opts) Updates the state of a batch of shift trades Admin functionality is not supported with \"mine\". Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shifttrades/state/bulk Requires ANY permissions: * wfm:agentShiftTradeRequest:participate * 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 management_unit_id = "management_unit_id_example" # String | The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user. week_date_id = Date.parse("2013-10-20") # Date | The start date of the week schedule in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd body = PureCloud::BulkShiftTradeStateUpdateRequest.new # BulkShiftTradeStateUpdateRequest | body opts = { force_async: true # BOOLEAN | Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes } begin #Updates the state of a batch of shift trades result = api_instance.post_workforcemanagement_managementunit_week_shifttrades_state_bulk(management_unit_id, week_date_id, body, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_week_shifttrades_state_bulk: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **management_unit_id** | **String**| The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user. | | **week_date_id** | **Date**| The start date of the week schedule in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd | | **body** | [**BulkShiftTradeStateUpdateRequest**](BulkShiftTradeStateUpdateRequest.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 [**BulkUpdateShiftTradeStateResponse**](BulkUpdateShiftTradeStateResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## post_workforcemanagement_managementunit_week_shorttermforecast_copy(management_unit_id, week_date_id, forecast_id) DEPRECATED Gone. Use equivalent business unit resource instead Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shorttermforecasts/{forecastId}/copy 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 management_unit_id = "management_unit_id_example" # String | (Deprecated/gone): The id of the management unit. week_date_id = "week_date_id_example" # String | (Deprecated/gone): The week start date of the forecast in yyyy-MM-dd format forecast_id = "forecast_id_example" # String | (Gone/Deprecated): The ID of the forecast begin #Gone. Use equivalent business unit resource instead api_instance.post_workforcemanagement_managementunit_week_shorttermforecast_copy(management_unit_id, week_date_id, forecast_id) 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**| (Deprecated/gone): The id of the management unit. | | **week_date_id** | **String**| (Deprecated/gone): The week start date of the forecast in yyyy-MM-dd format | | **forecast_id** | **String**| (Gone/Deprecated): 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 ## post_workforcemanagement_managementunit_week_shorttermforecasts(management_unit_id, week_date_id) DEPRECATED Gone. Use equivalent business unit resource instead Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shorttermforecasts 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 management_unit_id = "management_unit_id_example" # String | (Deprecated/gone): The id of the management unit. week_date_id = "week_date_id_example" # String | (Deprecated/gone): The week start date of the forecast in yyyy-MM-dd format begin #Gone. Use equivalent business unit resource instead api_instance.post_workforcemanagement_managementunit_week_shorttermforecasts(management_unit_id, week_date_id) 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**| (Deprecated/gone): The id of the management unit. | | **week_date_id** | **String**| (Deprecated/gone): The week start date of the forecast in yyyy-MM-dd format | | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## post_workforcemanagement_managementunit_week_shorttermforecasts_generate(management_unit_id, week_date_id) DEPRECATED Gone. Use equivalent business unit resource instead Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shorttermforecasts/generate 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 management_unit_id = "management_unit_id_example" # String | (Deprecated/gone): The id of the management unit. week_date_id = "week_date_id_example" # String | (Deprecated/gone): The week start date of the forecast in yyyy-MM-dd format begin #Gone. Use equivalent business unit resource instead api_instance.post_workforcemanagement_managementunit_week_shorttermforecasts_generate(management_unit_id, week_date_id) 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**| (Deprecated/gone): The id of the management unit. | | **week_date_id** | **String**| (Deprecated/gone): The week start date of the forecast in yyyy-MM-dd format | | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## post_workforcemanagement_managementunit_week_shorttermforecasts_partialupload(management_unit_id, week_date_id) DEPRECATED Gone. Use equivalent business unit resource instead Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shorttermforecasts/partialupload 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 management_unit_id = "management_unit_id_example" # String | (Deprecated/gone): The id of the management unit. week_date_id = "week_date_id_example" # String | (Deprecated/gone): The week start date of the forecast in yyyy-MM-dd format begin #Gone. Use equivalent business unit resource instead api_instance.post_workforcemanagement_managementunit_week_shorttermforecasts_partialupload(management_unit_id, week_date_id) 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**| (Deprecated/gone): The id of the management unit. | | **week_date_id** | **String**| (Deprecated/gone): The week start date of the forecast in yyyy-MM-dd format | | {: class="table table-striped"} ### Return type nil (empty response body) ### 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 It may take a minute or two for a new management unit to be available for api operations 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) DEPRECATED Get published schedule for the current user Wraps POST /api/v2/workforcemanagement/schedules Requires ANY permissions: * wfm:agentSchedule: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