five9.models package

Submodules

five9.models.base_model module

class five9.models.base_model.BaseModel(**kwargs)[source]

Bases: properties.base.base.HasProperties

All models should be inherited from this.

Currently it does nothing other than provide a common inheritance point within this library, plus a CRUD skeleton.

classmethod create(five9, data, refresh=False)[source]

Create a record on Five9.

Parameters:
  • five9 (five9.Five9) – The authenticated Five9 remote.
  • data (dict) – A data dictionary that can be fed to deserialize.
  • refresh (bool, optional) – Set to True to get the record data from Five9 before returning the record.
Returns:

The newly created record. If refresh is True,

this will be fetched from Five9. Otherwise, it’s the data record that was sent to the server.

Return type:

BaseModel

delete(five9)[source]

Delete the record from the remote.

Parameters:five9 (five9.Five9) – The authenticated Five9 remote.
get(key, default=None)[source]

Return the field indicated by the key, if present.

classmethod read(five9, external_id)[source]

Return a record singleton for the ID.

Parameters:
  • five9 (five9.Five9) – The authenticated Five9 remote.
  • external_id (mixed) – The identified on Five9. This should be the value that is in the __uid_field__ field on the record.
Returns:

The record, if found. Otherwise None

Return type:

BaseModel

classmethod search(five9, filters)[source]

Search for a record on the remote and return the results.

Parameters:
  • five9 (five9.Five9) – The authenticated Five9 remote.
  • filters (dict) – A dictionary of search parameters, keyed by the name of the field to search. This should conform to the schema defined in five9.Five9.create_criteria().
Returns:

A list of records representing the result.

Return type:

list[BaseModel]

update(data)[source]

Update the current memory record with the given data dict.

Parameters:data (dict) – Data dictionary to update the record attributes with.
write(five9)[source]

Write the record to the remote.

Parameters:five9 (five9.Five9) – The authenticated Five9 remote.

five9.models.disposition module

class five9.models.disposition.Disposition(**kwargs)[source]

Bases: five9.models.base_model.BaseModel

Required Properties:

  • agentMustCompleteWorksheet (Bool): Whether the agent needs to complete a worksheet before selecting a disposition., a boolean
  • agentMustConfirm (Bool): Whether the agent is prompted to confirm the selection of the disposition., a boolean
  • description (String): Description of the disposition., a unicode string
  • name (String): Name of the disposition., a unicode string
  • resetAttemptsCounter (Bool): Whether assigning the disposition resets the number of dialing attempts for this contact., a boolean
  • sendEmailNotification (Bool): Whether call details are sent as an email notification when the disposition is used by an agent., a boolean
  • sendIMNotification (Bool): Whether call details are sent as an instant message in the Five9 system when the disposition is used by an agent., a boolean
  • trackAsFirstCallResolution (Bool): Whether the call is included in the first call resolution statistics (customer’s needs addressed in the first call). Used primarily for inbound campaigns., a boolean
  • type (StringChoice): Disposition type., any of “FinalDisp” (Any contact number of the contact is not dialed again by the current campaign.), “FinalApplyToCampaigns” (Contact is not dialed again by any campaign that contains the disposition.), “AddActiveNumber” (Adds the number dialed to the DNC list.), “AddAndFinalize” (Adds the call results to the campaign history. This record is no longer dialing in this campaign. Does not add the contact’s other phone numbers to the DNC list.), “AddAllNumbers” (Adds all the contact’s phone numbers to the DNC list.), “DoNotDial” (Number is not dialed in the campaign, but other numbers from the CRM record can be dialed.), “RedialNumber” (Number is dialed again when the list to dial is completed, and the dialer starts again from the beginning.)
  • typeParameters (DispositionTypeParams): Parameters that apply to the disposition type., an instance of DispositionTypeParams
agentMustCompleteWorksheet

Whether the agent needs to complete a worksheet before selecting a disposition.

agentMustConfirm

Whether the agent is prompted to confirm the selection of the disposition.

classmethod create(five9, data, refresh=False)[source]

Create a record on Five9.

Parameters:
  • five9 (five9.Five9) – The authenticated Five9 remote.
  • data (dict) – A data dictionary that can be fed to deserialize.
  • refresh (bool, optional) – Set to True to get the record data from Five9 before returning the record.
Returns:

The newly created record. If refresh is True,

this will be fetched from Five9. Otherwise, it’s the data record that was sent to the server.

Return type:

BaseModel

delete(five9)[source]

Delete the record from the remote.

Parameters:five9 (five9.Five9) – The authenticated Five9 remote.
description

