Jump to content


Chat API: Success reply for declined chat


4 replies to this topic

#1 tkcn

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 08 May 2019 - 11:43 AM

Hello!

I am using chat api to create chat and send messages. Everything looks ok except for declined chats.

When I try to send message to a chat which is declined by the operator before, I cannot see any activity on livezilla app. Also Chat API returns same success message as we get for active chats.

{"Message":[],"Posts":[{"Message":{"ChatId":"29637","Text":"test"}}]} 

Is there a way to distinguish message reply for declined chats than active chats?



Thanks.

#2 tkcn

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 09 May 2019 - 07:56 AM

for the same case we cannot create a new chat with same userid. To keep chats accesible we use same UserId which is unique to our system.

in average our p_data value looks like this;

{"Chat":{"UserId":"12345678-12345","Customs":[["MyID",12345678],["CustomText","Details are coming here"]],"Fullname":"u.yucel","Identifier":"generic text here","Group":"LiveSupport2","Webhook":"127.0.0.1","Email":"u.yucel@ucy.com"}}

If the chat request is declined by Livezilla Operator, we can send a message and get success reply without entering the message also we cannot create a new chat for a while. after one or two minutes later same request successfully creates a new chat.

Can you please assist us here for both problems??

#3 tkcn

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 14 May 2019 - 07:14 AM

We believe this is a bug on livezilla side, can someone please assist here?

#4 Patrick Keil

    Administrator

  • Administrators
  • 3828 posts
  • LocationSingen, Germany

Posted 15 May 2019 - 12:30 PM

Hi,

Thanks for bringing this to our attention.

Quote

for the same case we cannot create a new chat with same userid
That's indeed not possible. Chat ID is unique as it identifies a chat session.

Quote

Everything looks ok except for declined chats.
When all operators involved (1 or more) have declined the chat request, the chat session will be considered as closed. That's not a bug but wanted.

Hope that helps.

#5 tkcn

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 15 May 2019 - 02:41 PM

Hi Patrick, thanks for your reply

Quote

That's indeed not possible. Chat ID is unique as it identifies a chat session.
We are able to create a new chat session with same ChatId immediately when the previous is closed or after some time when the previous is declined. Our problem here is why there is a delay for the declined case. We can confirm the chat is declined but we cannot create new chat session for a while. This period seems to be between 1 and 2 minutes.


Quote

{"Message":[],"Posts":[{"Message":{"ChatId":"29637","Text":"test"}}]}
Also we get this reply (when we send a message to declined chat) which denotes success but actually it is not the case. On operator side nothing happens, there isn't any notification. How can we understand that the chat is not received if we get success message?

I can provide more details with a direct message if you prefer, or I can post a video if helps.

Thanks.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users