wxc_sdk.me.mode_management package

class wxc_sdk.me.mode_management.MeModeManagementApi(*, session: RestSession, base: str | None = None)[source]

Bases: ApiChild

get_features() List[ModeManagementFeature][source]

Get Mode Management Features

Retrieves a list of all mode management features (Auto Attendants, Call Queues, and Hunt Groups) for which the authenticated user has been designated as a mode manager. This API returns basic information about each feature including its ID, name, and type.

Mode Management allows designated managers to switch features between different operational configurations based on time schedules or manual triggers. This is useful for managing business hours, holidays, and emergency scenarios.

This API requires a user auth token with the spark:telephony_config_read scope. The authenticated user must be configured as a mode manager for at least one feature to receive results.

Return type:

list[ModeManagementFeature]

switch_mode_multiple_features(feature_ids: list[str], operating_mode_name: str)[source]

Switch Mode for Multiple Features

Switches the operating mode for multiple features simultaneously by specifying a common mode name. This API accepts a list of feature IDs and sets all of them to the specified operating mode, provided that mode exists for all features.

This bulk operation is particularly useful for coordinating operational changes across an organization, such as activating holiday modes, emergency procedures, or after-hours configurations across multiple Auto Attendants, Call Queues, and Hunt Groups at once.

This API requires a user auth token with the spark:telephony_config_write scope. The authenticated user must be a mode manager for all specified features.

Parameters:
  • feature_ids (list[str]) – List of feature IDs to switch mode

  • operating_mode_name (str) – Name of the common operating mode to be set as current operating mode

Return type:

None

get_common_modes(feature_ids: list[str]) list[str][source]

Get Common Modes

Retrieves a list of common operating mode names that are shared across multiple specified features. This API accepts a list of feature IDs and returns only the mode names that exist in all of the specified features, allowing managers to switch multiple features to the same mode simultaneously.

Common modes are useful when you need to coordinate operational changes across multiple features. For example, switching an entire office to “Holiday” mode across all Auto Attendants and Call Queues at once.

This API requires a user auth token with the spark:telephony_config_read scope. The authenticated user must be a mode manager for the specified features.

Parameters:

feature_ids (list[str]) – List of feature IDs (comma-separated) for auto attendants, call queues, or hunt groups

Return type:

list[str]

feature_get(feature_id: str) FeatureDetail[source]

Get Mode Management Feature

Retrieves detailed information about a specific mode management feature including its current operating mode and exception status. This API provides the feature’s ID, name, type, current operating mode ID, and whether it is currently in an exception mode.

Exception mode indicates that the feature has been manually switched to a different mode than what its schedule dictates. This information is critical for mode managers to understand the current state of their features.

This API requires a user auth token with the spark:telephony_config_read scope. The authenticated user must be a mode manager for the specified feature.

Parameters:

feature_id (str) – Unique identifier for the feature.

Return type:

FeatureDetail

extend_mode(feature_id: str, operating_mode_id: str, extension_time: int | None = None)[source]

Extend Current Operating Mode Duration

Extends the duration of the current operating mode by adding additional time before it expires or reverts to scheduled operation. This API allows managers to prolong a temporary mode change without having to switch modes again.

Extension time can be specified in 30-minute increments up to 720 minutes (12 hours). If no extension time is provided, the mode is extended with a manual switchback exception, meaning it will remain active until manually changed.

This API requires a user auth token with the spark:telephony_config_write scope. The authenticated user must be a mode manager for the specified feature.

Parameters:
  • feature_id (str) – Unique identifier for the feature.

  • operating_mode_id (str) – Unique identifier for the operating mode for which the extension is being configured.

  • extension_time (int) – Extension time in minutes (must be multiple of 30). If not sent, mode is extended with manual switch back exception

Return type:

None

switch_mode_for_feature(feature_id: str, operating_mode_id: str, is_manual_switchback_enabled: bool | None = None)[source]

Switch Mode for Single Feature

Switches the operating mode for a single feature to a specified mode, either temporarily or with manual switchback. This API creates an exception to the feature’s normal scheduled operation, allowing managers to manually control the feature’s behavior.

You can configure whether the mode switch is temporary (automatically reverts based on schedule) or requires manual switchback. This is useful for handling unexpected situations like emergency closures, special events, or unscheduled breaks.

This API requires a user auth token with the spark:telephony_config_write scope. The authenticated user must be a mode manager for the specified feature.

Parameters:
  • feature_id (str) – Unique identifier for the feature.

  • operating_mode_id (str) – Operating mode ID to switch to

  • is_manual_switchback_enabled (bool) – Determines if switch back will be manual (if true) or automatic (if false or omitted from request)

Return type:

None

switch_to_normal_operation(feature_id: str)[source]

Switch to Normal Operation

Switches the feature back to its normal scheduled operation mode, removing any manual exceptions or overrides that may be active. This returns the feature to operating according to its configured time schedules.

This operation is useful when a temporary manual mode change (exception) is no longer needed and you want to restore automatic schedule-based operation. It effectively cancels any active manual mode switches.

This API requires a user auth token with the spark:telephony_config_write scope. The authenticated user must be a mode manager for the specified feature.

Parameters:

feature_id (str) – Unique identifier for the feature.

Return type:

None

get_operating_mode(feature_id: str, mode_id: str) OperatingModeDetail[source]

Get Operating Mode

Retrieves detailed information about a specific operating mode for a feature, including the mode’s ID and name. This API allows managers to get the details of any operating mode configured for a feature.

Operating modes define different configurations for how a feature behaves (e.g., business hours routing vs. after-hours routing). Each mode has a unique ID and a descriptive name that helps managers identify its purpose.