Description of the disposition.

name

Name of the disposition.

resetAttemptsCounter

Whether assigning the disposition resets the number of dialing attempts for this contact.

classmethod search(five9, filters)[source]

Search for a record on the remote and return the results.

Parameters:
  • five9 (five9.Five9) – The authenticated Five9 remote.
  • filters (dict) – A dictionary of search parameters, keyed by the name of the field to search. This should conform to the schema defined in five9.Five9.create_criteria().
Returns:

A list of records representing the result.

Return type:

list[BaseModel]

sendEmailNotification

Whether call details are sent as an email notification when the disposition is used by an agent.

sendIMNotification

Whether call details are sent as an instant message in the Five9 system when the disposition is used by an agent.

trackAsFirstCallResolution

Whether the call is included in the first call resolution statistics (customer’s needs addressed in the first call). Used primarily for inbound campaigns.

type

Disposition type.

typeParameters

Parameters that apply to the disposition type.

write(five9)[source]

Update the record on the remote.

Parameters:five9 (five9.Five9) – The authenticated Five9 remote.

five9.models.disposition_type_params module

class five9.models.disposition_type_params.DispositionTypeParams(**kwargs)[source]

Bases: five9.models.base_model.BaseModel

Required Properties:

  • allowChangeTimer (Bool): Whether the agent can change the redial timer for this disposition., a boolean
  • attempts (Integer): Number of redial attempts., an integer
  • timer (Timer): Redial timer., an instance of Timer
  • useTimer (Bool): Whether this disposition uses a redial timer., a boolean
allowChangeTimer

Whether the agent can change the redial timer for this disposition.

attempts

Number of redial attempts.

timer

Redial timer.

useTimer

Whether this disposition uses a redial timer.

five9.models.key_value_pair module

class five9.models.key_value_pair.KeyValuePair(key, value, **kwargs)[source]

Bases: five9.models.base_model.BaseModel

Required Properties:

  • key (String): Name used to identify the pair., a unicode string
  • value (String): Value that corresponds to the name., a unicode string
key

Name used to identify the pair.

value

Value that corresponds to the name.

five9.models.timer module

class five9.models.timer.Timer(**kwargs)[source]

Bases: five9.models.base_model.BaseModel

Required Properties:

  • days (Integer): Number of days., an integer
  • hours (Integer): Number of hours., an integer
  • minutes (Integer): Number of minutes., an integer
  • seconds (Integer): Number of seconds., an integer
days

Number of days.

hours

Number of hours.

minutes

Number of minutes.

seconds

Number of seconds.

five9.models.web_connector module

class five9.models.web_connector.WebConnector(**kwargs)[source]

Bases: five9.models.base_model.BaseModel

Contains the configuration details of a web connector.

Required Properties:

  • addWorksheet (Bool): Applies only to POST requests. Whether to pass worksheet answers as parameters., a boolean
  • agentApplication (StringChoice): If executeInBrowser==True, this parameter specifies whether to open the URL in an external or an embedded browser., either “EmbeddedBrowser” (Embedded browser window.) or “ExternalBrowser” (External browser window.), Default: EmbeddedBrowser
  • clearTriggerDispositions (Bool): When modifying an existing connector, whether to clear the existing triggers., a boolean
  • constants (a list of KeyValuePair): List of parameters passed with constant values., a list (each item is an instance of KeyValuePair)
  • ctiWebServices (StringChoice): In the Internet Explorer toolbar, whether to open the HTTP request in the current or a new browser window., either “CurrentBrowserWindow” (Current browser window.) or “NewBrowserWindow” (New browser window.), Default: CurrentBrowserWindow
  • description (String): Purpose of the connector., a unicode string
  • executeInBrowser (Bool): When enabling the agent to view or enter data, whether to open the URL in an embedded or external browser window., a boolean
  • name (String): Name of the connector, a unicode string
  • postConstants (a list of KeyValuePair): When using the POST method, constant parameters to pass in the URL., a list (each item is an instance of KeyValuePair)
  • postMethod (Bool): Whether the HTTP request type is POST., a boolean
  • postVariables (a list of KeyValuePair): When using the POST method, variable parameters to pass in the URL., a list (each item is an instance of KeyValuePair)
  • startPageText (String): When using the POST method, enables the administrator to enter text to be displayed in the browser (or agent Browser tab) while waiting for the completion of the connector., a unicode string
  • trigger (StringChoice): Available trigger during a call when the request is sent., any of “OnCallAccepted” (Triggered when the call is accepted.), “OnCallDisconnected” (Triggered when the call is disconnected.), “ManuallyStarted” (Connector is started manually.), “ManuallyStartedAllowDuringPreviews” (Connector is started manually during call preview.), “OnPreview” (Triggered when the call is previewed.), “OnContactSelection” (Triggered when a contact is selected.), “OnWarmTransferInitiation” (Triggered when a warm transfer is initiated.), “OnCallDispositioned” (Triggered when a disposition is selected.), “OnChatArrival” (Triggered when a chat message is delivered to an agent.), “OnChatTransfer” (Triggered when a chat session is transferred.), “OnChatTermination” (Triggered when the customer or the agent closed the session, but the agent has not yet set the disposition.), “OnChatClose” (Triggered when the disposition is set.), “OnEmailArrival” (Triggered when an email message is delivered to the agent.), “OnEmailTransfer” (Triggered when an email message is transferred.), “OnEmailClose” (Triggered when the disposition is set.)
  • triggerDispositions (a list of Disposition): When the trigger is OnCallDispositioned, specifies the trigger dispositions., a list (each item is an instance of Disposition)
  • url (String): URI of the external web site., a unicode string
  • variables (a list of KeyValuePair): When using the POST method, connectors can include worksheet data as parameter values. The variable placeholder values are surrounded by @ signs. For example, the parameter ANI has the value @Call.ANI@, a list (each item is an instance of KeyValuePair)
