Tag: Connections

Oracle Policy Automation and Siebel Innovation Pack 16 #6

Oracle Policy Automation and Siebel Innovation Pack 16The final post in this series looks at some of the “extras” that facilitate the integration of Oracle Policy Automation and Siebel Innovation Pack 16. By “extras” I mean other Web Services provided by Oracle Policy Automation, which will need to be taken into consideration when designing how these two applications can best work together but that are not directly related to the subject of getting the two applications to integrate using Applets, Integration Components, Workflow Processes and so on. Some of the content that follows is license-dependent, but should be of interest to any Oracle Policy Automation person.

Overview

Given that there are a number of different services to review, this post therefore is necessarily a mixture of many things. To summarise, there are

  • Administrative Services : The REST API of Oracle Policy Automation allows the creation of users of all the main types (integration users as well as normal ones) and also for the automation of deployment, and retrieval of associated information.
  • Execution Services : Assess, Interview and Answer (and the Server service, although it does not really need to be covered here).
  • Batch Execution Service : The REST API for Batch Execution allows for batched execution of goal determination

Together these are referred to as the Determinations API. The API is version specific in the sense that features are constantly being added (for example, integration user management is new to release 18A) so make sure you are using the correct WSDL file. For specific Oracle Policy Automation rulebases you can download the WSDL easily and that is shown in the videos below.

Assess Service

The Assess Web Service is probably the most famous service from a Siebel developer perspective, since it allows Siebel Enterprise to call Oracle Policy Automation and obtain an XML response (in the manner of a typical SOAP Web Service). It is often used therefore when no user interface is required.

The above video provides a short overview of how to derive the necessary information from Oracle Policy Automation and to use it in standard Web Service fashion. Developers should note that the post-processing of the Response will most likely occur in a Siebel Workflow Process or Script, in order to parse the response and deal with it.

As such, accessing an Oracle Policy Automation rulebase with Assess can be done very simply indeed. If the Oracle Policy Automation rulebase you are working with has a Connection in it (to Siebel or anything else) then you may also wish to use the Answer Service (see below).

Interview Service

The Interview Web Service was heavily used in the Oracle Policy Automation and Siebel Innovation Pack 15 integration, in order to mimic the behavior of the standard Interview using the Siebel Open UI framework. This Service is best suited to applications needed to provide the Interview User Interface in another technology (a Java application, a Silverlight Client, a Visual Studio application or whatever). It has a number of specifics and developers must manage session control, as the short video below illustrates.

Answer Service

The Answer service is reserved for Projects where there is a Connection object in Oracle Policy Automation, and as such provides a SOAP-based tool to pass data sets to the Project and receive the response. Amongst other things, therefore, it can be used to test the behaviour of an Oracle Policy Automation project when the external application (for example Siebel Enterprise) is not available.

REST API Services

As outlined above, there are in fact two REST API areas of interest : the administrative platform and the Batch Assessment service. Both require OAuth2 authentication and session management.

What’s Left – Oracle Policy Automation and Siebel Innovation Pack 16

So what is there still to do, for the Siebel Developer who has followed all the different posts and videos in this series? Well of course it is not possible to show everything, so here are the main points that you will now need to finish on your own : but most of them are entirely non-specific to Oracle Policy Automation and Siebel Innovation Pack 16.

There are of course many different things that you might want to do with Oracle Policy Automation and Siebel Innovation Pack 16, so at the OPA Hub Website we are always happy to hear from our readers with comments and questions : all you have to do is post at the bottom of the article. We obviously cannot run your project from here (but if you want us to, just get in touch!)  but you should feel free to contact us with questions, ideas for articles or anything else that is Oracle Policy Automation-related.

As Siebel Developers will know, Siebel Enterprise is now in version 17 and the next big thing, Siebel 18, is expected soon. The good news is that almost all of the steps shown here are completely identical in the newer version, since the changes are architectural rather than functional for the most part. If you come across anything completely different then, again, just let us know. We do plan on providing an update to this post series as and when the Siebel 18 is made generally available.

Finally

The OPA Hub hopes you all enjoyed the different posts in this series. For your bookmarks, here are the other posts in the series:

Guest Post : Oracle Policy Automation Public Cloud with Oracle Service Cloud : Part 3

Policy Automation Public Cloud with Service Cloud (RightNow): Part 3

We are continuing our Lazy Expert series of posts, with an explanation of how OPA Public Cloud, and the rulebases deployed there, can be used within the Oracle Service Cloud application. In case you have missed out on our first part of this series, you can find it here. With the right nudge, our Lazy Expert is not so lazy after all.

Part 1  looked at exploring, deploying and verifying the “RightNowSimple” rulebase to work with the Service Cloud Connection. The rulebase was launched directly using the Interview Session URL.

