Monday, November 4, 2019

Configure a PeopleSoft instance to point to an ODA Channel/Skill

This post will cover the PeopleSoft configuration required to enable a delivered Chatbot and point to the ODA Channel/Skill.

PeopleBook References:
Creating Bot Definitions
Adding Chatbot to Application pages

PeopleBooks is self explanatory. Here are a few additional items that I found useful.

Configuring the Application Service

As delivered, both the service operations (PTCB_APPL_SVC_GET.v1 and PTCB_APPL_SVC_POST.v1) associated with the delivered REST - Chatbot Application Service - PTCB_APPL_SVC use 'Basic Authentication and SSL' as the 'Req Verification' option.

For example:


In my case, because I am using a HCM 9.2 - PI 31 instance running on OCI (created by PeopleSoft Cloud Manager) as a demo/proof of concept, I did not setup SSL. To workaround the SSL issues, I set the 'Req Verification' property to 'Basic Authentication' for both service operations.

Security to access the Bot Definition

While testing, I found that when I opened my 'Absence Assistant' chatbot, it would open the modal window but it would keep spinning endlessly without loading anything. I did not find any errors on the Browser Console either.


Note: The Chatbot window spinning could happen due to several reasons.

In this case, the issue was that the current PeopleSoft user did not have access to the Bot definition. We can provide this by adding the following Role that we used to setup the Bot definition.


Testing the Chatbot

I learnt that using the delivered JPATTERSON userid in HCM 9.2 - PI 31 was very handy because the user already had the necessary absence information setup!

Configuring the delivered Skill in the ODA instance

This post will cover some tips and lessons that I learnt while setting up the delivered Skill HGA_CHAT_ASST(1.0) in my ODA instance. It also covers a few items that are not very obvious when we refer PeopleBooks documentation. Before we proceed it is assumed that we already have an ODA instance created.

PeopleBooks Reference: Importing and Setting up a Delivered Skill

Delivered Skill location

The delivered absence Skill will be located in the following location.

<PS_APP_HOME>/setup/chatbot/

In my case, since I am using a HCM 9.2 - PI 31 running on OCI (created by PeopleSoft Cloud Manager), the Skill - HGA_CHAT_ASST(1.).zip was located here.

/u01/app/oracle/product/pt/ps_app_home/chatbot/

We simply need to download this to a local machine (PC/laptop) and use it in the next step.

Importing the delivered Skill to ODA

This step is self explanatory. Here are some screenshots that will further assist you with this activity.

Select Skills from the Digital Assistant Designer UI menu.


Next, upload the delivered Skill HGA_CHAT_ASST(1.0).zip using the Import Skill button. Once the import process completes, we will see the 'Absence Assistant' Skill in the list (as shown above).

Note: During the import process, we may see the following error/warning. I was told that this can be ignored. And it was true! It did not cause any issues.


Clone Delivered Skill

As always, it is best practice to maintain a copy of the delivered Skill so that we can refer back to it if necessary. So, as advised in PeopleBooks, we need to clone the 'Absence Assistant' Skill and create a copy of our own. In my case, I named my copy 'Absence Assistant Skill'.


Configuring the Delivered Skill to point to our PeopleSoft Environment

Once we clone the delivered Skill, the next step is to configure it to point to our PeopleSoft environment. Our PeopleSoft environment can be running either on the Cloud (OCI) or on premises. In my case, my HCM 9.2 - PI 31 is running on OCI.

ODA > Digital Assistant Designer UI > Menu > Development > Skills (select your copy of the Skill) >  Settings > Configuration (Tab) > Custom Parameters


If we scroll down further on this page, we will find all the delivered custom (oxymoron?) parameters.


We can leave the HGAmarket, HGAnode and HGAportal as delivered in the 'Absence Assistant' Skill.

We need to use the <Proxy User> and password (which we created before getting started) to configure the PSHCMuserid and PSHCMpassword parameters.

Refer PeopleBooks for more details on how to create this userid:
Understanding Security for Chatbot Integration Framework