addWorksheet

Applies only to POST requests. Whether to pass worksheet answers as parameters.

agentApplication

If executeInBrowser==True, this parameter specifies whether to open the URL in an external or an embedded browser.

clearTriggerDispositions

When modifying an existing connector, whether to clear the existing triggers.

constants

List of parameters passed with constant values.

classmethod create(five9, data, refresh=False)[source]
ctiWebServices

In the Internet Explorer toolbar, whether to open the HTTP request in the current or a new browser window.

delete(five9)[source]

Delete the record from the remote.

Parameters:five9 (five9.Five9) – The authenticated Five9 remote.
description

Purpose of the connector.

executeInBrowser

When enabling the agent to view or enter data, whether to open the URL in an embedded or external browser window.

name

Name of the connector

postConstants

When using the POST method, constant parameters to pass in the URL.

postMethod

Whether the HTTP request type is POST.

postVariables

When using the POST method, variable parameters to pass in the URL.

classmethod search(five9, filters)[source]

Search for a record on the remote and return the results.

Parameters:
  • five9 (five9.Five9) – The authenticated Five9 remote.
  • filters (dict) – A dictionary of search parameters, keyed by the name of the field to search. This should conform to the schema defined in five9.Five9.create_criteria().
Returns:

A list of records representing the result.

Return type:

list[BaseModel]

startPageText

When using the POST method, enables the administrator to enter text to be displayed in the browser (or agent Browser tab) while waiting for the completion of the connector.

trigger

Available trigger during a call when the request is sent.

triggerDispositions

When the trigger is OnCallDispositioned, specifies the trigger dispositions.

url

URI of the external web site.

variables

When using the POST method, connectors can include worksheet data as parameter values. The variable placeholder values are surrounded by @ signs. For example, the parameter ANI has the value @Call.ANI@

write(five9)[source]

Update the record on the remote.

Parameters:five9 (five9.Five9) – The authenticated Five9 remote.

Module contents

class five9.models.Disposition(**kwargs)[source]

Bases: five9.models.base_model.BaseModel

Required Properties:

  • agentMustCompleteWorksheet (Bool): Whether the agent needs to complete a worksheet before selecting a disposition., a boolean
  • agentMustConfirm (Bool): Whether the agent is prompted to confirm the selection of the disposition., a boolean
  • description (String): Description of the disposition., a unicode string
  • name (String): Name of the disposition., a unicode string
  • resetAttemptsCounter (Bool): Whether assigning the disposition resets the number of dialing attempts for this contact., a boolean
  • sendEmailNotification (Bool): Whether call details are sent as an email notification when the disposition is used by an agent., a boolean
  • sendIMNotification (Bool): Whether call details are sent as an instant message in the Five9 system when the disposition is used by an agent., a boolean
  • trackAsFirstCallResolution (Bool): Whether the call is included in the first call resolution statistics (customer’s needs addressed in the first call). Used primarily for inbound campaigns., a boolean
  • type (StringChoice): Disposition type., any of “FinalDisp” (Any contact number of the contact is not dialed again by the current campaign.), “FinalApplyToCampaigns” (Contact is not dialed again by any campaign that contains the disposition.), “AddActiveNumber” (Adds the number dialed to the DNC list.), “AddAndFinalize” (Adds the call results to the campaign history. This record is no longer dialing in this campaign. Does not add the contact’s other phone numbers to the DNC list.), “AddAllNumbers” (Adds all the contact’s phone numbers to the DNC list.), “DoNotDial” (Number is not dialed in the campaign, but other numbers from the CRM record can be dialed.), “RedialNumber” (Number is dialed again when the list to dial is completed, and the dialer starts again from the beginning.)
  • typeParameters (DispositionTypeParams): Parameters that apply to the disposition type., an instance of DispositionTypeParams
