Skip to main content

This library allows for you to integrate with Five9 Cloud Contact Center using Python.

Project description

|License MIT| | |PyPi Package| | |PyPi Versions|

|Build Status| | |Test Coverage| | |Code Climate|

Python Five9

This library allows you to interact with the Five9 Settings and Statistics Web
Services using Python.

* `Read The API Documentation <>`_


Installation is easiest using Pip and PyPi::

pip install five9

If you would like to contribute, or prefer Git::

git clone
cd python-five9
pip install -r requirements.txt
pip install .



.. code-block:: python

from five9 import Five9

client = Five9('user', 'password')

Configuration Web Services


* `Five9 <>`_
* `API Docs <>`_

Example - Get All Skills:

.. code-block:: python

# Returns
'description': None,
'id': 266184L,
'messageOfTheDay': None,
'name': 'TestSkill',
'routeVoiceMails': False

Example - Create a contact field to track modified time:

.. code-block:: python

'name': 'modified_at',
'displayAs': 'Invisible',
'mapTo': 'LastModifiedDateTime',
'type': 'DATE_TIME',
'system': True,

Example - Search for a contact by first and last name and get a list of ``dict``s
representing the result:

.. code-block:: python

criteria = client.create_criteria({
'first_name': 'Test',
'last_name': 'User',
result = client.configuration.getContactRecords(criteria)
# The above result is basically unusable. Parse into a list of dicts::
client.parse_response(result['fields'], result['records'])

Example - Update a contact using their first and last name as the search keys:

.. code-block:: python

contact = {
'first_name': 'Test',
'last_name': 'User',
'city': 'Las Vegas',
'state': 'NV',
'number1': '1234567890',
mapping = client.create_mapping(contact, keys=['first_name', 'last_name'])
record={'fields': mapping['fields']},
'fieldsMapping': mapping['field_mappings'],
'skipHeaderLine': True,
'crmAddMode': 'DONT_ADD',
'crmUpdateMode': 'UPDATE_SOLE_MATCHES',

Statistics Web Services


* `Five9 <>`_
* `API Docs <>`_

A supervisor session is required in order to perform most actions provided in the
Supervisor Web Service. Due to this, a session is implicitly created before the
supervisor is used.

The session is created with the following defaults. You can change the parameters
by changing the proper instance variable on the `Five9` object:

| Five9 Parameter | Instance Variable | Default |
| `forceLogoutSession` | `force_logout_session` | `True` |
| `rollingPeriod` | `rolling_period` | `Minutes30` |
| `statisticsRange` | `statistics_range` | `CurrentWeek` |
| `shiftStart` | `shift_start_hour` | `8` |
| `timeZone` | `time_zone_offset` | `-7` |

Example Use:

.. code-block:: python

# Setup a session - required for most things
# Returns
'mobileLimit': 0L,
'mobileLoggedin': 0L,
'supervisorLimit': 1L,
'supervisorsLoggedin': 1L

Known Issues / Roadmap

* The supervisor session options should be represented in a class and documented,
instead of the mostly undocumented free-form dictionary mapped to instance



* LasLabs: `Icon <>`_.


* Dave Lasley <>


.. image::
:alt: LasLabs Inc.

This module is maintained by LasLabs Inc.

.. |Build Status| image::
.. |Test Coverage| image::
.. |Code Climate| image::
.. |License MIT| image::
:alt: License: MIT
.. |PyPi Package| image::
:alt: PyPi Package
.. |PyPi Versions| image::
:alt: PyPi Versions

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

five9-0.0.3b192.tar.gz (15.5 kB view hashes)

Uploaded source

Built Distributions

five9-0.0.3b192-py3-none-any.whl (26.4 kB view hashes)

Uploaded py3

five9-0.0.3b192-py2-none-any.whl (26.4 kB view hashes)

Uploaded py2

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page