Part 2  looked at embedding this Interview into the Consumer Portal of Service Cloud so that anonymous visitors to the portal can use this same interview in self-service mode. This is accomplished by publishing an “Answer”, with Interview Session URL embedded in an IFRAME, to the Consumer Portal.

This post will look into embedding another sample OPA Rulebase into the Service Cloud Consumer Portal so that “known” (read logged-in) contacts can use the Interview Session for an appropriate determination to be provided by the OPA Rulebase. The Interview session will be launched in the context of a known user/contact and hence it is possible to pre-seed the Interview with the data from Service Cloud and, once the determination is completed in OPA, save the data back into Service Cloud using the Service Cloud Connector.

Pre-requisites:

  1. Steps in Part 1 are completed and the Service Cloud Connector is verified to be working fine.
  2. Explore / Deploy / Activate the “StudentBenefits” sample Rulebase into the OPA Cloud Policy Hub and obtain the Interview Session launch URL. Be sure to specify the correct Oracle Service Cloud connection to be used by this Rulebase.

Service Cloud and Oracle Policy Automation

Do remember to explore the mapped-in and mapped-out attributes in the Data Model used by this Rulebase.

Service Cloud and Oracle Policy Automation Integration

After you have deployed the Rulebase to your OPA Hub, don’t forget to note the URL.

Oracle Service Cloud and Oracle Policy Automation

Retrieve the Shared Secret used with the Service Cloud Connection

  1. The shared secret can be obtained from the Service Cloud Connection administration page. This is used for the purposes of encrypting the URL parameter “user”, as it is launched from within the Service Cloud Consumer Portal. If necessary, a new shared secret can be generated from within this admin page itself.

Deploy and configure the sample OPA Widget to Service Cloud

1. The relevant artifacts (for OPA Cloud Nov 2016 Release) and the detailed instructions for installation can be found on the official documentation website.

2. Download and Save the file Oracle_Policy_Automation_Cloud_Examples_Nov2016.zip and Unzip or extract the contents of the file to a local folder. Bear in mind that both of these URLs will probably evolve over time.

3. Verify and, if required, enable MOD_CP_DEVELOPMENT_ENABLED configuration setting for your Service Cloud Instance. This setting is most likely configured by the Oracle team, during the provisioning of your connected OPA Cloud Instance. If necessary, enable this setting under Configuration > Site Configuration -> Configuration Settings and changing the key value to “Yes”. This will enable you to work with the next steps of configuration within the Customer Portal.

4. Upload the required files to your Oracle Service Cloud instance using any WebDAV client, using the following sequence of steps. Tools you can user for this step include Cyberduck V4.4 (free, recommended by Oracle), WinSCP and even the good old “Mapped Network Drive” in Windows, to work with and explore the Customer Portal files available at the URL https://<your_site>/dav, using the WebDAV protocol.#

For the sake of brevity, these next steps are more focused on OPA. Please refer to the Service Cloud documentation, for the specific development process / best practices to be followed.

a. Configure/update the Shared Secret value into the file “…\customer-portal\widget\opa-helper.php” by placing it into the $shared_secret variable, using any plain text editor.

You will observe from the highlighted code snipped below that this shared secret is used to encrypt the user (contactID) parameter that is passed on to OPA Interview Session through the launch URL. You don’t really need to understand the code, just understand that you don’t want URL parameters that are readable with the naked eye.

PHP Code of the Widgetb. For Oracle Service Cloud version November 2012 and later, we need to use Customer Portal framework version 3:

  • Upload the directory OPAWidget from customer-portal/widget/v3 to dav/cp/customer/development/widgets/custom/opa
  • Upload the file opa-helper.php from customer-portal/widget to dav/cp/customer/development/helpers

Note: You must have incorporated the “shared secret” before uploading this file.

Activate the OPAWidget using the “Development Mode” in Service Cloud’s Customer Portal administration page.

  • Open the Customer Portal Administration site at https://<your_site>/ci/admin.
  • In the menu bar, select “Settings”, then “Set Environment”.

Select Site Mode as “Development” and verify that you are actually browsing the development version of the customer portal:

Delivery to Customer Portal

So you should see something like this:

Oracle Service Cloud Customer Portal Integration

Now you are ready to activate the OPA Widget that you have uploaded to your environment.

  1. Navigate back to the Custom Portal Admin Dashboard page.
  2. In the menu bar, select Widgets, then Browse Widgets.
  3. On the Widgets page, select Custom Widgets, then opa, and then OPAWidget.
  4. In the custom/opa/OPAWidget view, with version 1.1 selected, click the “Activate this version” button.

When activated without errors the version drop-down will change to “1.1 (currently in use)”. In the picture below you can see the 1.1 version is activated. You will find it easier to use the search function highlighted rather than scrolling through the myriad of widgets.

