Agent Desktop

Get Involved. Join the Conversation.

Topic

    Sristy Arya
    How to find the Browser details
    Topic posted January 23, 2019 by Sristy AryaBronze Trophy: 5,000+ Points 
    141 Views, 9 Comments
    Title:
    How to find the Browser details
    Summary:
    How to find the Browser details of the contact who replied to an incident ?
    Version:
    17D

    Comment

     

    • Luuk

      If you're using the customer portal, you'll need to make customizations to the reply page.

      You'll need to create a custom field or something like that to save browser data into that custom field.

    • Sebastiaan Draaisma

      I agree with Luuk.

      While the browser details are available in cp_visitor_stats.browser_id you are unable to tie this to an incident through regular analytics. A custom field for incidents would solve this and you may be able to assign the cp_visitor_stats.browser_id value to a custom field on your CP and have the data easy accessable. If it's more than just browser name & version you want, you may want to work with a custom field text area and store the details in there. You then have the freedom to include all kinds of details as it allows for more characters.

    • Maruvada Manoj
      Hi, You can generate or view report of number of visitors to Ur portal by browser. You can check the time of incident and activity of visitor parallely so u can narrow it down. For permanent solution I agree with luuk
      • Sebastiaan Draaisma

        Your idea was a good one. It gave me the idea to try match the date/time stamp with the incident updated time & source through ROQL which may have done the trick. Unfortunately... the cp_visitor_stats.stat_date only gives you the date and hour the visitor stats where created. So it seems more like a utility that runs every hour to generate the data as there is no full time stamp available. So the only way of doing this will be a through a modified customer portal page.

        • Maruvada Manoj

          Agree with you Sebastian. Atleast we tried with the Time/Date Stamp. These kind of discussions will enhance our learning. Thanks for your comment!!

    • Sristy Arya

      Hi,

       

      Thanks for the answers , but I wanted to know this from console & not portal .

      Thanks

    • Sebastiaan Draaisma

      Hi Sristy.

      It is only possible to retrieve this information from the customer portal (CP), through a customization on the CP that captures this data into a custom field that you use in your console as the data you want is not available out of the box.

    • Sebastiaan Draaisma

      Hi Sristy

      I had a spare moment and just build you a working example (see attached ask.php) based on the following code:

      <rn:widget path="input/FormInput" name="Incident.c$browser" table="incidents" hide_on_load="false"/>
                      <script type="text/javascript">
                      function setValue() {
                      document.getElementById("rn_TextInput_13_Incident.CustomFields.c.browser").value = "<?php echo $_SERVER['HTTP_USER_AGENT']; ?>";
                      }
                      window.onload = setValue;
                      </script>

      You just need to hide the field, it's just an example and there might be other ways.
      You are then able to use the custom field in business rules, workspaces and reports and use some custom scripting to report on individual details

      ask.php (2KB)
    • Sebastiaan Draaisma

      Added functionality (IP address) and made it hidden through an invisible div as hiding the text field prevents data from being sent (widget info).

      hide_on_load (inherited)

      • Name: Hide on Load
      • Type: boolean
      • Description: Whether or not the widget's field should be hidden in the form on page load. A hidden field will not be included during form submission. This attribute is intended to be used with the Dynamic Forms feature.
      • Default: false

      Instead we use a div style to hide the text field which still allows for text to be submitted

      <div id="item" style='display:none'><rn:widget path="input/FormInput" name="Incident.c$browser" table="incidents" hide_on_load="false"/></div>

      Complete script

      <?php
                      $browser = $_SERVER['HTTP_USER_AGENT'];
                      $ip_address = $_SERVER['REMOTE_ADDR'];
                      if (array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER)) {
                      $ip_address = array_pop(explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']));
                      }
                      ?>
                      <div id="item" style='display:none'><rn:widget path="input/FormInput" name="Incident.c$browser" table="incidents" hide_on_load="false"/></div>
                      </script>
                      <script type="text/javascript">
                      function setValue() {
                      document.getElementById("rn_TextInput_13_Incident.CustomFields.c.browser").value = "<?php echo $browser.', '.$ip_address; ?>";
                      }
                      window.onload = setValue;
                      </script>

      See attached ask.php
      The only other thing to make this work is to create a custom field (text area) for incidents that you call browser
      Incident.c$browser