X

Smart Advice. Personalized. Agile. Auditable

OPA OIC Adapter - Early Access

Philip Whitwell
Director

Please note the the OPA OIC Adapter is now public (from v18.2.3) and the custom adapter detailed below will no longer work but the public adapter should be used.

The OPA Adapter requires the OIC product stream and will not work with old ICS legacy environments.

 

In this article we will demonstrate an early release of the Oracle Policy Automation adapter for Oracle's Integration Cloud Service, using it to integrate Service Cloud and OPA Determinations via an ICS Integration. The aim is get the OPA ICS adapter included as a standard adapter in ICS but at the moment the adapter is custom and needs to be registered.  We are aiming for April for a release where the OPA adapter is included with ICS as a standard adapter.

The example uses the event of an Incident being updated in Service Cloud to trigger a call to ICS, the data from the updated Incident is then mapped into a Assess call to the Travel Compensation policy model, determining how much compensation a passenger might be eligible for due to a cancelled flight.  The amount of compensation is then used to update the Incident.

Setting up the ICS Connections

There are two Connections required one to Service Cloud and the other to OPA.

Creating the OPA Connection

  1. First register the adapter in ICS
  2. Download the OPA ICS adapter here
  3. Goto Adapters in ICS
  4. Click Register Navigate to the downloaded jar and then click register

  1. Create a new Connection in ICS
  2. Select the Oracle Policy Automation 12.2.9 adapter
  3. In the Pop-up dialogue give the Connection a suitable name, e.g. OPA REST to gseopa00097
  4. Click Configure Connectivity to add the Hub URL, then click Ok
  5. Click Configure Security choosing  either No Authentication or OAUTH
  • If you choose No Authentication ensure you allow Anonymous Access in your OPA Hub
  • If you choose OAUTH authentication add an API User e.g.ICSUser noting Client Identifier and Client Secret

 

6. The access token URI will be at https://server/determinations-server/batch/auth 

 

7. Finally ensure you Test and Save to get the Connection status to 100%

Note: If you use OAUTH authentication you will need to come back to Connections and click Test every 30 minutes to refresh the OAUTH token when you start testing your Integration.  This is a limitation with the custom adapter and will be resolved in the first production release.

Creating the Service Cloud Connection

  1. You need to ensure that Service Cloud is set up for Event Notification Service,  this configuration was copied from an A Team Blog
  2. In order to receive event notifications the following steps have to be completed in the Rightnow Agent Desktop. 
  3. In the Agent Desktop go to Configuration -> Site Configuration-> Configuration Settings. In the Search page that comes up, in the ‘Configuration Base’ section select ‘Site’ and click Search.

    In the ‘Key’ field enter ‘EVENT%’ and click Search.
  4. Set the following keys:
    EVENT_NOTIFICATION_ENABLED – Set it to ‘Yes’ for the Site. This is the global setting that enables ENS.
    • EVENT_NOTIFICATION_MAPI_USERNAME – Enter a valid Service Cloud username.
    • EVENT_NOTIFICATION_MAPI_PASSWORD – Enter the corresponding password.
    • EVENT_NOTIFICATION_MAPI_SEC_IP_RANGE – This can be used for specifying whitelisted subscriber IP Addresses. All IPs are accepted if kept blank.
    • EVENT_NOTIFICATION_SUBSCRIBER_USERNAMESUBSCRIBER_USERNAME should be the ICS account’s username
    • EVENT_NOTIFICATION_SUBSCRIBER_PASSWORD –ICS password.
    •  
    •  

4 Create a new Connection in ICS 

    a) Call the Connection Service Cloud Incidents

5 Use the following form for the Connectivity https://rnowgse00856.rightnowdemo.com/cgi-bin/rnowgse00856.cfg/services/soap?wsdl=typed

6 Enter valid username and password

7 Save and Test

 

Set up the policy model 

  1. Download the attached Travel Compensation Policy Model - it has had the required public names added to allow mapping in the Integration
  2. Deploy this to your OPA Hub
  3. Login into the Hub and ensure Deployment is activated for Web Services