Oracle Service Cloud and Oracle Policy Automation

The final part of this rather convoluted process is similar to what you did in part two, namely you will now insert something into an Answer. Whereas in the previous example you inserted a bit of HTML that you could make yourself, this time OPA will be added to the Answer using the eponymous widget.

Insert the OPAWidget into an “Answer” in the Customer Portal:

  1. Create a new “Public” Answer in Service Cloud as shown below.

Oracle Service Cloud  WorkspaceSelect an appropriate “Access Level” on your site for this Answer, to ensure that only logged-in users will be able to access this answer from the customer portal. A logged-in user is necessary for pre-seeding the Contact information while launching the embedded OPA interview session.

  • Save the Answer record and note down the Record ID. We will use this Record ID to ensure that the OPA Widget is visible only when this particular answer is accessed by users in the customer portal. In our case, this ID is “134”.

Oracle Service Cloud and Oracle Policy Automation

  • Edit the Answer Page design to conditionally include the OPAWidget. The page to be edited is detail.php at the path /dav/cp/customer/development/views/pages/answers

I used Cyberduck and Notepad++ as the editor, with the default character encoding as UTF-8. Cyberduck ensured that every save in the chosen editor was updated into the WebDAV development folder immediately. Nice!

Oracle Service Cloud and Oracle Policy Automation

As an example, here I have edited the file to only display the Web Determination that we want to display, namely StudentBenefits, when we are showing Answer number 134.

Oracle Service Cloud and Oracle Policy Automation

Verify the results in Service Cloud Consumer Portal

  • Search / Navigate to the Answer record in the Consumer Portal, as a logged-in contact/user. If you don’t login, you can expect to see the following warning message:

Oracle Service Cloud Embed ErrorView the details of this Answer and work with the embedded Interview Session. You will observe that some of the contact information is pre-seeded as you work through the interview session and the final assessment / determination is saved back into Service Cloud.

Assuming you have logged in however, this is what you will see :

Logged in to Customer Portal OPA

Those of you who have followed this sometimes serpentine chapter of our adventures from the beginning will note that I have logged in with a Portal profile of a user called Richard (who might that be?) and the interview has read that information.

Congratulations on getting this far. So we have discovered yet another way to nudge our lazy expert into giving us something useful. In the fourth and final part of this series I will go behind the curtain and work in the Agent Desktop. See you soon!

Raj

Oracle Policy Automation Public Cloud with Oracle Service Cloud #1

Using Oracle Policy Automation Public Cloud with Oracle Service Cloud

Introduction

We are continuing our Lazy Expert series of posts, with an explanation of how OPA Public Cloud, and the rulebases deployed there, can be used within the Oracle Service Cloud application. In case you have missed out on our first part of this series, you can find it here. With the right Nudge, our Lazy Expert is not so lazy after all.

One of the earliest pre-built connectors for OPA comes from the Oracle Service Cloud Service, to connect with an Oracle Policy Automation Public Cloud Instance. Since then, we have seen multiple releases of this connector and each subsequent release improves the functionality available with the OPA Public Cloud Service, as well as how it is used together with the Oracle Service Cloud Service. For the rest of this content, we will be referring to these applications as OPA Cloud and Service Cloud respectively to gain a few centimeters of white space.

OPA Runtime Nudge (Trigger) Possible Scale of Invocations / Volume Typical Application / Solution Architecture Use by Service Cloud
Policy Hub (OPA Public Cloud) HTTP(s) URL based invocation of the Interview Service 100s of Thousands of invocations a day OPA Policy Hub, as another Web Application, provides the Interview Session screens using the UI as configured by the rule author.

 

This Assessment wizard can be made available within the “Agent Desktop” for the agent who is providing assisted service as well as embedded into the “Consumer Portal” for the consumer who is interested in achieving self-service.

 

It is possible to pass additional parameters through the URL, pre-load the Interview session with data from Oracle Service Cloud application and,

 

Persist / Save the data back into the Service Cloud application itself on completion of the interview and an appropriate assessment is made by our expert.

OPA RightNow Connector is a special implementation of the Web Service Connector architecture provided by OPA Policy Hub.

 

This “Connector” connects to a Service Cloud Instance as a data source and supports pre-loading and saving of data to / from the connected Service Cloud Instance.

For those of us trying to figure out the inner working of this connector, we will be using the sample rulebases provided by OPA Cloud. The complete list of example projects for the (freshly minted) Nov 2016 release of OPA can be found here. Such a hands-on exploration works best if you know both the applications well enough to administer and configure them, or spend some time together as a team that has the collective knowledge of both the applications.