Next, we need to ensure that we configure PSHCMbaseurl parameter to point to our Integration Broker REST end point of the delivered PTCB_APPL_SVC.v1 service.

End Point Format:
https://<server>:<port>/PSIGW/RESTListeningConnector/<node>/PTCB_APPL_SVC.v1

server: Integration Broker hostname
port: Integration Broker port
node: Default Local Node

In my case, since I am running my HCM 9.2 - PI 31 instance on OCI and I did not setup SSL, I used http instead of https. Also, since I did not  have a virtual address that pointed to my server, I simply used the public ip address of my HCM instance. So, my end point was in the following format.

http://1.2.3.4:8000/PSIGW/RESTListeningConnector/PSFT_HR/PTCB_APPL_SVC.v1

Creating and Configuring an ODA Channel

PeopleBooks: Creating the Web Channel

Once our Skill is created and configured appropriately, we need to create a Channel and configure it to route to our Skill. This step is briefly mentioned in PeopleBooks but I missed the routing step because it was not very obvious and found out the hard way. Here are the steps to create and configure a Channel.

ODA > Digital Assistant Designer UI > Menu > Development > Channels > Create Channel



Next, we need to ensure that the Channel is enabled and that it is routing to the Skill we configured in the previous step. Finally, we need to note down the App Id. We will use this while configuring our PeopleSoft application to point to this ODA Channel.


Setting up the Oracle Digital Assistant Instance

This post covers some tips on setting up an Oracle Digital Assistant (ODA) instance especially for those who are using an Oracle Cloud trial account.

The assumption here is that we already have an Oracle Cloud trial account created. Here is a resource that provides additional information on how to procure a free trial account.

https://docs.oracle.com/en/cloud/get-started/subscriptions-cloud/csgsg/request-trial-subscription.html

Setting Up the ODA Instance

From our OCI Homepage, we can use the menu to navigate to Oracle Digital Assistant. But I found that there are two Digital Assistant options available as shown in the screenshot below. For the purposes of the PeopleSoft - ODA integration, we need to use the Digital Assistant under the Platform Services menu.


Potential issue with Free Trial Service Limits

When I was trying to create an ODA instance, I kept running into the following error.

PSM-LCM-01002 One or more validations failed. See the included validation. See the included validation errors for details.

[No matching systems found to create the service]



After some trial and error, I found that I could workaround this validation error by selecting a different region other that Ashburn. I was able to successfully create an ODA instance in the Pheonix region as shown below. I believe I ran into this error because I already had my PeopleSoft Cloud Manager instance and my HCM 9.2 - PUM Image 31 instance running in the Ashburn Region. I may have run into this error because of Service Limits imposed on OCI free trial accounts.



You should also receive an email to confirm that the ODA instance was created successfully.

Once the ODA instance is ready, we can access the Digital Assitant Designer UI using the menu as shown below.



Setting Up the PeopleSoft Web Server for ODA

This post will describe the steps to setup the PeopleSoft web server for Oracle Digital Assistant (ODA) - Chatbots. This post will also go through some tips and tricks that are not covered in PeopleBooks (at the time of writing).

PeopleBook Reference: Setting Up the Web Server for the Chatbot

Creating a new 'external' site on the web server domain

This step should be pretty straight forward for a PS Admin. But for someone like me who does not have a lot of PS Admin background, it was a struggle to find the right information and create a new 'external' site on the PeopleSoft web server domain. Based on my experience creating this new site, I wrote a separate blog post to cover this topic and demystify some of the admin configuration and jargon.

Refer: Create new (external) site in a PUM Image

Note: This information is not in PeopleBooks but I was told that the new site can use the same web profile as the other existing site for regular PIA access. Since, my current environment is a HCM 9.2 - PI 31 created on OCI by PeopleSoft Cloud Manager, the delivered default site for the PIA is peoplesoft01 and it uses the delivered PROD web profile. So, I created my 'external' site using the PROD web profile using the procedure described in the blog post referenced above.

Copying the Web SDK (delivered ochatjs folder) to the new 'external' site

