Skip to content

GroupHuntGroupConsolidatedAddInstanceRequest

Bases: OCIRequest

Add a Hunt Group instance to a group. The domain is required in the serviceUserId.

If the phoneNumber has not been assigned to the group and addPhoneNumberToGroup is set to true,
it will be added to group if the command is executed by a service provider administrator or above
and the number is already assigned to the service provider. The command will fail otherwise.

The weight element inside the agentWeight element will only take effect if the policy element is
set to "Weighted" in the request.

The response is either SuccessResponse or ErrorResponse.
The following elements are only used in AS data mode:
   useSystemHuntGroupCLIDSetting, use value "true" in XS data mode
   includeHuntGroupNameInCLID, use value "true" in XS data mode

Attributes:

service_provider_id (str):

group_id (str):

service_user_id (str):

add_phone_number_to_group (Optional[bool]):

service_instance_profile (ServiceInstanceAddProfile):

policy (str):

hunt_after_no_answer (bool):

no_answer_number_of_rings (int):

forward_after_timeout (bool):

forward_timeout_seconds (int):

forward_to_phone_number (Optional[str]):

agent_user_id (Optional[List[str]]):

agent_weight (Optional[List[HuntAgentWeight]]):

allow_call_waiting_for_agents (bool):

use_system_hunt_group_clid_setting (bool):

include_hunt_group_name_in_clid (bool):

enable_not_reachable_forwarding (bool):

not_reachable_forward_to_phone_number (Optional[str]):

make_busy_when_not_reachable (bool):

allow_members_to_control_group_busy (bool):

enable_group_busy (bool):

apply_group_busy_when_terminating_to_agent (bool):

network_class_of_service (Optional[str]):

service (Optional[List[ConsolidatedUserServiceAssignment]]):

is_active (bool):

directory_number_hunting_agent_user_id_list (Optional[List[str]]):

directory_number_hunting_use_terminate_call_to_agent_first (Optional[bool]):

directory_number_hunting_use_original_agent_services_for_busy_and_no_answer_calls (Optional[bool]):
Source code in src/mercury_ocip_fast/commands/commands.py
@dataclass(kw_only=True)
class GroupHuntGroupConsolidatedAddInstanceRequest(OCIRequest):
    """Add a Hunt Group instance to a group.
        The domain is required in the serviceUserId.

        If the phoneNumber has not been assigned to the group and addPhoneNumberToGroup is set to true,
        it will be added to group if the command is executed by a service provider administrator or above
        and the number is already assigned to the service provider. The command will fail otherwise.

        The weight element inside the agentWeight element will only take effect if the policy element is
        set to \"Weighted\" in the request.

        The response is either SuccessResponse or ErrorResponse.
        The following elements are only used in AS data mode:
           useSystemHuntGroupCLIDSetting, use value \"true\" in XS data mode
           includeHuntGroupNameInCLID, use value \"true\" in XS data mode

    Attributes:

        service_provider_id (str):

        group_id (str):

        service_user_id (str):

        add_phone_number_to_group (Optional[bool]):

        service_instance_profile (ServiceInstanceAddProfile):

        policy (str):

        hunt_after_no_answer (bool):

        no_answer_number_of_rings (int):

        forward_after_timeout (bool):

        forward_timeout_seconds (int):

        forward_to_phone_number (Optional[str]):

        agent_user_id (Optional[List[str]]):

        agent_weight (Optional[List[HuntAgentWeight]]):

        allow_call_waiting_for_agents (bool):

        use_system_hunt_group_clid_setting (bool):

        include_hunt_group_name_in_clid (bool):

        enable_not_reachable_forwarding (bool):

        not_reachable_forward_to_phone_number (Optional[str]):

        make_busy_when_not_reachable (bool):

        allow_members_to_control_group_busy (bool):

        enable_group_busy (bool):

        apply_group_busy_when_terminating_to_agent (bool):

        network_class_of_service (Optional[str]):

        service (Optional[List[ConsolidatedUserServiceAssignment]]):

        is_active (bool):

        directory_number_hunting_agent_user_id_list (Optional[List[str]]):

        directory_number_hunting_use_terminate_call_to_agent_first (Optional[bool]):

        directory_number_hunting_use_original_agent_services_for_busy_and_no_answer_calls (Optional[bool]):

    """

    service_provider_id: str = field(metadata={"alias": "serviceProviderId"})

    group_id: str = field(metadata={"alias": "groupId"})

    service_user_id: str = field(metadata={"alias": "serviceUserId"})

    add_phone_number_to_group: Optional[bool] = field(
        default=None, metadata={"alias": "addPhoneNumberToGroup"}
    )

    service_instance_profile: ServiceInstanceAddProfile = field(
        metadata={"alias": "serviceInstanceProfile"}
    )

    policy: str = field(metadata={"alias": "policy"})

    hunt_after_no_answer: bool = field(metadata={"alias": "huntAfterNoAnswer"})

    no_answer_number_of_rings: int = field(metadata={"alias": "noAnswerNumberOfRings"})

    forward_after_timeout: bool = field(metadata={"alias": "forwardAfterTimeout"})

    forward_timeout_seconds: int = field(metadata={"alias": "forwardTimeoutSeconds"})

    forward_to_phone_number: Optional[str] = field(
        default=None, metadata={"alias": "forwardToPhoneNumber"}
    )

    agent_user_id: Optional[List[str]] = field(
        default=None, metadata={"alias": "agentUserId"}
    )

    agent_weight: Optional[List[HuntAgentWeight]] = field(
        default=None, metadata={"alias": "agentWeight"}
    )

    allow_call_waiting_for_agents: bool = field(
        metadata={"alias": "allowCallWaitingForAgents"}
    )

    use_system_hunt_group_clid_setting: bool = field(
        metadata={"alias": "useSystemHuntGroupCLIDSetting"}
    )

    include_hunt_group_name_in_clid: bool = field(
        metadata={"alias": "includeHuntGroupNameInCLID"}
    )

    enable_not_reachable_forwarding: bool = field(
        metadata={"alias": "enableNotReachableForwarding"}
    )

    not_reachable_forward_to_phone_number: Optional[str] = field(
        default=None, metadata={"alias": "notReachableForwardToPhoneNumber"}
    )

    make_busy_when_not_reachable: bool = field(
        metadata={"alias": "makeBusyWhenNotReachable"}
    )

    allow_members_to_control_group_busy: bool = field(
        metadata={"alias": "allowMembersToControlGroupBusy"}
    )

    enable_group_busy: bool = field(metadata={"alias": "enableGroupBusy"})

    apply_group_busy_when_terminating_to_agent: bool = field(
        metadata={"alias": "applyGroupBusyWhenTerminatingToAgent"}
    )

    network_class_of_service: Optional[str] = field(
        default=None, metadata={"alias": "networkClassOfService"}
    )

    service: Optional[List[ConsolidatedUserServiceAssignment]] = field(
        default=None, metadata={"alias": "service"}
    )

    is_active: bool = field(metadata={"alias": "isActive"})

    directory_number_hunting_agent_user_id_list: Optional[List[str]] = field(
        default=None, metadata={"alias": "directoryNumberHuntingAgentUserIdList"}
    )

    directory_number_hunting_use_terminate_call_to_agent_first: Optional[bool] = field(
        default=None,
        metadata={"alias": "directoryNumberHuntingUseTerminateCallToAgentFirst"},
    )

    directory_number_hunting_use_original_agent_services_for_busy_and_no_answer_calls: Optional[
        bool
    ] = field(
        default=None,
        metadata={
            "alias": "directoryNumberHuntingUseOriginalAgentServicesForBusyAndNoAnswerCalls"
        },
    )

