Integrations and APIs for Service

Get Involved. Join the Conversation.

Topic

    Robert Conrad
    Problem with screenpop
    Topic posted March 27, 2019 by Robert Conrad 
    67 Views, 4 Comments
    Title:
    Problem with screenpop
    Summary:
    screenpop.php won't pop contact w/phone#, only new contact record
    Content:

    I have used this screenpop.php script and URL in other projects w/o issue. Not this time. For some reason, the pop is always a new contact record. For some reason, the script is finding the phone# but not popping the contact record with the phone#.

    I pasted the screenpop.php code below.

    When I enter this URL in the browser, it only pops a new contact record: http://localhost:57575/screenpop?t=editor&recordType=5&contacts.any_phone_raw=4155688731

    If I use a t=record URL, it finds the contact and displays in contact quick search: http://localhost:57575/screenpop?t=report&id=103660&contacts.any_phone_raw=4155688731

    I suspect that something is amiss in the screenpop.php script, but I and a colleague have run out of possible revisions to resolve the issue.

    Any assistance will be greatly appreciated.

     

     

    Version:
    OSvC 18A
    Code Snippet:

    Comment

     

    • Sebastiaan Draaisma

      Do I understand you correctly that you would like to perform a search through a report id and show all incidents for the contact calling in with this number.

      To perform a search you have to specify:

      • Port number
      • Report id
      • filter name + value

      Test URL: http://localhost:1432/screenpop?t=report&id=100061&contacts.any_phone=0763227882

      The port number is to be configured in: EXT_CONSOLE_WS_PORT
      Also EXT_CONSOLE_WS_ENABLED has to be set to Yes

      And you can only have one OSVC (.Net) application running (does not work with BUI)

    • Vlad

      To add to what Sebastiaan mentioned:

      The documentation states that when opening an editor (which you are, with t=editor), a new record opens if there is no ID present. In this case, there is no ID present, so it's expected for a new record to open, based on the documentation:
      http://localhost:57575/screenpop?t=editor&recordType=5&contacts.any_phone_raw=4155688731

      You need to run a report if you want to pass any information that is not the record ID.

      Maybe you can update your PHP script to run a ROQL query, fetch the Contact ID that has that specific phone number and pass that contact ID through the screen pop URL.

    • Robert Conrad

      Thanks for the quick response. However, I must not have clearly stated the issue with respect to both comments.

      Sebastiaan - As the php indicates, the port and report id are configured. Config settings are as they should be. Not sure why you thought otherwise.

      Vlad - the point of also including the t-report URL was meant to confirm that the report id was indeed indentifying the contact from the phone# and displaying the contact quick search report. So far, the php appears to be ok. However, the php should identify the c_id from contact.any_phone_raw and then append the string with the c_id to pop the contact record. It is not, only popping a new contact record.

      Even if we add "&id=" to the t=record url, we still get a new contact record.

      What we suspect and are looking for is where the issue might be in the screenpop.php, nothing to do with ports or report id's or config settings which are all good.

      Thanks!

       

    • Robert Surujbhan

      One small tweak to your PHP code.  Instead of:

      $contact_id=$contact[0]->ID;
      

      Try changing to:

      $contact_id = $contact->ID;
      

      You used the $res->next(); iterator beforehand, so $contact should hold the first Contact object of the query result (it won't be an array).