Search code examples
pythonapizendeskzendesk-api

Updating Zendesk tickets from PostgreSQL database using Python API Client


We have a requirement where we want to show zendesk tickets updated with the data from PostgreSQL database , We are using Python as the scripting language and planning to use this API "http://docs.facetoe.com.au/zenpy.html" for this.

The idea is to help the service team to gather and see all the information in the Zendesk itself.There are additional data in the database which we want to show it in the tickets either as comments or a table structure with the details from other tickets which is raised by this user(We are taking the email address of the user for this).

There is no application at our DWH, So mostly google reference shows the integration between zendesk and some other applications and not much references about updating the tickets from the database via Python or other scripting languages.

So is it possible to pass the data from our DWH to be appeared in the zendesk tickets?

Can anyone helps/suggest me on how to achieve/start on this.


Solution

  • It is possible to update tickets from anywhere using python and some codding. Your problem can be solved in different ways. The first one, a little simpler: You make a simple python app and launch it with cron. App architecture will be like this:

    Main process periodically track new tickets in Zendesk using search request. If relevant to database ticket is found (you need some metrics to understand is it relevant ticket) you main process makes a post via ticket.update with information from database. And make a special tag on ticket, to understand that it was already updated.

    This is easy to write, but if you database data will be updated it will not be updated in ticket.

    The second option is to make private app on zendesk side with backend on you side.

    So in this case when your staff member opens some ticket app will request backend to display current data from database, relevant to this ticket. In this case you will see actual information everytime, but will get some database requests on every ticket open case.

    To make first script you will need: zenpy, sqlalchemy and 1-2 days codding.

    To make second option you will need: zenpy, sqlalchemy, flask, front-end interface.