Responses

Bases: OCIResponse

Source code in src/mercury_ocip_fast/commands/base_command.py
class SuccessResponse(OCIResponse):
    pass

Bases: OCIResponse

Source code in src/mercury_ocip_fast/commands/base_command.py
class ErrorResponse(OCIResponse):
    errorCode: Optional[int] = None
    summary: str
    summaryEnglish: str
    detail: Optional[str] = None

Example Usage

from mercury_ocip_fast.client import Client
from mercury_ocip_fast.commands import GroupHuntGroupConsolidatedAddInstanceRequest

client = Client()

command = GroupHuntGroupConsolidatedAddInstanceRequest(
    service_provider_id=...,
    group_id=...,
    service_user_id=...,
    add_phone_number_to_group=...,
    service_instance_profile=...,
    policy=...,
    hunt_after_no_answer=...,
    no_answer_number_of_rings=...,
    forward_after_timeout=...,
    forward_timeout_seconds=...,
    forward_to_phone_number=...,
    agent_user_id=...,
    agent_weight=...,
    allow_call_waiting_for_agents=...,
    use_system_hunt_group_clid_setting=...,
    include_hunt_group_name_in_clid=...,
    enable_not_reachable_forwarding=...,
    not_reachable_forward_to_phone_number=...,
    make_busy_when_not_reachable=...,
    allow_members_to_control_group_busy=...,
    enable_group_busy=...,
    apply_group_busy_when_terminating_to_agent=...,
    network_class_of_service=...,
    service=...,
    is_active=...,
    directory_number_hunting_agent_user_id_list=...,
    directory_number_hunting_use_terminate_call_to_agent_first=...,
    directory_number_hunting_use_original_agent_services_for_busy_and_no_answer_calls=...,
)

response = client.command(command)

print(response)

Example 2 with Raw Command

from mercury_ocip_fast.client import Client

client = Client()

response = client.raw_command("GroupHuntGroupConsolidatedAddInstanceRequest",
    service_provider_id=...,
    group_id=...,
    service_user_id=...,
    add_phone_number_to_group=...,
    service_instance_profile=...,
    policy=...,
    hunt_after_no_answer=...,
    no_answer_number_of_rings=...,
    forward_after_timeout=...,
    forward_timeout_seconds=...,
    forward_to_phone_number=...,
    agent_user_id=...,
    agent_weight=...,
    allow_call_waiting_for_agents=...,
    use_system_hunt_group_clid_setting=...,
    include_hunt_group_name_in_clid=...,
    enable_not_reachable_forwarding=...,
    not_reachable_forward_to_phone_number=...,
    make_busy_when_not_reachable=...,
    allow_members_to_control_group_busy=...,
    enable_group_busy=...,
    apply_group_busy_when_terminating_to_agent=...,
    network_class_of_service=...,
    service=...,
    is_active=...,
    directory_number_hunting_agent_user_id_list=...,
    directory_number_hunting_use_terminate_call_to_agent_first=...,
    directory_number_hunting_use_original_agent_services_for_busy_and_no_answer_calls=...,
)

print(response)