Integrations and APIs for Service

Get Involved. Join the Conversation.

Posts

  • Chethana KM
    How to access attributes of an article using REST API1
    Topic posted Yesterday by Chethana KM, tagged REST 
    Title:
    How to access attributes of an article using REST API
    Summary:
    How to access attributes of an article using REST API
    Content:

    Hi,


    We have some attributes defined inside answer in Agent Desktop. Some of the attributes are <Title>, <Regulations>, <Change_Type> etc.. So, when we create an article in Authoring, we can set the values for these attributes and save the article.

    For some business requirement, we need to fetch all the articles having a specific value, say "N/A" inside <Regulations> attribute using REST API
    We tried the following Content REST API call with <title> attribute in the query parameter. It worked.
    https://sitename-irs.custhelp.com/km/api/latest/content?q=title likeAny ('*Request*')

    But, when we try to query for a custom attribute like <Regulations> as below, we are getting an error:
    https://sitename-irs.custhelp.com/km/api/latest/content?q=REGULATIONS likeAny ('*N/A*')

    Error is as follows:
    "An application error has occurred. Root Cause: One or more fieldNames used in the criteria are unknown and hence the query cannot be evaluated!"
    I have attached the error snapshot from Postman (Postman_Error_CustomAttribute.PNG)

    Could you please let us know how to query for attributes inside an article using REST API?

    Note:
    I have attached the sample response of below Content API call for an answer-1002441
    https://sitename-irs.custhelp.com/km/api/latest/content/answers/1002441?isForEdit=true&mode=FULL
    Please note that the attributes like Regualtions,title etc are inside "xml" field in the Content API response.
    "xml": "<PROCEDURES><TITLE><![CDATA[Requesting a copy of an overdraft/insufficient available funds notice ]]></TITLE><LAST_REVIEW_DATE><![CDATA[2019-04-30 05:00:00 Etc/GMT]]></LAST_REVIEW_DATE><REGULATIONS SECURITY=\"RN_ACCESS_LEVEL_13\"><VALUE><![CDATA[N/A]]></VALUE><DISPLAY><![CDATA[N/A]]></DISPLAY><GUID><![CDATA[6402216618fb1201656f1f09790065eb]]></GUID></REGULATIONS></PROCEDURES>"

    Response file attached: Content_API_Response1.txt

    Thanks,
    Chethana

    Version:
    18D
    Image:
  • Venkatesh Reddy
    Publish JSON message into AmazonMQ
    Topic posted August 14, 2019 by Venkatesh ReddyRed Ribbon: 250+ Points 
    Title:
    Publish JSON message into AmazonMQ
    Summary:
    Adding extra special characters in AmazonMQ while publishing JSON message which is in String variable
    Content:

    Hi,

    Development done in oracle soa 12.2.1.3

    Consuming JSON message by Dequeueing  in base64 format so that decoded that base64 and assign to one string variable which is having JSON message like below.

    ****************************

    {

          "OrderStatus": {

                "Header": {

                      "Transaction Number":  "CPQ-3260-37210612",

                      "Transaction Internal ID":"37210612",

                      "Customer Id": "300000030758103",

                      "CPQ Source System Code": "ORA_BM_CPQ",

                      "SubscriptionEndDate":"2019-08-16 00:00:00",

                      "Subscription Id": "300000031172516",

                      "Source Order No":"WEB1234",

                      "Account Number": "300000030758103",

                      "Subscription Status": "success",

                      "UCN Number": "600007791",

                      "Subscription Number":"CPQ-3260-37210612",

                "LineLevel":      {

                      "Install To": "9355 SAPPINGTON RD; SAINT LOUIS; MO; US; 63126-3043;",

                      "Contract End Date": "2019-08-16 00:00:00",

                      "Line BOM Part Number": "560001",

                      "Status": "Fulfilled",

                      "gracePeriodDays_l": "10",

                      "autoRenew_l": "Yes"

                                        }

                                  }

    }

    }

    **************************

    while publishing same String variable data(JSON message like above)  into AmazonMQ, but AmazonMQ storing that JSON message like below(Added extra special chars like " \ and \n"

    "{\n      \"OrderStatus\": {\n            \"Header\": {\n                  \"Transaction Number\":  \"CPQ-3260-98765403030\",\n                  \"Transaction Internal ID\":\"37210612\",\n                  \"Customer Id\": \"300000030758103\",\n                  \"CPQ Source System Code\": \"ORA_BM_CPQ\",\n                  \"SubscriptionEndDate\":\"2019-08-16 00:00:00\",\n                  \"Subscription Id\": \"300000031172516\",\n                  \"Source Order No\":\"WEB1234\",\n     

     

    How ca we remove those special chars' while publishing String variable JSON message.    

    Can you please help me out.

     

    Version:
    Oracle SOACS 12.2.1.3
  • Mike Kramer
    Displaying Data from an Outside Data SourceAnswered5
    Topic posted August 9, 2019 by Mike KramerSilver Medal: 2,000+ Points 
    Title:
    Displaying Data from an Outside Data Source
    Summary:
    Would like to query a data table from CPQ and have it displayed in and OSC report/workspace
    Content:

    We have a need to query a database outside of OSC and display the results of that query in a read only table/report.  I believe I can create the query myself (we use a middleware software application called Snaplogic) and I can trigger this query to occur (with a button in the workspace). 

    But I'm not sure how my query results need to be stored such that they can be used in a report for displaying to my end users.  These results would be standalone data.  They are not related to any existing object type inside of OSC.  Anyone have any ideas on how to do this? 

    Thanks,

    Mike

  • Chandra Prasad
    Custom Process - prev unable to access values5
    Topic posted August 12, 2019 by Chandra Prasad 
    Title:
    Custom Process - prev unable to access values
    Summary:
    $obj->prev throwing error as "Trying to get property of non-object"
    Content:
    I have checked a similar post,but it didn't solve the issue.If i use isset($obj->prev),its empty.Sample snippet which i used.

     

     public static function apply($runMode, $action, $obj, $cycle)

    {

    if (isset($obj))
        {
    $var=$obj->Name->First;  
    $pvar=$obj->prev->Name->First;
    if ($var != $pvar) {
    ...
    ...
    }
    }
    }
  • Sergio Andres Barreto Valderrama
    Import Contacts through an API2
    Topic posted August 12, 2019 by Sergio Andres Barreto ValderramaBlue Ribbon: 750+ Points 
    Title:
    Import Contacts through an API
    Summary:
    API
    Content:

    Hello everyone!

    How can I load contacts through an API?

    I appreciate any suggestions and / or help

    Thank you!

    Version:
    19A
  • Travis Crane
    Making REST calls via VBA for BI Publisher Reports4
    Topic posted February 28, 2019 by Travis CraneBlue Ribbon: 750+ Points, tagged REST 
    Title:
    Making REST calls via VBA for BI Publisher Reports
    Summary:
    I am trying to make REST calls via VBA for Reports but I do not know how to pass all of the parameters.
    Content:

    I have been able to use VBA for updating Project Team Member Roles (GET, POST, & DELETE).  This works very well in Excel.

    I would like to call Reports via VBA as well using the REST API.  I am able to do this in SOAPUI without any problems, but I don't know all of the code to call the Reports in VBA.  

    The payload below is what I am using in SOAPUI:

    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:pub="http://xmlns.oracle.com/oxp/service/PublicReportService">
       <soap:Header/>
       <soap:Body>
          <pub:runReport>
             <pub:reportRequest>
    <pub:parameterNameValues>
                    </pub:parameterNameValues>
                <pub:reportAbsolutePath>/Custom/ERP-PSA/Acosta_INT_PPM_Burden_Rates_Report.xdo</pub:reportAbsolutePath>
                <pub:sizeOfDataChunkDownload>-1</pub:sizeOfDataChunkDownload>
             </pub:reportRequest>
          </pub:runReport>
       </soap:Body>
    </soap:Envelope>
     
    Below is what I have tried in VBA:
       sEnvelope = "<soap:Envelope xmlns:soap=""http://www.w3.org/2003/05/soap-envelope"" xmlns:pub=""http://xmlns.oracle.com/oxp/service/PublicReportService"">"
        sEnvelope = sEnvelope & "<soap:Header/>"
        sEnvelope = sEnvelope & "<soap:Body>"
        sEnvelope = sEnvelope & "<pub:runReport>"
        sEnvelope = sEnvelope & "<pub:reportRequest>"
        sEnvelope = sEnvelope & "<pub:reportAbsolutePath>/Custom/ERP-PSA/Acosta_INT_PPM_Burden_Rates_Report.xdo</pub:reportAbsolutePath>"
        sEnvelope = sEnvelope & "<pub:sizeOfDataChunkDownload>-1</pub:sizeOfDataChunkDownload>"
        sEnvelope = sEnvelope & "</pub:reportRequest>"
        sEnvelope = sEnvelope & "</pub:runReport>"
        sEnvelope = sEnvelope & "</soap:Body>"
        sEnvelope = sEnvelope & "</soap:Envelope>"
        Set objRequest = CreateObject("MSXML2.XMLHTTP")
        str_UsrUrl = ""
        str_UsrUrl = str_Domain & "/xmlpserver/services/rest/v1/reports/Custom%2FERP-PSA%2FAcosta_INT_PPM_Burden_Rates_Report"
    '    str_UsrUrl = str_Domain & "/xmlpserver/services/ExternalReportWSSService"
        blnAsync = False
        With objRequest
            .Open "POST", str_UsrUrl, blnAsync
            .SetRequestHeader "Content-Type", "application/json"
    '        .SetRequestHeader "Content -Disposition", "form-data; name=" ""ReportRequest"
            .SetRequestHeader "Authorization", "Basic " & credentials
            .send
            strResponse = .responseText
            MsgBox "Response: " & strResponse
     
    I've searched everywhere trying to piece this code together and I am not having much success.
    The Response that I am getting is:

    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html><head>
    <title>404 Not Found</title>
    </head><body>
    <h1>Not Found</h1>
    <p>The requested URL /xmlpserver/services/rest/v1/reports/Custom/ERP-PSA/Acosta_INT_PPM_Burden_Rates_Report was not found.</p>
    </body></html>

     
    Any help with this would be great.
     
    Thanks!
    Code Snippet:
  • Laura Spinelli
    Get message template on MailMessage
    Topic last edited August 9, 2019 by Laura SpinelliGreen Ribbon: 100+ Points 
    Title:
    Get message template on MailMessage
    Content:

    Hi guys,

    I need to send an email through MailMessage API. I was wondering if I can get a message template to the body. 

    So far, I am using Standard Text to define the body, but I am worried about the limitations of this solution. Message base is another option, but standard text seems more friendly for non-dev people to use. On this line, message templates would be the best option, but as far as I've searched I cannot get them. Is this correct? 

  • Mike
    OOO_AcceleratorAnswered1
    Topic posted August 7, 2019 by MikeBronze Medal: 1,250+ Points, tagged Custom Process Models - CPMs 
    Title:
    OOO_Accelerator
    Summary:
    OOO_Accelerator not working in BUI
    Content:

    Hi All, I've implemented the OOO accelerator and plugins. In the .NET Console it works fine. However If I log in to the BUI I don't see the OOO Accelerator plugin ? Does anyone know if this is expected behavior ?

    Version:
    18A
  • Vanessa Abelardo Viana Beserra
    Set date and time field in a CPM4
    Topic posted August 5, 2019 by Vanessa Abelardo Viana Beserra, tagged Connect PHP, Custom Process Models - CPMs 
    Title:
    Set date and time field in a CPM
    Content:
    Hi,
    I have a custom process that makes a  logs information. I use the field DATA_FINAL (type: data and time) of object CO \ LOG_LUGGO. I just want to set a date in this field. I did a lot of tests, including setting a fixed date and still can't set it.
     
    My OSvC version is 19B. 
     
    Is there any configuration I should enable to use this? 
     
    Below is a script of how I am trying to set this field in PHP.
     
    Thanks for the help!
    Version:
    19B
    Code Snippet:
  • Laura Spinelli
    curl request to OIC not workingAnswered4
    Topic posted August 2, 2019 by Laura SpinelliGreen Ribbon: 100+ Points 
    Title:
    curl request to OIC not working
    Content:

    Hello guys,

    I have a custom process that makes a curl request to OIC. I am using POST method. I get a response of 1 but the request never gets to OIC (when can check it on the OIC log).

    When I use GET method or call it from a javascript add-in and even when I test it on postman, the request works - we can see it on the OIC log and we receive the expected response. 

    My OSvC version is 19B. 

    Is there any configuration I should enable to use this? 

    I have attached part of my code bellow (only had to hide part of our url).

    Thanks for the help!

    Code Snippet:

Filter by Date

< < August 2019 > >
S M T W T F S
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Filter by Type