The sample rulebase we use for this post is “RightNowSimple”. This is a fairly simple project that can be used to test the connectivity with the Service Cloud Instance from OPA Cloud and without making any changes to the Service Cloud Application. The supported objectives of this rulebase are

  • To collect the basic user profile information and their opt-in preference for marketing emails
  • If they opt-in, and only if, then collect the additional email address information
  • With the collected information and preferences, create a new “Contact” Record and the associated follow-up “Tasks” to be performed in the connected Service Cloud Instance.

Pre-requisites:

  1. OPA Cloud Instance provisioned with the necessary connection to the Service Cloud Instance. This is an improvement from earlier versions in that Oracle, along with provisioning the OPA Cloud Instance, will also perform some of the initial setup tasks needed to connect to a Service Cloud Instance from OPA Cloud. If this is all done correctly during provisioning, you should see the following entry in the “Connections” tab of the OPA Policy Hub administration site. The green check mark against the Oracle Service Cloud Connection signifies that the provisioning is all done correctly and that the Oracle Service Cloud connection is ready to use. Please also note the use of the SOAP service end-point for the associated Service Cloud Instance.

Oracle Policy Automation Public Cloud

  1. The new Permission model in OPA Cloud allows for “Collections” to be created, for the purpose of grouping rulebases and granting permissions to users at the Collection-level. In our case, we created a collection named “Service Cloud Collection” to group all the rulebases related to Service Cloud. If this is not available, you can always use the “Default Collection”, which is made available by default in OPA Cloud. Also the OPA Cloud Admin can specify which connections each of these collections will have access to. You will further see its impact when we are ready to deploy the rulebase.
  1. Oracle Policy Modeling Version 2016 is installed on your local machine with all its pre-requisites like Java RunTime Environment and Microsoft Office Word and Excel. Note that the Java RunTime requirement is now for version 8.

Explore the RightNowSimple Rulebase:

  1. Open Oracle Policy Modeling Nov 2016 release
  1. Click on “Example Projects”, search for RightNowSimple and select the project to create the local project on your default Projects folder.
  1. Review the Rules.docx rule document and the Data tab for the included entity model, its usage of Inferred Entity Instances and application of additional reasoning with the inferred entity instance attributes.
  1. Review the Interview screen design and its usage of rules for Screen Visibility (for “email address” Screen) and Screen Control Visibility (for “Interview Complete” Screen).
  1. Review the Data Model for the entities “Global” and “the task”, their containment relationship, their respective mapping to “Contact” and “Task” entities of Service Cloud, their attributes and public “Names” for those attributes, “Mapped Out” attributes for all the inputs being sent to “Service Cloud” and the “Mapped In” attributes for the outputs being received from Service Cloud.

 

Oracle Policy Automation Public Cloud

  1. As per the above rulebase configuration, when the Interview is saved / submitted, a new contact record and the associated follow-up tasks are created in the Service Cloud database.

Deploy and run the RightNowSimple Rulebase

Let us now deploy this RightNowSimple rulebase to the OPA Cloud Policy Hub, using the Service Cloud Collection that is now available in the Policy Hub.

  1. Connect to the OPA Cloud Policy Hub using the appropriate admin credentials for your instance.
  1. Update the Connection used by the RightNowSimple rulebase, to make it ready for deployment.

Oracle Policy Automation Public Cloud

This can be done by clicking on the “Mapping Settings” in the tool bar or the “Global” Entity to open the “Mapping Settings” dialog, changing/selecting the Service Cloud connection used by the rulebase and then refreshing the “meta data” that is made available through this Service Cloud connection. This meta data is required to accomplish the necessary mapping between the OPA Entity model and the Service Cloud entities.

  1. Deploy a Snapshot / Activate the rulebase on the OPA Cloud Policy Hub, using the appropriate Policy Hub Admin credentials for your OPA Cloud instance. For a quick deployment and test of the rulebase, make sure that the “Activate Immediately” check box is selected and deploy. Note Down the URL.
  1. Once the deployment is complete in the previous step, you will be able to copy the Interview launch URL for this rulebase. Go ahead and launch run the interview session with any input you would like to use and complete the Interview as per the instructions provided on the screen.

Verify the results in Oracle Service Cloud:

  1. The New Contact ID displayed on the summary screen, on Interview Completion indicates that the connector worked behind the scene, using the mapping configuration modeled in the rulebase, and created the contact record in the Service Cloud instance.
  2. Now login to your Oracle Service Cloud instance to verify the new Contact record created and the associated tasks, as inferred in the rulebase. Also compare the mapping settings in the rulebase to the actual filed values that are now inserted into the Service Cloud Instance.

Oracle Policy Automation Public Cloud

With this detailed background, check this space when we will continue next with part 2 of this blog that focuses on embedding such interview sessions into the Consumer Portal of Oracle Service Cloud.

 

Worldwide
Logo by Southpaw Projects LLC