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