Integrations and APIs for Service

Get Involved. Join the Conversation.


  • Sebastiaan Draaisma

    Does your schedule work when disabling certain parts or all custom script? That way you know if the problem lays with the schedule itself and if not, which section prevents it from working.

  • Baljeet Singh

    Thanks Sebastiaan & Vlad for your reply.

    I had tired using these lines in Initialization tab but no luck

    require_once(get_cfg_var('doc_root') . '/include/ConnectPHP/Connect_init.phph' );

    @Vlad - Do you want me to define PHP code in Process tab instead of creating PHP file and saved in custom scripts folder. Currently I am doing this


    Created one PHP file and saved in custom directory. From Initialization tab, I am including PHP file and trying to get result but no luck.



  • Vlad

    Custom scripts in reports are not intended to be used to run PHP scripts on a report schedule - you should not expect this to work. I would recommend you create a standalone custom script (upload it through the console file manager to custom scripts) and call this script externally on a schedule.

  • Sebastiaan Draaisma

    Ah, I now see you already have that (still very early here and I just woke up) :-D

  • Sebastiaan Draaisma

    Hi Baljeet.

    Try using an extra line in your Initialization

    require_once(get_cfg_var('doc_root') . '/include/ConnectPHP/Connect_init.phph' );

    When scheduling a report containing custom script I always use this extra line.
    See also the user doc for this

    Note: If the report is to be scheduled (see Scheduling Reports), add putenv('TEMPORARY_RNW_CONF_DIRECTORY'); to the Initialization pane to ensure the custom script runs correctly when recipients open the report.

  • Vlad

    You need to unset the variables after you no longer need them.

    Answer Link: Connect for PHP Best Practices and Gotchas

  • Gursimran Singh Saini

    Maybe you can try a different solution approach.

    Say, you create a Custom Object to store Configuration Changes requested by agents.
    You can create a Menu Field which extends the standard "Incident Queues".
    A Text Field to store the requested Incident Queue Name change.
    Create a status field with values: New Change Request, Denied, In Progress, Complete

    The Administrator(s) will review the Configuration Change Requests and approve/deny them.

  • Sebastiaan Draaisma

    Hi Padma.

    Unfortunately the account time zone field is not available in either ROQL or analytics. The only solution I see is to create a custom field for accounts (menu type) in which you specify the time zones. This would then be accessable in both analytics and ROQL.

    An alternative is to estimate the time zone based on the country which would only work for countries with a single time zone.

  • Suresh Thirukoti

    I don't see Queue being updatable as most of the menu/standard LOVs under Customizable menus are not available or exposed to API. It requires changes in Agent Desktop only


  • Gursimran Singh Saini

    You can fire a named event to hide the Time Billed Control through workspace rule.

    After saving the record, fire another named event to show the Time Billed Control through workspace rule.


  • Robert Surujbhan

    One small tweak to your PHP code.  Instead of:


    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).

  • 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.



  • 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:

    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.

  • 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)

  • Gursimran Singh Saini

    (1) Possible!
    Create a Report joining the Custom Object table to Custom Object Transactions (co_trans).
    Add the source column showing only the last updated source with this definition: last(co_trans.source_lvl1,co_trans.created)
    Run this Report from the CPM passing the Custom Object Record ID.
    There you go.

    (2) Just call return;