Author Topic: Need to synchronize QM agents/users with third-side database  (Read 2111 times)

qmax

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 0
  • Asterisk-11.7.0-ubuntu, Queuemetrics-15.10.1-tgz
    • View Profile
    • Email
Need to synchronize QM agents/users with third-side database
« on: September 03, 2014, 09:40:48 »
Hi.

We need to synchronize database of QM agents with QM users and database of third party application.
That is:
creating an agent should automatically create related user and a record in another database.
deleting an agent should delete all related records.

Is there any hooks or whatever tricks to achieve this?

mirkox

  • Full Member
  • ***
  • Posts: 231
  • Karma: 4
    • View Profile
Re: Need to synchronize QM agents/users with third-side database
« Reply #1 on: September 03, 2014, 10:49:24 »
Hi,

QueueMetrics' Json API (QM 14.06+) has the possibility to add / remove agents, queues, users and so on in QM.
You can use that to integrate with your system.

http://manuals.loway.ch/QM_JSON_manual-chunked/

Best Regards
Mirko

qmax

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 0
  • Asterisk-11.7.0-ubuntu, Queuemetrics-15.10.1-tgz
    • View Profile
    • Email
Re: Need to synchronize QM agents/users with third-side database
« Reply #2 on: September 04, 2014, 16:29:20 »
This is REST API, allowing CRUD operations on various objects.
To achieve the goal this way, I have to maintain "master" database, implement some web-application to edit agents there and update QM databases from its backand.
This is quite achievable even without REST API - I could access QM mysql tables directly from my app backend.

My intention is to leave agents creation in queuemetrics web interface with all its features, but then to catch events when an agent is created and perform synchronisation actions in other app.


mirkox

  • Full Member
  • ***
  • Posts: 231
  • Karma: 4
    • View Profile
Re: Need to synchronize QM agents/users with third-side database
« Reply #3 on: September 05, 2014, 10:21:24 »
Hello qmax,

you're right, I thinked that you wanted to synchronize QueueMetrics with your other applications (this is what people ask us usually  :)), instead you want to do the opposite (synchronize other applications based on QueueMetrics objects creation).

Well, actually QueueMetrics doens't have any hook for these events;scan the database periodically, or using the API is the only solution at the moment.