Sales

Get Involved. Join the Conversation.

Topic

    Jessie Marin
    Engagement Cloud and RightNow (Agent Desktop)...Answered
    Topic posted October 17, 2018 by Jessie MarinRed Ribbon: 250+ Points, last edited October 17, 2018, tagged Groovy, Integration, Web Services 
    246 Views, 13 Comments
    Title:
    Engagement Cloud and RightNow (Agent Desktop) Integration
    Summary:
    Point-To-Point Integration via Groovy Script
    Content:

    Hi,

    Please help. Sorry, but I am newbie with engagement cloud especially with integration and writing groovy script.

    Could you please help me create a point-to-point integration of Engagement Cloud and RightNow (Agent Desktop) using REST web service?

    I already created the REST web service but not sure if I did it right (see attached image). Also, I'm having a problem writing the groovy script to call and process REST Web Service.

    I am trying to create a groovy script that will create an Incident in RightNow. Via web service response, I'm trying to get the ref_no (Reference #) in the script (see below) and set it to ADIncidentNum field in engagement cloud. 

    Would also like to ask the correct parameters that I need for .POST(' ') ?

    try {
    def result = adf.webServices.WebSvc_AD_Incidents.POST(' ')                                    
    def sIncidentNum = result.ref_no
    setAttribute('ADIncidentNum',sIncidentNum)
    setAttribute('ADIncidentStatus','New')
    }catch (e){
    println "Sales — CreateSR: Exception" + e
    }

     

    The requirements are:

    1. Create a service request record in Engagement Cloud which will be created also in RightNow (Agent Desktop) and vice versa.

    2. Update a service request record in Engagement Cloud which will be updated also in RightNow (Agent Desktop) and vice versa.

     

    Thank you in advance.

    Image:

    Best Comment

    Jessie Marin

    Thank you Madhu. I'll check the document and apply it to my setup.

     

    Regards,

    Jessie

    Comment

     

    • Madhu Sudhan Baddam

      Hi Jessie, 

      Please refer the attached document, It will provides in detailed steps for invoking Restful Web services inside the engagement Cloud.

      Regards,

      Madhu

       

       

    • Jessie Marin

      Hi,

       

      I'm trying to get/query the incident with Id = 12278 using the groovy script below but I'm getting exception error that the parameter does not exist.

      Attached is the sample response. Could you please help supply the correct parameter? Please note that the id = 12278 is existing in RightNow.

      ________________________________________________

        def conn = adf.webServices.Web_Svc_GetRN

        def incident = conn.GET("12278")
       
      ________________________________________________
      Exception in expression "ServiceRequestVO" object function GetADIncidentUpdate() : oracle.binding.expr.ServiceInvocationException The operation "GET" with given set of parameters does not exist.
      at "ServiceRequestVO" object function GetADIncidentUpdate() line 2
       
      Thank you,
      Jessie
      • Jessie Marin

        I also tried the scripts below but same error encountered.

        def incident = conn.GET('id')

        def incident = conn.GET(id)

      • Jessie Marin

        When trying to use the groovy script below I'm getting the error bad request (see below).

          def conn = adf.webServices.Web_Svc_GetRN

          def incident = conn.GET()
         
        _________________________________________________________________________________
         
        Exception in expression "ServiceRequestVO" object function GetADIncidentUpdate() : oracle.binding.expr.ServiceInvocationException Unexpected exception caught: oracle.adf.model.connection.rest.exception.RestConnectionException, msg=JBO-57001: Invocation of service URL used in connection failed with status code 400 Bad Request.
        at "ServiceRequestVO" object function GetADIncidentUpdate() line
        • Madhu Sudhan Baddam

          Can we get Web service registration screenshot from engagement cloud ?

          • Jessie Marin

            Sure. Here it is.

            • Madhu Sudhan Baddam

              Please re-register the webservice with following url and try again.

              https://domian-name/incidents/##IncidentNumber##  

               

               

              • Jessie Marin

                Hi,

                I tried the web service and groovy script below but still getting an error message.

                Web Service==> https://domain-name/incidents/##IncidentNumber##

                def id = getAttribute('ADIncidentId_c');
                ===> def incident = conn.GET(id)
                ===> def incident = conn.GET('12278')

                 

                Error Message

                Exception in expression "ServiceRequestVO" object function GetADIncidentUpdate() : oracle.binding.expr.ServiceInvocationException Unexpected exception caught: oracle.adf.model.connection.rest.exception.RestConnectionException, msg=JBO-57001: Invocation of service URL used in connection failed with status code 400 Bad Request.
                at "ServiceRequestVO" object function GetADIncidentUpdate() line 8

                ________________________________________________________________________

                ===>  def incident = conn.GET()

                 

                Error Message:

                Exception in expression "ServiceRequestVO" object function GetADIncidentUpdate() : oracle.binding.expr.ServiceInvocationException The operation "GET" with given set of parameters does not exist.
                at "ServiceRequestVO" object function GetADIncidentUpdate() line

                 

                Thank you,

                Jessie

    • Dilip Jayachandra

      Hi Team,

       

      We are also facing the problem as below while using GET method in Account REST service. Any help can relieve us from this issue.

       

      Regards,

      Dilip