Creating the ICS Integration

  1. Create a new Integration
  2. Choose Data Map option
  3. In the pop-up dialogue give the Integration a suitable name
  4. In the Connections search box type Service Cloud to find your previously created Connection
  5. Drag the Connection Icon over the 'Drag and Drop a Trigger' marker on the canvas
  6. In the Service Cloud Connection wizard 
    i) Give the endpoint a suitable name e.g. WaitForIncidentUpdate
    ii) Enter a suitable description e.g waits for an update of an Incident in Service Cloud
    iii) Click Next
    iv) Choose  Event Subscription
    v) and Incident Update

 

  • Click Next
  • Choose Operation Type = Update
  • Select the Incident  Business Object

 

  • Click Next and then Done
  • Change the search in the Connection's search to OPA REST 
  • Drag the OPA Rest * Connection on to the 'Drag and Drop an Invoke' marker on the canvas
  • Give the Endpoint a suitable name
  • Select Travel Compensation from the list of Policy Models

  

  • You should now see the following Integration - you will need to add mappings to complete

 

Adding the mappings to the Integration

The most fiddly part of setting up the Integration is the mapping so I have provided the completed Integration here.  To use import and then View the Integration to be able to check the mappings.

  1. Click on the Request Mapping (the top one) underneath where it say Click Below to Create Map
  2. Click on the + icon to add a mapping (it is also possible to import more complex XSL)
  3. Click on assess > assessrequestpayload >outcomes hyperlink
  4. Enter amount_payable in the box
  5. Click Save and then Close
  6. Enter the following static mappings (Note we will come back to the mapping and map in data from the Incident later)
  7. Click on the Response Mapping (the middle one) 
  8. Click on the + icon to add a mapping
  9. Choose a suitable Text field in the Service Cloud Incident e.g. steps_to_repro, click on the text to get a detailed mapping interface and add the following mapping
    <xsl:value-of select = 'concat("The results returned from ICS is that the passenger is entitled to a compensation payment of £", /nssrcmpr:assessResponse/nssrcmpr:assessor.definitions.assessResponsePayload/nssrcmpr:cases/nssrcmpr:amount_payable)'>Testing the Integration - Update an Incident in Service Cloud
  10. Or for a simpler mapping drag amount_payable from the Cases Node to the field in Incident
  11. Click Close and Save
  12. Then Close and Save Mapping

Publishing your Integration

Now you have completed your Response Mapping you can complete your Integration and publish so you can start to test.

  1. You need to get the % to 100, the last stage is to add the Tracking information.
  2. Click on the Menu in the top right hand corner of the Integration
  3. Select Tracking
  4. Drag LookupName into the Tracking Field
  5. Add some descriptive text to the Tracking Name
  6. Then click Done

Testing and Monitoring the Integration in ICS

Now you have completed your Response Mapping you can complete your Integration and publish so you can start to test.

  1. First create or update a an Incident in Service Cloud to trigger the Integration
  2. In ICS goto Monitoring _ Everything so far will have been in Designer
  3. Then either choose Integrations or Errors (depending on whether you think the process failed or not

Note: If you use OAUTH authentication you will need to come back to Connections and click Test every 30 minutes to refresh the OAUTH token when you start testing your Integration.  This is a limitation with the custom adapter and will be resolved in the first production release.

  1. When the Integration has successfully finished you should see a Processed Integration under Integration
  2. You can then drilldown and see in Tracking
  3. From there you click on the Integration name and see and invesigate the completed process

The last step is to check back in Service Cloud and make sure that the Incident was updated

Follow on tasks

Improve your Integration by a mapping in data from the Service Cloud Incident

Re-Test using inputed Service Cloud Data

Improve the mapping out to further update the Incident

 

 

 

Join the discussion

Comments ( 2 )
  • Abdelali Wednesday, August 22, 2018
    Hi Philip

    We followed the steps in our ICS environment.
    But We are facing an issue regarding ICS-OPA connection.
    The connection seems to be ok ( tested successfuly ).
    However running the full integration is raising an error while invoking OPA Decision Service.

    Could you please advise or point some possible cause ?

    Thx

    Abdelali
  • Mr P Whitwell Thursday, October 4, 2018
    Could you email me through the error?
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha
Oracle

Integrated Cloud Applications & Platform Services