agentMustCompleteWorksheet

Whether the agent needs to complete a worksheet before selecting a disposition.

agentMustConfirm

Whether the agent is prompted to confirm the selection of the disposition.

classmethod create(five9, data, refresh=False)[source]

Create a record on Five9.

Parameters:
  • five9 (five9.Five9) – The authenticated Five9 remote.
  • data (dict) – A data dictionary that can be fed to deserialize.
  • refresh (bool, optional) – Set to True to get the record data from Five9 before returning the record.
Returns:

The newly created record. If refresh is True,

this will be fetched from Five9. Otherwise, it’s the data record that was sent to the server.

Return type:

BaseModel

delete(five9)[source]

Delete the record from the remote.

Parameters:five9 (five9.Five9) – The authenticated Five9 remote.
description

Description of the disposition.

name

Name of the disposition.

resetAttemptsCounter

Whether assigning the disposition resets the number of dialing attempts for this contact.

classmethod search(five9, filters)[source]

Search for a record on the remote and return the results.

Parameters:
  • five9 (five9.Five9) – The authenticated Five9 remote.
  • filters (dict) – A dictionary of search parameters, keyed by the name of the field to search. This should conform to the schema defined in five9.Five9.create_criteria().
Returns:

A list of records representing the result.

Return type:

list[BaseModel]

sendEmailNotification

Whether call details are sent as an email notification when the disposition is used by an agent.

sendIMNotification

Whether call details are sent as an instant message in the Five9 system when the disposition is used by an agent.

trackAsFirstCallResolution

Whether the call is included in the first call resolution statistics (customer’s needs addressed in the first call). Used primarily for inbound campaigns.

type

Disposition type.

typeParameters

Parameters that apply to the disposition type.

write(five9)[source]

Update the record on the remote.

Parameters:five9 (five9.Five9) – The authenticated Five9 remote.
class five9.models.DispositionTypeParams(**kwargs)[source]

Bases: five9.models.base_model.BaseModel

Required Properties:

  • allowChangeTimer (Bool): Whether the agent can change the redial timer for this disposition., a boolean
  • attempts (Integer): Number of redial attempts., an integer
  • timer (Timer): Redial timer., an instance of Timer
  • useTimer (Bool): Whether this disposition uses a redial timer., a boolean
allowChangeTimer

Whether the agent can change the redial timer for this disposition.

attempts

Number of redial attempts.

timer

Redial timer.

useTimer

Whether this disposition uses a redial timer.

class five9.models.KeyValuePair(key, value, **kwargs)[source]

Bases: five9.models.base_model.BaseModel

Required Properties:

  • key (String): Name used to identify the pair., a unicode string
  • value (String): Value that corresponds to the name., a unicode string
key

Name used to identify the pair.

value

Value that corresponds to the name.

class five9.models.Timer(**kwargs)[source]

Bases: five9.models.base_model.BaseModel

Required Properties:

  • days (Integer): Number of days., an integer
  • hours (Integer): Number of hours., an integer
  • minutes (Integer): Number of minutes., an integer
  • seconds (Integer): Number of seconds., an integer
days

Number of days.

hours

Number of hours.

minutes

Number of minutes.

seconds

Number of seconds.

class five9.models.WebConnector(**kwargs)[source]

Bases: five9.models.base_model.BaseModel

Contains the configuration details of a web connector.

