Author Topic: How to enable embedded chat link to a specific operator?  (Read 8264 times)

0 Members and 1 Guest are viewing this topic.

yaseer_jaffar

  • Sr. Member
  • ****
  • Posts: 25
How to enable embedded chat link to a specific operator?
« on: June 05, 2015, 04:34:34 AM »
I have added Signature text to the email with a link "Click here for Live Chat".
If an operator "X" sends this email to a visitor and if the visitor clicks that link, it should notify only that particular operator "X" if he is online.
Otherwise, I want to notify others. Please help me in this. Thanks in advance.

Dmitriy Simushev

  • Moderator
  • Native
  • *****
  • Posts: 345
Re: How to enable embedded chat link to a specific operator?
« Reply #1 on: June 05, 2015, 01:07:07 PM »
First of all there is no isolation for single operators in Mibew, but there is groups isolation.

Next, you can use GET parameter named "operator_code" to initialize chat with a specified operator. This parameter should be appended to URLs in button code. For example, if you have the following button's code (text link button):

Code: [Select]
<!-- mibew text link -->
    <a id="mibew-agent-button" href="http://<Your Domain>/mibew/chat?locale=en" target="_blank" onclick="Mibew.Objects.ChatPopups['55719c791fe9c955'].open();return false;">
        Start chat
     </a>
     <script type="text/javascript" src="http://<Your Domain>/mibew/js/compiled/chat_popup.js"></script>
     <script type="text/javascript">
         Mibew.ChatPopup.init({
             "id":"55719c791fe9c955",
             "url":"http:\/\/<Your Domain>\/mibew\/chat?locale=en",
             "preferIFrame":true,
             "modSecurity":false,
             "width":640,
             "height":480,
             "resizable":true,
             "styleLoader":"http:\/\/<Your Domain>\/mibew\/chat\/style\/popup"
         });
    </script>
<!-- / mibew text link -->

you should replace it with the following

Code: [Select]
<!-- mibew text link -->
    <a id="mibew-agent-button" href="http://<Your Domain>/mibew/chat?locale=en&operator_code=<YOUR OPERATOR'S CODE GOES HERE>" target="_blank" onclick="Mibew.Objects.ChatPopups['55719c791fe9c955'].open();return false;">
        Start chat
     </a>
     <script type="text/javascript" src="http://<Your Domain>/mibew/js/compiled/chat_popup.js"></script>
     <script type="text/javascript">
         Mibew.ChatPopup.init({
             "id":"55719c791fe9c955",
             "url":"http:\/\/<Your Domain>\/mibew\/chat?locale=en&operator_code=<YOUR OPERATOR'S CODE GOES HERE>",
             "preferIFrame":true,
             "modSecurity":false,
             "width":640,
             "height":480,
             "resizable":true,
             "styleLoader":"http:\/\/<Your Domain>\/mibew\/chat\/style\/popup"
         });
    </script>
<!-- / mibew text link -->

The operator code can be set at operator's profile page.

yaseer_jaffar

  • Sr. Member
  • ****
  • Posts: 25
Re: How to enable embedded chat link to a specific operator?
« Reply #2 on: June 08, 2015, 07:10:39 AM »
Thank you Dmitriy Simushev. I need some more clarifications on this.

Let us consider http://chat.mibew.local/ is my local host. And I have an operator "X" with code 902.
If I give URL http://chat.mibew.local/chat?locale=en&operator_code=902, then the message shows like that operator is offline. An operator will be with you shortly. This is the correct flow that I am expected.

But in the case, if that operator is online and we give the URL, the message shows like "An operator will be with you shortly" is getting displayed. In the operator side, only the notification is getting displayed. What I need is, I want that particular operator to getting opened the chat automatically. So, that the operator will know that the visitor want to chat with him only. Is there any way to get notify the operator "X" when a visitor give the URL http://chat.mibew.local/chat?locale=en&operator_code=902.

Help me. Thanks in advance.

Dmitriy Simushev

  • Moderator
  • Native
  • *****
  • Posts: 345
Re: How to enable embedded chat link to a specific operator?
« Reply #3 on: June 08, 2015, 07:48:09 AM »
Quote
Let us consider http://chat.mibew.local/ is my local host. And I have an operator "X" with code 902.
If I give URL http://chat.mibew.local/chat?locale=en&operator_code=902, then the message shows like that operator is offline. An operator will be with you shortly. This is the correct flow that I am expected.

But in the case, if that operator is online and we give the URL, the message shows like "An operator will be with you shortly" is getting displayed.

If there is at least one operator in the system, Mibew will not show message about offline operators. It just adds the client to the queue, so an online operator can pick him. You cannot show offline message if only selected operator is offline. As I see, the only option is to create groups for each operators and generate buttons for these groups.

Quote
In the operator side, only the notification is getting displayed. What I need is, I want that particular operator to getting opened the chat automatically. So, that the operator will know that the visitor want to chat with him only. Is there any way to get notify the operator "X" when a visitor give the URL http://chat.mibew.local/chat?locale=en&operator_code=902.

If the chat was started with specified operator, his name will be displayed in waiting queue. If you want different kind of notifications, create a plugin for that.

yaseer_jaffar

  • Sr. Member
  • ****
  • Posts: 25
Re: How to enable embedded chat link to a specific operator?
« Reply #4 on: June 08, 2015, 11:01:45 AM »
Thank you very much Dmitriy Simushev  :)