This API requires a user auth token with the spark:telephony_config_read scope. The authenticated user must be a mode manager for the specified feature.

Parameters:
  • feature_id (str) – Unique identifier for the feature.

  • mode_id (str) – Unique identifier for the operating mode.

Return type:

OperatingModeDetail

get_normal_operation_mode(feature_id: str) str[source]

Get Normal Operation Mode

Retrieves the current normal operating mode that the feature is scheduled to be in based on its time schedules. This represents the mode the feature would be in if no manual exceptions or overrides were active.

The normal operation mode is determined by the feature’s configured schedules and may differ from the actual current operating mode if a manual exception has been applied. This API helps managers understand what the scheduled behavior is versus the actual current state.

This API requires a user auth token with the spark:telephony_config_read scope. The authenticated user must be a mode manager for the specified feature.

Parameters:

feature_id (str) – Unique identifier for the feature.

Return type:

str

base = 'telephony/config/people/me'
class wxc_sdk.me.mode_management.FeatureDetail(*, modeBasedForwardingEnabled: bool | None = None, timezone: str | None = None, phoneNumber: str | None = None, extension: str | None = None, currentOperatingModeId: str | None = None, currentOperatingModeEndTime: str | None = None, currentOperatingModeForwardDestination: str | None = None, exceptionType: ExceptionType | None = None, modes: list[FeatureMode] | None = None, **extra_data: Any)[source]

Bases: ApiModel

mode_based_forwarding_enabled: bool | None

Whether mode based forwarding is enabled for the feature

timezone: str | None

Timezone for the feature

phone_number: str | None

Phone number of the feature

extension: str | None

Extension of the feature

current_operating_mode_id: str | None

Unique identifier for the current operating mode.

current_operating_mode_end_time: str | None

The current operating mode’s end time in 12-hour format showing hour and minute only (no date information). This field’s presence and meaning depends on the operational state:

  • Present during normal operation with the time at which the next mode change will occur.

  • Not present for Manual Switch Back exceptions.

  • For Automatic Switch Back (Early Start) exceptions it is when the exception ends and the feature automatically reverts to normal operation which is the mode’s configured start time.

  • For Automatic Switch Back (Extension) exceptions it is when the exception ends and the feature automatically reverts to normal operation which is the mode’s configured end time when the exception started plus the extension time.

  • For Automatic Switch Back (Standard) exceptions it is when the exception ends and the feature automatically reverts to normal operation which is the mode’s configured end time.

current_operating_mode_forward_destination: str | None

Forward destination for current operating mode

exception_type: ExceptionType | None

Type of exception indicating how the feature will switch back from the current mode. This field is not present when the feature is in normal operation.

modes: list[FeatureMode] | None

Array of operating modes configured for this feature

class wxc_sdk.me.mode_management.FeatureMode(*, id: str | None = None, name: str | None = None, type: OperatingModeSchedule | None = None, level: ScheduleLevel | None = None, normalOperationEnabled: bool | None = None, forwardTo: FeatureModeForwardTo | None = None, **extra_data: Any)[source]

Bases: ApiModel

id: str | None

Unique identifier for the operating mode.

name: str | None

Display name of the operating mode.

type: OperatingModeSchedule | None
level: ScheduleLevel | None
normal_operation_enabled: bool | None

Whether this mode is enabled for normal operation.

forward_to: FeatureModeForwardTo | None

Forwarding configuration for this mode

class wxc_sdk.me.mode_management.FeatureModeForwardTo(*, selection: ForwardToSelection | None = None, phoneNumber: str | None = None, sendToVoicemailEnabled: bool | None = None, defaultPhoneNumber: str | None = None, defaultSendToVoicemailEnabled: bool | None = None, **extra_data: Any)[source]

Bases: ApiModel

selection: ForwardToSelection | None
phone_number: str | None

Phone number to forward to when selection is FORWARD_TO_SPECIFIED_NUMBER.

send_to_voicemail_enabled: bool | None

Whether to send to voicemail when selection is FORWARD_TO_SPECIFIED_NUMBER.

default_phone_number: str | None

Default phone number when selection is FORWARD_TO_DEFAULT_NUMBER. This field is not present if the mode’s default is to not forward.

default_send_to_voicemail_enabled: bool | None

Whether default is to send to voicemail

class wxc_sdk.me.mode_management.OperatingModeDetail(*, operatingModeId: str | None = None, name: str | None = None, type: OperatingModeSchedule | None = None, level: ScheduleLevel | None = None, locationName: str | None = None, sameHoursDaily: SameHoursDaily | None = None, differentHoursDaily: DifferentHoursDaily | None = None, holidays: list[OperatingModeHoliday] | None = None, forwardTo: OperatingModeForwardTo | None = None, **extra_data: Any)[source]

Bases: ApiModel

operating_mode_id: str | None

Unique identifier for the operating mode.

name: str | None

Display name of the operating mode.

type: OperatingModeSchedule | None
level: ScheduleLevel | None
location_name: str | None

Location name

same_hours_daily: SameHoursDaily | None

Schedule configuration when same hours apply for weekdays and weekends

different_hours_daily: DifferentHoursDaily | None

Schedule configuration when different hours apply for each day

holidays: list[OperatingModeHoliday] | None

Array of holiday schedule events

forward_to: OperatingModeForwardTo | None

Call forwarding configuration for this operating mode

class wxc_sdk.me.mode_management.OperatingModeForwardTo(*, enabled: bool | None = None, destination: str | None = None, sendToVoicemailEnabled: bool | None = None, **extra_data: Any)[source]

Bases: ApiModel

enabled: bool | None

Whether call forwarding is enabled

destination: str | None

Forwarding destination phone number

send_to_voicemail_enabled: bool | None

Whether to send to voicemail