Required Properties:

  • addWorksheet (Bool): Applies only to POST requests. Whether to pass worksheet answers as parameters., a boolean
  • agentApplication (StringChoice): If executeInBrowser==True, this parameter specifies whether to open the URL in an external or an embedded browser., either “EmbeddedBrowser” (Embedded browser window.) or “ExternalBrowser” (External browser window.), Default: EmbeddedBrowser
  • clearTriggerDispositions (Bool): When modifying an existing connector, whether to clear the existing triggers., a boolean
  • constants (a list of KeyValuePair): List of parameters passed with constant values., a list (each item is an instance of KeyValuePair)
  • ctiWebServices (StringChoice): In the Internet Explorer toolbar, whether to open the HTTP request in the current or a new browser window., either “CurrentBrowserWindow” (Current browser window.) or “NewBrowserWindow” (New browser window.), Default: CurrentBrowserWindow
  • description (String): Purpose of the connector., a unicode string
  • executeInBrowser (Bool): When enabling the agent to view or enter data, whether to open the URL in an embedded or external browser window., a boolean
  • name (String): Name of the connector, a unicode string
  • postConstants (a list of KeyValuePair): When using the POST method, constant parameters to pass in the URL., a list (each item is an instance of KeyValuePair)
  • postMethod (Bool): Whether the HTTP request type is POST., a boolean
  • postVariables (a list of KeyValuePair): When using the POST method, variable parameters to pass in the URL., a list (each item is an instance of KeyValuePair)
  • startPageText (String): When using the POST method, enables the administrator to enter text to be displayed in the browser (or agent Browser tab) while waiting for the completion of the connector., a unicode string
  • trigger (StringChoice): Available trigger during a call when the request is sent., any of “OnCallAccepted” (Triggered when the call is accepted.), “OnCallDisconnected” (Triggered when the call is disconnected.), “ManuallyStarted” (Connector is started manually.), “ManuallyStartedAllowDuringPreviews” (Connector is started manually during call preview.), “OnPreview” (Triggered when the call is previewed.), “OnContactSelection” (Triggered when a contact is selected.), “OnWarmTransferInitiation” (Triggered when a warm transfer is initiated.), “OnCallDispositioned” (Triggered when a disposition is selected.), “OnChatArrival” (Triggered when a chat message is delivered to an agent.), “OnChatTransfer” (Triggered when a chat session is transferred.), “OnChatTermination” (Triggered when the customer or the agent closed the session, but the agent has not yet set the disposition.), “OnChatClose” (Triggered when the disposition is set.), “OnEmailArrival” (Triggered when an email message is delivered to the agent.), “OnEmailTransfer” (Triggered when an email message is transferred.), “OnEmailClose” (Triggered when the disposition is set.)
  • triggerDispositions (a list of Disposition): When the trigger is OnCallDispositioned, specifies the trigger dispositions., a list (each item is an instance of Disposition)
  • url (String): URI of the external web site., a unicode string
  • variables (a list of KeyValuePair): When using the POST method, connectors can include worksheet data as parameter values. The variable placeholder values are surrounded by @ signs. For example, the parameter ANI has the value @Call.ANI@, a list (each item is an instance of KeyValuePair)
addWorksheet

Applies only to POST requests. Whether to pass worksheet answers as parameters.

agentApplication

If executeInBrowser==True, this parameter specifies whether to open the URL in an external or an embedded browser.

clearTriggerDispositions

When modifying an existing connector, whether to clear the existing triggers.

constants

List of parameters passed with constant values.

classmethod create(five9, data, refresh=False)[source]
ctiWebServices

In the Internet Explorer toolbar, whether to open the HTTP request in the current or a new browser window.

delete(five9)[source]

Delete the record from the remote.

Parameters:five9 (five9.Five9) – The authenticated Five9 remote.
description

Purpose of the connector.

executeInBrowser

When enabling the agent to view or enter data, whether to open the URL in an embedded or external browser window.

name

Name of the connector

postConstants

When using the POST method, constant parameters to pass in the URL.

postMethod

Whether the HTTP request type is POST.

postVariables

When using the POST method, variable parameters to pass in the URL.

classmethod search(five9, filters)[source]

Search for a record on the remote and return the results.

Parameters:
  • five9 (five9.Five9) – The authenticated Five9 remote.
  • filters (dict) – A dictionary of search parameters, keyed by the name of the field to search. This should conform to the schema defined in five9.Five9.create_criteria().
Returns:

A list of records representing the result.

Return type:

list[BaseModel]

startPageText

When using the POST method, enables the administrator to enter text to be displayed in the browser (or agent Browser tab) while waiting for the completion of the connector.

trigger

Available trigger during a call when the request is sent.

triggerDispositions

When the trigger is OnCallDispositioned, specifies the trigger dispositions.

url

URI of the external web site.

variables

When using the POST method, connectors can include worksheet data as parameter values. The variable placeholder values are surrounded by @ signs. For example, the parameter ANI has the value @Call.ANI@

write(five9)[source]

Update the record on the remote.

Parameters:five9 (five9.Five9) – The authenticated Five9 remote.