This step is also self explanatory. The one challenge I had was that my PUM image (HCM 9.2 - Image 31) was running on Oracle Cloud Infrastructure (OCI). I generally use WinSCP to perform file transfers, etc. to the servers. The default user 'opc' (Oracle Public Cloud) which we use to connect to OCI via WinSCP does not have the appropriate privileges to copy the Web SDK to the 'external' site.

Graham Smith, Oracle ACE Director, from Cedar Consulting UK showed me a neat trick to use WinSCP, login as the default user 'opc' and then switch to 'root'. I am forever thankful to him for this because it helps avoid the use of command line for such tasks.

How to use WinSCP to connect to PS Servers on OCI as root?

Use SCP Protocol, 'opc' user, set the private key in the authentication settings and use "sudo su -" in the SCP/Shell settings.



Copying the ochatjs folder (web SDK) to the external site

Source: ochatjs.zip file located in <%PS_APP_HOME%>/setup/chatbot

In my case, since I am using a HCM 9.2 - PI 31 running on OCI (created by PeopleSoft Cloud Manager), the ochatjs.zip was located here.

/u01/app/oracle/product/pt/ps_app_home/setup/

Destination: <PIA_HOME>\webserv\<DOMAIN_NAME>\application\peoplesoft\PORTAL.war\external\

In my case, since I am using a HCM 9.2 - PI 31 running on OCI (created by PeopleSoft Cloud Manager), the extracted ochatjs folder was placed here.

/u01/app/oracle/product/pt/ps_cfg_home/webserv/WEBSERVER01/applications/peoplesoft/PORTAL.war/external/

Verification

We can verify the success of the web SDK installation by accessing the following URL on a web browser.

https:\\<your server name>:port\external\ochatjs\loader.json


DIY PeopleSoft Chatbots

Chatbots are here in PeopleSoft! The PeopleSoft Chatbot Integration Framework was delivered via Enterprise Components in various Applications (HCM, FSCM, CS, etc.). Utilizing this framework, HCM delivered the 'Absence Assistant' Chatbot in PUM Image 31.

Using an Oracle Cloud trial account, I went through the exercise of spinning up a HCM 9.2 - PI 31 instance on Oracle Cloud Infrastructure (OCI) using PeopleSoft Cloud Manager, creating an Oracle Digital Assistant (ODA) instance on OCI, uploading the delivered 'Absence Assistant' Skill to ODA, configuring the ODA Skill/Channel to point to the HCM instance and likewise configuring the HCM instance to point to the ODA Skill/Channel!

Here is a demo of the 'Absence Assistant' Chatbot in action!


Hat Tip

I am very thankful to all Oracle PeopleSoft and ODA Product Managers, PeopleSoft Development team and PeopleSoft Support team for answering all my questions and pointing me in the right direction. Too many to list them all but they know who they are! Their insights are much appreciated.

Before you get started

Use HCM 9.2 PUM Image 32

If you are just getting started, I would highly recommend you to start with HCM 9.2 PUM Image 32. I started my proof of concept on PUM Image 31 and ran into several issues that were fixed in PI 32. Among other things, I had to pull out certain bugs (30151468, 30151584, 30150506) and the web SDK (ochatjs.zip) from PI 32 and apply them to my PI 31 instance. You will save yourself a lot of time simply by starting with PI 32!

Setup the <Proxy User> userid in PeopleSoft

Before we go any further, it would be a good idea to go ahead and setup the <Proxy User> userid in the HCM instance. This will be needed in the ODA Skill configuration.

PeopleBooks: Understanding Security for Chatbot Integration Framework

Configuration Steps - Blog Series

The following steps detail all the configurations that are necessary to setup the PeopleSoft - ODA Chatbot integration. This series of blogs address several practical tips, tricks and lessons learnt that might not be covered in PeopleBooks and other documentation.

Step 1: Setup PeopleSoft Web Server for ODA
Step 2: Setup the ODA instance on OCI
Step 3: Configure the delivered Skill in ODA
Step 4: Configure PeopleSoft to point to the Skill/Channel in ODA