Live Helper Chat support forum.. Old google groups forum can be found here

You are not logged in.

Announcement

#1 2021-02-04 10:16:44

nkk64
New member
Registered: 2021-02-04
Posts: 2

Operator management using REST api.

Hi,

After some googling for open source chat solutions ith REST api we found livehelperchat and  decided to give it a try.
We need to integrate operator part into another homegrown app (let me call it parent app) so that chat runs in a frame.

We did some experimenting (creating users/departments) etc. and started to like it more and more.

Currently my understanding of the process of operator management is the following:

Operator logs to the parent app. At this moment to let chat server know that operator is ready we have to call (of course all calls are made using administrator user's credentials):

/restapi/updatelastactivity/{user_id}
/restapi/setonlinestatus/{user_id}/{online} with {online} = 1

Now chat server starts assigning chats to this user too.

Now if operator logs out from the parent program (or no longer wants to get chats assigned) all we have to do is to call:
/restapi/setonlinestatus/{user_id}/{online} with {online} = 0

If operator comes back withing 5 minutes to set him online calling setonlinestatus with {online} = 1 is enough, but after 5 minutes updatelastactivity has to be called again. I understand purpose of 5 min timeout but how can I increase it? (maybe grep php files for 30000? big_smile )

Things seem to work this way. I found no docs describing rest api and maybe I totally misunderstood how it was intended to work. E.g. my first idea was operator should start with  /restapi/login in the first place, but it does not work in this scenario.

So is it safe to assume that if we somehow change updatelastactivity interval to some large number we can externally manage operators using setonlinestatus ?

Regards,
Nick

Last edited by nkk64 (2021-02-04 10:18:12)

Offline

#2 2021-02-04 10:22:03

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,481
Website

Re: Operator management using REST api.

Hi,

You can under operator account https://doc.livehelperchat.com/docs/mob … ine-status

"always_on" attribute in user model.

So operator would be always online unless you go offline.

Fastest way to get help is just to use discord chat smile

Offline

#3 2021-02-04 10:49:20

nkk64
New member
Registered: 2021-02-04
Posts: 2

Re: Operator management using REST api.

Thanks. It was really fast here too smile

Offline

Board footer