Posts

Posts

  • Sebastiaan Draaisma
    ROQL query on Profile table in report125.0
    Topic posted December 10, 2018 by Sebastiaan DraaismaBlack Diamond: 60,000+ Points, tagged Connect PHP in B2C Service > Integrations and APIs for Service public
    Title:
    ROQL query on Profile table in report
    Content:

    Hi there.

    I'm trying to get a ROQL query on the Profile table in a report.
    I found the following documentation

    The following example shows a ROQL query on the Profile managed table:
    SELECT * FROM Profile; DESCRIBE Profile;

    I tried the following custom script inside a report (report also attached)

    Initialisation
    require_once(get_cfg_var('doc_root')."/ConnectPHP/Connect_init.php");
    initConnectAPI();
     

    Process
    $profile_id = $rows[0][0]->val;

    //build the ROQL query using the profile id
    $query = "SELECT P.CreatedTime FROM Profile P WHERE P.ID=".$profile_id;

    //run the query
    $query_results = RightNow\Connect\v1_2\ROQL::query($query)->next();

    $row = $query_results->next();

    //put the results in the report
    $rows[0][1]->val = "Created ".$row['CreatedTime'];

     

    I don't get any result...
    (the code does work when performing a query on the incident table)

    I'm not sure if I'm missing something? smiley

    Image:
  • Julie F
    OSC-CREST-00028 You are forbidden to access this site.Answered10
    Topic posted June 28, 2019 by Julie FBronze Crown: 15,000+ Points, tagged Connect PHP, REST in B2C Service > Integrations and APIs for Service public
    Title:
    OSC-CREST-00028 You are forbidden to access this site.
    Summary:
    API to update custom objects gives 403 Forbidden error
    Content:

    We have set these two configurations settings correctly for our domain:

    SEC_PAPI_INTEG_HOSTS_REST

    PAPI_CORS_DOMAIN_LIST

    We have given a user specifically set up permissions for our custom objects and have also tried with a full admin account.

    We keep getting 403 Forbidden error which shows OSC-CREST-00028 You are forbidden to access this site.

  • Praveen Woody
    How do I get a handle on Tasks to check if there any open...7
    Topic posted May 19, 2019 by Praveen WoodySilver Medal: 2,000+ Points, tagged Connect PHP, REST, SOAP in B2C Service > Integrations and APIs for Service public
    Title:
    How do I get a handle on Tasks to check if there any open tasks before closing the incident
    Content:

    Everytime the status of the incident is set to closed, before incident save, I want to check (from Agent Console) if there are any open tasks associated with that incident. If there any open tasks, I want the agent to get a message asking them to close that task before closing the incident and should prohibit the user to close the incident till they close all open tasks associated with the incident.

    Is there a sample code I can use to have this done?

     

    Thanks in advance

    Version:
    18D.
  • jraynor
    CURL Certificates in a CPMAnswered75.0
    Topic posted February 11, 2019 by jraynor Silver Medal: 2,000+ Points, tagged Connect PHP, Custom Process Models - CPMs in B2C Service > Integrations and APIs for Service public
    Title:
    CURL Certificates in a CPM
    Summary:
    Need help with a curl error due to lack of certificates in CPM
    Content:

    I have created an asynchronous CPM that uses cURL to call a json web API we have outside of Oracle. The web API is actually hosted as an Azure API, and I am able to successfully reach the API, and get a valid response in Postman with no custom certificates. When I insert the cURL part of the code into the CPM. I get the following error. 

    ---------------------------------------------------
    error setting certificate verify locations:
    CAfile: /etc/pki/tls/certs/ca-bundle.crt
    CApath:none
    ---------------------------------------------------

    Has anyone come across how to resolve this? I do not wish to disable verify peer.

     

  • Seethalakshmi S
    how to store custom text value in date/time custom field75.0
    Topic posted December 13, 2018 by Seethalakshmi SBronze Medal: 1,250+ Points, tagged Connect PHP, Custom Process Models - CPMs in B2C Service > Integrations and APIs for Service public
    Title:
    how to store custom text value in date/time custom field
    Summary:
    Store custom text value in date/time custom field
    Content:

    Hi All,

    In ROQL I have received date/time in string format. So I converted into date/time in (MM:DD:YYYY HH:MM") format.

    After that, I need to store the converted date/time value in "Date/time" datatype custom field.

    While I am trying to store the converted value in date/time datatype field, I am getting error like "Type Mismatch"

    How to resolve this?

    Thanks,

    Seethalakshmi

    Version:
    Version 18C
    Code Snippet:
  • Sebastiaan Draaisma
    Connect PHP transaction log entryAnswered7
    Topic posted December 4, 2018 by Sebastiaan DraaismaBlack Diamond: 60,000+ Points, tagged Connect PHP in B2C Service > Integrations and APIs for Service public
    Title:
    Connect PHP transaction log entry
    Summary:
    Create a transaction log entry through Connect PHP
    Content:

    Does anyone know if it's possible to use Connect PHP to create a custom log entry in the transaction table? I'm unable to find any documentation regarding this so I assume it's not possible but hope to be proven wrong :-)

    Version:
    18C
  • Sreeram Venkatramani
    Connect PHP for Bulk dataloadsAnswered7
    Topic posted November 8, 2018 by Sreeram VenkatramaniGreen Ribbon: 100+ Points, tagged Connect PHP, REST in B2C Service > Integrations and APIs for Service public
    Title:
    Connect PHP for Bulk dataloads
    Content:

    We are in the process of migrating data from Legacy applications to Oracle Service Cloud. The Legacy Data needs to be migrated to both Standard Objects and a few Custom Objects in Service Cloud.

    For some transactional entities, the volume of data is to the tune of 1 Million - 2 Million. And it is necessary to migate historical data to the new Service Cloud solution for reporting purposes.

    Also all references need to be built during data upload. Example: An Incident needs to be linked to the correct Organization and Contact.

    Currently we are using Connect PHP to import CSV data in bulk. But of late we see the throughput is very small. The PHP scripts have embedded ROQLs to fetch the IDs of the references (like Organization Id of the Organization to be linked to the Incident etc.)

    Would like to understand -

    a. is the use of Connect PHP a correct approach to load Bulk data into Service Cloud
    b. is Connect PHP architecture such that it is inherently slow in loading data
    c. what are the best practices when using Connect PHP for such Bulk data uploads
    d. will the use of REST APIs give better performance compared to Connect PHP

    Any guidance/pointers would help us in taking the next steps to improve performance of our loads.

    Regards,
    Sreeram V

    Version:
    18A
  • Mike
    How to delete incidents using ROQLAnswered65.0
    Topic posted November 28, 2018 by MikeBronze Medal: 1,250+ Points, tagged Connect PHP in B2C Service > Integrations and APIs for Service public
    Title:
    How to delete incidents using ROQL
    Summary:
    Attempting to use this code snippet to delete incident records?
    Content:
    Hi , I was reading through the ConnectPHP guide for Oracle 18A , I want to be able to delete records using this code snippet. Would I run this from the customer portal somehow? Or am I able to log into the CLI using OPC ? 
    
    
    
    Version:
    18A
    Image:
    Code Snippet:
  • Padma Prabha Varadarajan
    Stop trigger to another CPMAnswered5
    Topic posted June 13, 2019 by Padma Prabha VaradarajanRed Ribbon: 250+ Points, tagged Connect PHP, Custom Process Models - CPMs in B2C Service > Integrations and APIs for Service public
    Title:
    Stop trigger to another CPM
    Summary:
    Suppress save to call another CPM Handler script
    Content:

    Hi,

    We have a script where we are setting a field value in another object and saving it.

    When the save triggers, it is triggering the CPM Handler script associated with the object.

    I don't want the script to be triggered but just update the field and save simply. 

    Tried using save(RNCPHP\RNObject::SuppressAll), But didnt work.

    Kindly suggest a way to overcome this

     

    Thanks

    Padma

    Version:
    18D
  • Baljeet Singh
    Failed To Run Cron/Custom Scripts on Production Site5
    Topic posted April 15, 2019 by Baljeet SinghRed Ribbon: 250+ Points, tagged Connect PHP, REST, SOAP in B2C Service > Integrations and APIs for Service public
    Title:
    Failed To Run Cron/Custom Scripts on Production Site
    Summary:
    Failed to run custom PHP scripts for schedule report
    Content:

    Hi,

    We have business requirement to run cron job which will fetch records from third party software and save records in OSvC. As we know cost is associated if we set up cron job on Oracle server. We have work around this problem to use Custom Scripts (Under level tab in custom report) and schedule report for specific internal of time. 

    I was able to achieve objective by creating custom PHP script and included in custom scripts in initialization tab. Please find attached the screenshot. I implemented the PHP script on test instance and got expected result but I could not able to replicate the same scenario on production site. 

    In Production Site, It works only when I manually run the custom report and got expected result. It seems that Custom Scripts is failed to call custom PHP file (included in Initialization tab) when run automatically (via Scheduling)  I have already given report permissions. Both instances has Reportgen utility enabled and working good.

    On test instance, it is working fine but failed to run on production site. Both instances are of same version (Aug 2017).  I have included my code in code snippet. Any idea

    Am I missing any config settings ?

    Thanks!!

    Baljeet Singh

     

    Version:
    Oracle Service Cloud August 2017
    Image:
    Code Snippet: