wxc_sdk.telephony.operating_modes package
- class wxc_sdk.telephony.operating_modes.OperatingModesApi(*, session: RestSession, base: str | None = None)[source]
Bases:
ApiChildFeatures: Operating Modes
Features: Operating modes help manage calls more efficiently by routing them based on predefined settings. Authorized users can adjust these modes to reduce wait times for clients. Operating modes are used by mode-based forwarding for the Auto Attendant, Call Queue, and Hunt Group features.
Viewing these read-only organization settings requires a full, read-only, or location administrator auth token with a scope of spark-admin:telephony_config_read.
Modifying these organization settings requires a full, or location administrator auth token with a scope of spark-admin:telephony_config_write.
A partner administrator can retrieve, or change settings in a customer’s organization using the optional orgId query parameter.
- list(limit_to_location_id: str | None = None, name: str | None = None, limit_to_org_level_enabled: bool | None = None, order: str | None = None, org_id: str | None = None, **params) Generator[OperatingMode, None, None][source]
Read the List of Operating Modes.
Retrieve Operating Modes list defined at location, or organization level. Use query parameters to filter the result set by location or level. The list returned is sorted in ascending order by operating mode name. Long result sets are split into pages.
Operating modes help manage calls more efficiently by routing them based on predefined settings.
Retrieving this list requires a full, read-only, or location administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
limit_to_location_id (str) – Location query parameter to filter the operating modes from that location only.
name (str) – List operating modes whose name contains this string.
limit_to_org_level_enabled (bool) – If true, only return operating modes defined at the organization level.
order (str) – Sort the list of operating modes based on name, either asc, or desc.
org_id (str) – Retrieve operating modes list from this organization.
- Returns:
Generator yielding
OperatingModeinstances
- details(mode_id: str, org_id: str | None = None) OperatingMode[source]
Get Details for an Operating Mode.
Retrieve an Operating Mode by Operating Mode ID.
Operating modes can be used to define call routing rules for different scenarios like business hours, after hours, holidays, etc.
Retrieving an operating mode requires a full, read-only, or location administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
mode_id (str) – Get the operating mode with the matching ID.
org_id (str) – Get the operating mode from this organization.
- Return type:
- create(settings: OperatingMode, org_id: str | None = None) str[source]
Create an Operating Mode.
Create an Operating Mode at an organization, or a location level.
Operating modes can be used to define call routing rules for different scenarios like business hours, after hours, holidays, etc.
Creating an Operating Mode requires a full, or location administrator auth token with a scope of spark-admin:telephony_config_write.
- Parameters:
settings (OperatingMode) – Create the operating mode with these settings. At least name, type and level must be set.
org_id (str) – Create the operating mode for this organization.
- Return type:
str
- update(mode_id: str, settings: OperatingMode, org_id: str | None = None)[source]
Modify an Operating Mode.
Modify the designated Operating Mode’s configuration.
Operating modes can be used to define call routing rules for different scenarios like business hours, after hours, holidays, etc.
Modifying an Operating Mode requires a full, or location administrator auth token with a scope of spark-admin:telephony_config_write.
- Parameters:
mode_id (str) – Modify the operating mode with the matching ID.
settings (OperatingMode) – Modify the operating mode with these settings.
org_id (str) – Modify the operating mode from this organization.
- Return type:
None
- delete(mode_id: str, org_id: str | None = None)[source]
Delete an Operating Mode.
Delete the designated Operating Mode.
Deleting an Operating Mode requires a full, or location administrator auth token with a scope of spark-admin:telephony_config_write.
- Parameters:
mode_id (str) – Delete the operating mode with the matching ID.
org_id (str) – Delete the operating mode from this organization.
- Return type:
None
- holiday_details(mode_id: str, holiday_id: str, org_id: str | None = None) OperatingModeHoliday[source]
Get details for an Operating Mode Holiday.
Retrieve an Operating Mode Holiday by ID.
Holidays define a recurring schedule for the Operating Modes.
Retrieving an Operating Mode Holiday requires a full, read-only, or location administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
mode_id (str) – Get the holiday from this operating mode matching ID.
holiday_id (str) – Get the operating mode Holiday with the matching ID.
org_id (str) – Get the operating mode from this organization.
- Return type:
- holiday_create(mode_id: str, settings: OperatingModeHoliday, org_id: str | None = None) str[source]
Create an Operating Mode Holiday.
Create a holiday schedule event for the designated Operating Mode.
Holidays define a recurring schedule for the Operating Modes. An Operating Mode can have a max of 150 holidays.
Creating an Operating Mode Holiday requires a full, or location administrator auth token with a scope of spark-admin:telephony_config_write.
- Parameters:
mode_id (str) – Create the holiday for this operating mode.
settings (OperatingModeHoliday) – Create the operating mode holiday with these settings.
org_id (str) – Create the operating mode holiday for this organization.
- Return type:
str
- holiday_update(mode_id: str, holiday_id: str, settings: OperatingModeHoliday, org_id: str | None = None)[source]
Modify an Operating Mode Holiday.
Modify the designated Operating Mode Holiday’s configuration.
Modifying an Operating Mode Holiday requires a full, or location administrator auth token with a scope of spark-admin:telephony_config_write.
- Parameters:
mode_id (str) – Modify the holiday from this operating mode matching ID.
holiday_id (str) – Modify the Holiday with the matching ID.
settings (OperatingModeHoliday) – Modify the operating mode holiday with these settings.
org_id (str) – Modify the operating mode from this organization.
- Return type:
None
- holiday_delete(mode_id: str, holiday_id: str | None = None, org_id: str | None = None)[source]
Delete an Operating Mode Holiday.
Delete the designated Operating Mode Holiday.
Deleting an Operating Mode Holiday requires a full, or location administrator auth token with a scope of spark-admin:telephony_config_write.
- Parameters:
mode_id (str) – Delete the holiday from this operating mode matching ID.
holiday_id (str) – Delete the holiday with the matching ID.
org_id (str) – Delete the operating mode from this organization.
- Return type:
None
- available_operating_modes(location_id: str, org_id: str | None = None) List[IdAndName][source]
Retrieve the List of Available Operating Modes in a Location.
Retrieve list of Operating Modes which are available to be assigned to a location level feature (Auto Attendant, Call Queue, or Hunt Group). Since each location and an org can have a max of 100 Operating Modes defined. The max number of operating modes that can be returned is 200.
Operating modes can be used to define call routing rules for different scenarios like business hours, after hours, holidays, etc. for the Auto Attendant, Call Queue, and Hunt Group features.
Retrieving this list requires a full, read-only, or location administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
location_id (str) – Retrieve operating modes list from this location.
org_id (str) – Retrieve operating modes list from this organization.
- Return type:
list[IdAndName]
- call_forward_available_phone_numbers(location_id: str, phone_number: List[str] | None = None, owner_name: str | None = None, extension: str | None = None, org_id: str | None = None, **params) Generator[AvailableNumber, None, None][source]
Get Operating Mode Call Forward Available Phone Numbers
List the service and standard PSTN numbers that are available to be assigned as a operating mode’s call forward number.
These numbers are associated with the location specified in the request URL, can be active or inactive, and are assigned to an owning entity.
The available numbers APIs help identify candidate numbers and their owning entities to simplify the assignment or association of these numbers to members or features.
Retrieving this list requires a full, read-only or location administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
location_id (str) – Return the list of phone numbers for this location within the given organization. The maximum length is 36.
phone_number (list[str]) – Filter phone numbers based on the comma-separated list provided in the phoneNumber array.
owner_name (str) – Return the list of phone numbers that are owned by the given ownerName. Maximum length is 255.
extension (str) – Returns the list of PSTN phone numbers with the given extension.
org_id (str) – List numbers for this organization.
- Returns:
Generator yielding
AvailableNumberinstances
- base = 'telephony/config'
- class wxc_sdk.telephony.operating_modes.Month(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str,SafeEnumAn enumeration.
- january = 'JANUARY'
Schedule the event in January.
- february = 'FEBRUARY'
Schedule the event in February.
- march = 'MARCH'
Schedule the event in March.
- april = 'APRIL'
Schedule the event in April.
- may = 'MAY'
Schedule the event in May.
- june = 'JUNE'
Schedule the event in June.
- july = 'JULY'
Schedule the event in July.
- august = 'AUGUST'
Schedule the event in August.
- september = 'SEPTEMBER'
Schedule the event in September.
- october = 'OCTOBER'
Schedule the event in October.
- november = 'NOVEMBER'
Schedule the event in November.
- december = 'DECEMBER'
Schedule the event in December.
- class wxc_sdk.telephony.operating_modes.DaySchedule(*, enabled: bool | None = None, allDayEnabled: bool | None = None, startTime: ~typing.Annotated[~datetime.time, ~pydantic.functional_serializers.PlainSerializer(func=~wxc_sdk.telephony.operating_modes.<lambda>, return_type=str, when_used=always)] | None = None, endTime: ~typing.Annotated[~datetime.time, ~pydantic.functional_serializers.PlainSerializer(func=~wxc_sdk.telephony.operating_modes.<lambda>, return_type=str, when_used=always)] | None = None, **extra_data: ~typing.Any)[source]
Bases:
ApiModel- enabled: bool | None
Specifies if the operating mode schedule for the specified weekday(s) is enabled, or not. False if the flag is not set.
- all_day_enabled: bool | None
Specifies if the operating mode is enabled for the entire day. False if the flag is not set.
- start_time: <lambda>, return_type=str, when_used=always)] | None
Start time for the operating mode.
- end_time: <lambda>, return_type=str, when_used=always)] | None
End time for the operating mode.
- class wxc_sdk.telephony.operating_modes.DifferentHoursDaily(*, sunday: DaySchedule | None = None, monday: DaySchedule | None = None, tuesday: DaySchedule | None = None, wednesday: DaySchedule | None = None, thursday: DaySchedule | None = None, friday: DaySchedule | None = None, saturday: DaySchedule | None = None, **extra_data: Any)[source]
Bases:
ApiModel- sunday: DaySchedule | None
Operating mode schedule for Sunday.
- monday: DaySchedule | None
Operating mode schedule for Monday.
- tuesday: DaySchedule | None
Operating mode schedule for Tuesday.
- wednesday: DaySchedule | None
Operating mode schedule for Wednesday.
- thursday: DaySchedule | None
Operating mode schedule for Thursday.
- friday: DaySchedule | None
Operating mode schedule for Friday.
- saturday: DaySchedule | None
Operating mode schedule for Saturday.
- class wxc_sdk.telephony.operating_modes.OperatingMode(*, id: str | None = None, name: str | None = None, type: OperatingModeSchedule | None = None, level: ScheduleLevel | None = None, location: IdAndName | None = None, sameHoursDaily: SameHoursDaily | None = None, differentHoursDaily: DifferentHoursDaily | None = None, holidays: list[OperatingModeHoliday] | None = None, callForwarding: CallForwardingCommon | None = None, **extra_data: Any)[source]
Bases:
ApiModel- id: str | None
A unique identifier for the operating mode.
- name: str | None
Unique name for the operating mode.
- type: OperatingModeSchedule | None
Defines the scheduling of the operating mode.
- level: ScheduleLevel | None
Level at which the operating mode would be defined.
- location: IdAndName | None
Location object having a unique identifier for the location, and its name. Mandatory if level is LOCATION.
- same_hours_daily: SameHoursDaily | None
Operating mode schedule for same hours daily. Present if type is SAME_HOURS_DAILY.
- different_hours_daily: DifferentHoursDaily | None
Operating mode schedule for different hours daily. Present if type is DIFFERENT_HOURS_DAILY.
- holidays: list[OperatingModeHoliday] | None
Operating mode schedule for holidays. Present if type is HOLIDAY.
- call_forwarding: CallForwardingCommon | None
Call forwarding settings for an operating mode.
- class wxc_sdk.telephony.operating_modes.OperatingModeHoliday(*, id: str | None = None, name: str | None = None, allDayEnabled: bool | None = None, startDate: ~typing.Annotated[~datetime.date, ~pydantic.functional_serializers.PlainSerializer(func=~wxc_sdk.telephony.operating_modes.<lambda>, return_type=str, when_used=always)] | None = None, endDate: ~typing.Annotated[~datetime.date, ~pydantic.functional_serializers.PlainSerializer(func=~wxc_sdk.telephony.operating_modes.<lambda>, return_type=str, when_used=always)] | None = None, startTime: ~typing.Annotated[~datetime.time, ~pydantic.functional_serializers.PlainSerializer(func=~wxc_sdk.telephony.operating_modes.<lambda>, return_type=str, when_used=always)] | None = None, endTime: ~typing.Annotated[~datetime.time, ~pydantic.functional_serializers.PlainSerializer(func=~wxc_sdk.telephony.operating_modes.<lambda>, return_type=str, when_used=always)] | None = None, recurrence: ~wxc_sdk.telephony.operating_modes.OperatingModeRecurrence | None = None, **extra_data: ~typing.Any)[source]
Bases:
ApiModel- id: str | None
A unique identifier for the holiday.
- name: str | None
Name of the holiday.
- all_day_enabled: bool | None
Specifies if the operating mode holiday schedule event is enabled for the entire day. False if the flag is not set.
- start_date: <lambda>, return_type=str, when_used=always)] | None
Start date of the operating mode holiday.
- end_date: <lambda>, return_type=str, when_used=always)] | None
End date of the operating mode holiday.
- start_time: <lambda>, return_type=str, when_used=always)] | None
Start time for the operating mode holiday. Mandatory if allDayEnabled is false.
- end_time: <lambda>, return_type=str, when_used=always)] | None
End time for the operating mode holiday. Mandatory if allDayEnabled is false.
- recurrence: OperatingModeRecurrence | None
Recurrence configuration for the operating mode holiday.
- class wxc_sdk.telephony.operating_modes.OperatingModeRecurrence(*, recurYearlyByDate: OperatingModeRecurYearlyByDate | None = None, recurYearlyByDay: OperatingModeRecurYearlyByDay | None = None, **extra_data: Any)[source]
Bases:
ApiModel- recur_yearly_by_date: OperatingModeRecurYearlyByDate | None
Recurrence definition yearly by date.
- recur_yearly_by_day: OperatingModeRecurYearlyByDay | None
Recurrence definition yearly by day.
- class wxc_sdk.telephony.operating_modes.SameHoursDaily(*, mondayToFriday: DaySchedule | None = None, saturdayToSunday: DaySchedule | None = None, **extra_data: Any)[source]
Bases:
ApiModel- monday_to_friday: DaySchedule | None
Operating mode schedule for Monday to Friday.
- saturday_to_sunday: DaySchedule | None
Operating mode schedule for Saturday to Sunday.
- class wxc_sdk.telephony.operating_modes.OperatingModeSchedule(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str,SafeEnumAn enumeration.
- same_hours_daily = 'SAME_HOURS_DAILY'
Specifies the operating mode is active during the same hours daily (i.e., same schedule for Monday to Friday, and Saturday to Sunday).
- different_hours_daily = 'DIFFERENT_HOURS_DAILY'
Specifies the operating mode is active during different hours for different days of the week.
- holiday = 'HOLIDAY'
Specifies the operating mode is active during holidays with their own days, and recurrence.
- none_ = 'NONE'
Specifies the operating mode doesn’t have any schedules defined.
- class wxc_sdk.telephony.operating_modes.OperatingModeRecurYearlyByDate(*, dayOfMonth: int | None = None, month: Month | None = None, **extra_data: Any)[source]
Bases:
ApiModel- day_of_month: int | None
Schedule the event on a specific day of the month.
- class wxc_sdk.telephony.operating_modes.OperatingModeRecurYearlyByDay(*, day: Day | None = None, week: Week | None = None, month: Month | None = None, **extra_data: Any)[source]
Bases:
ApiModel
- class wxc_sdk.telephony.operating_modes.Day(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str,SafeEnumAn enumeration.
- sunday = 'SUNDAY'
Schedule the event on Sunday.
- monday = 'MONDAY'
Schedule the event on Monday.
- tuesday = 'TUESDAY'
Schedule the event on Tuesday.
- wednesday = 'WEDNESDAY'
Schedule the event on Wednesday.
- thursday = 'THURSDAY'
Schedule the event on Thursday.
- friday = 'FRIDAY'
Schedule the event on Friday.
- saturday = 'SATURDAY'
Schedule the event on Saturday.
- class wxc_sdk.telephony.operating_modes.Week(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str,SafeEnumAn enumeration.
- first = 'FIRST'
Schedule the event on the first week of the month.
- second = 'SECOND'
Schedule the event on the second week of the month.
- third = 'THIRD'
Schedule the event on the third week of the month.
- fourth = 'FOURTH'
Schedule the event on the fourth week of the month.
- last = 'LAST'
Schedule the event on the last week of the month.