Oracle Cloud HCM provides access to HCM services through an Oracle Digital Assistant-based conversational interface. This is a low-entry, natural language interface for occasional users which doesn't require them to learn their way around a particular interface.
In this hands-on lab, you’ll learn how to access an out-of-the box digital assistant and then customize it for your Oracle HCM Cloud instance. Let’s get started!
Digital Assistant Terminology
Here are some of the common terms that you'll encounter in this session:
- Oracle Digital Assistant (ODA): The underlying technology platform that makes digital assistants and skills work.
- digital assistant: A container of one or more skills that provides a unified experience for the user engaging with the conversational interface.
- skill: An individual chatbot designed for a specific domain that listens for user input and provides appropriate responses. Skills may be delivered and supported by Oracle or built and maintained by customers and/or their partners.
- chatbot: Used informally as a synonym for either a digital assistant or a skill.
- intent: A specific use case that the bot is able to understand and implement (e.g. display the payslip). There may be many different ways the user could express that intent.
- utterance: A way of expressing an intent. For example, "I want to view my payslip" and "How much was I paid" may both express the same intent to the digital assistant.
- channel: One of various mechanisms through which a user can interact with a digital assistant, e.g. SMS text messages, the digital assistant window in the Fusion Cloud browser, Slack, Microsoft Teams, etc.
Before You Begin
What Do You Need?
To complete this lab, you need:
- An Oracle Human Capital Management Cloud instance (Version 20A or higher). You will be using the shared instance that has been provided for this event.
- An Oracle Digital Assistant (ODA) instance. You will be using the shared instance that has been provided for this event.
If you want to try this lab outside of the classroom, you need an Oracle HCM Cloud instance and an Oracle Digital Assistant that has been specially provisioned to be paired with Oracle HCM Cloud. This pairing ensures that the Oracle Applications skills are available in the Skill Store and authentication between the skill in HCM and Digital Assistant is handled properly. Speak with your Oracle Cloud sales representative if you are unsure about your setup.
Scenario
You’re part of an HCM team and are responsible for delivering a consistent and engaging user experience via a digital assistant across the entire HCM suite. The HCM instance comes with a pre-configured digital assistant (named FADigitalAssistant) that includes a skill for HCM functions.
You’ve been asked to extend FADigitalAssistant and the HCM skill to fit more precisely your company’s needs. Here's what you will do:
- Modify the digital assistant by customizing its default help prompt and disabling unwanted skills.
- Add example utterances to an intent so that it can understand company-specific input.
- Create a new entity.
- Customize an error message.
- Add a feature to invoke an HCM page directly from the skill.
- Add frequently asked questions.
- Rebase your modifications to a new base version of the HCM skill.
- Use the Insights feature to retrain the skill to handle input that it didn't understand before.
- (Optionally) Integrate your extended skill into the HCM UI.
Test the Digital Assistant in the HCM UI
Before getting to work to modify FADigitalAssistant and the Hcm skill, let's try out the pre-built version of FADigitalAssistant that is embedded within the HCM service.
- Log in to the HCM UI with the URL and credentials provided by the instructor.
Upon successful login, you will arrive at the HCM landing page.
On the bottom right of your screen, you'll see a small red widget.
- Click on the widget to open the chat window.
- In the Message field, type Hi.
The FADigitalAssistant will greet the user and display its skills in a carousel. The first skill that is displayed is the Approvals skill.
- Navigate to the Hcm skill (not the HCM Knowledge) skill by clicking the arrow icon (
) on the right of the carousel three times.
This is the card that you should see.
Notice that it has three buttons that you can select from.
- Select show me my salary.
You will be shown the user's salary details.
- Next, type what is. Observe that as you type, you are shown auto-suggestions.
- Select what is my sick balance.
The sick leave balance is shown along with the Schedule time off option.
- If you like, click Schedule time off.
You will be redirected to another browser tab where the Absence web page will open.
With these steps, you have verified that the default digital assistant is working in the HCM instance.
Now let's now move on to the Oracle Digital Assistant instance.
Set Up, Configure, and Test FADigitalAssistant in Oracle Digital Assistant
When you pull pre-built skills and digital assistants from the Skill Store, you may need to remove functionality, add functionality, or change the way a skill works to satisfy requirements specific to your company.
ODA provides the ability to extend the pre-built digital assistant and skill. By extending a digital assistant or skill, you create a new version which you can modify but which remains compatible with the original version. This also enables you to later take advantages of updates to the original version by rebasing.
In the previous section, you tested a version of FADigitalAssistant that was already integrated with the HCM instance. Now you're going to switch to development mode and work in Oracle Digital Assistant to extend FADigitalAssistant and the HCM skill so that you can add your own customizations.
In this section, you'll start by pulling FADigitalAssistant from the Skill Store and then creating an extended version of it.
Log In to Oracle Digital Assistant
- Log in to Oracle Digital Assistant using the credentials provided by the instructor.
After successfully logging in, you will land on the ODA home page.
Pull FADigitalAssistant from the Skill Store
To get the digital assistants and skills that you want to extend, you use the Skill Store within Oracle Digital Assistant.
Note: For purposes of this lab, FADigitalAssistant has already been pulled into your shared Oracle Digital Assistant instance, so you won't actually need to complete this task.
If you did need to pull a digital assistant, these are the steps that you would follow:
- In Oracle Digital Assistant, click
to open the side menu and then select Development > Store.
- In the Filter field, type FADi to narrow down the list.
The most recent version of FADigitalAssistant will be shown. However, we'll be working with an earlier version.
- In the tile for FADigitalAssistant, click
to show all of the versions of FADigitalAssistant that are available.
- Click the tile for FADigitalAssistant version 20.04.12 to open it.
- On the page for FADigitalAssistant version 20.04.12, click Pull.
- In the confirmation dialog that appears, click Pull.
Once completed, you will be prompted with the list of items added to your digital assistant.
- Click OK.
The digital assistant will appear on the Digital Assistants page.
Inspect FADigitalAssistant and its Corresponding Skills
Now that the digital assistant is pulled, let's take a look at it to see what it consists of.
- Click
to open the side menu and then select Development > Digital Assistants.
You should see an entry for FADigitalAssistant version 20.04.12.
- Click the tile for FADigitalAssistant version 20.04.12 to view the skills attached to this digital assistant.
Note: You may notice a green icon on a few skills in your instance (in the screenshot above, it appears for Hcm, HCM Knowledge, Hiring, Project Management and Project Time Entry). This icon indicates that a later version of the skill is available. You can update to the later versions after you extend the digital assistant.
Configure FADigitalAssistant
In order to communicate with HCM, you need to configure the digital assistant to point to the Oracle Cloud HCM environment.
Similar to the last task, this task should already be completed in the shared instance.
For future reference, here are the steps:
- In the list of the digital assistant's skills, select Hcm.
- Scroll down to the Parameters section of the page.
- For the value of the da.FARestEndPoint parameter, enter the following URI (or the value otherwise provided by the instructor):
https://adc3-zshi-fa-ext.oracledemos.com
Test the Features of the Hcm Skill and FADigitalAssistant
The HCM skill is designed to address employment-related questions and help you initiate manager self-service transactions. The skill is broken down in multiple intents, which are classifications of what users may want to do, such as check their vacation balance. The HCM skill has intents for the following activities:
- Absence Balances
- Past & Future Scheduled Absences
- Anytime Feedback
- Benefits Coverage
- Directory
- Salary
- Tax Withholding & Year-End Documents
- Payslip
- Onboarding
- Manager Self-Service
- Team Performance Evaluations & Goals
To see some of these features in action, we'll use Digital Assistant's built-in bot tester.
In addition, we'll see some of the digital assistant's features, such as greeting the user and showing help for all of its skills.
- Click the Tester icon (
), which is located at the top of the page.
- In the Channel field, select Webhook.
Note: When using the tester in this lab, always use the Webhook option. If you use another option, such as Oracle Web, the bot will say that you don't have permission to access the information you are requesting.
- In the tester's Message field, type Hi, and click Enter.
You should see the following response:
Notice that the digital assistant:
- Greets the user.
- Displays a carousel of the skills associated with the digital assistant.
You can click the arrow to the right of the card for the Approvals skill to see the cards of the other skills.
- In the Message field of the chat window, type What is my salary and press Enter.
- Select Get an access token.
This will redirect to another browser tab.
- Enter the following user name and password (or those provided by your instructor).
- User name: robert.jackman
- Password: Provided by the instructor.
Once you enter the credentials, the authentication should complete.
- Return to the previous browser tab.
You will get the reply as shown below:
- Now try the following requests:
- What is my medical group number?
- Who is my HR rep?
- Are my kids covered under my dental plan?
For each of these, you should get an appropriate response, thus demonstrating that the digital assistant successfully connected to and interacted with the HCM instance through the tester.
- Close the tester.
Extend and Customize FADigitalAssistant
Now that you configured and tested FADigitalAssistant, you'll create an extension of it and customize that extension.
Create an Extension of FADigitalAssistant
- On the top of the page for the digital assistant, click
to open the menu for managing the digital assistant, click the More button, and then select Extend.
- In the Create Extended Digital Assistant dialog, for Display Name, enter a name in the form
<YOUR_INITIALS>_FA_DA_Extended
.For example, if your initials are "AB", enter
AB_FA_DA_Extended
. - Select the Open extended digital assistant checkbox.
- Click Extend.
Your new extended digital assistant is then opened on its Skills page. There you can see all of the skills that are currently registered with the digital assistant.
Disable Unneeded Skills
Your extended digital assistant contains a whole suite of SaaS skills, all of which are enabled by default. Since this lab focuses on HCM, you will disable all except the Hcm skill.
For each skill, except Hcm, do the following:
- In the list of skills on the left side of the pane, select the skill.
- Set the Enabled switch to the OFF position.
After you have disabled those skills, the page should look like this:
![Screenshot of FADigitalAssistant's Skills page, which shows that all of the skills except for Hcm are marked with the Customized icon.](img/hcm-skills-disabled.png)
Notice that all the skills except Hcm now are marked with the icon, which indicates that they are not in the same state that they were in the original version of the digital assistant. This icon also appears for skills that are still enabled but which have been customized.
Customize the Help Prompt in the Digital Assistant
In this section, you'll customize the default prompt that appears when a user indicates that they need general help.
- In the left navigation for the digital assistant, select
and then select the Configurations tab.
- Scroll down to the Skill Bot Help Prompt setting and update its value to Hi, I'm Acme Bot, your personal digital assistant! Here are some things you can do:
- Change the value of the Max Sample Utterance to
3
.This affects the number of choices that are displayed for each skill under the help prompt.
- In the top navigation, click the
button .
- In the Train dialog, leave Trainer Tm as the default, click Submit, and wait for the training to complete.
- In the top navigation for the digital assistant, click
to open the tester.
- In the tester, type Hi.
You should see a response that contains your customized help message and three sample utterances from the Hcm skill. (The number of sample utterances corresponds to the value you set in Max Sample Utterance property.)
This might take a few minutes. You'll be informed when the training completes with a popup message like the following:
![Screenshot showing the message 'The AB_FA_DA_Extended skill is trained using the Trainer Tm training model and ready for use.](img/hcm-da-trained.png)
If you miss that message, you can confirm that the training has finished when the Train button has a checkmark next to it ().
Now that your customizations are in place for FADigitalAssistant, it's time to move on to extending and customizing the HCM skill.
Extend and Customize the Hcm Skill
In this section, you'll extend the existing HCM skill to customize error messages, add company-specific FAQs, extend functionality and much more. Later, you can also merge your customizations in the extended skill with updates to the original Hcm skill.
Extend the Skill
Now we'll extend the Hcm skill. So that you can later see how rebasing works, we're going to extend an earlier version of the skill. If time allows, you can then rebase your customized skill to the newest version of the original skill.
- Click
to open the side menu and then select Development > Skills.
- In the Filter field type
Hcm
and press Enter.You should see an entry for the most recent version of the Hcm skill.
However, for purposes of this lab, we'll be working with an earlier version of the skill.
- To show all versions of the skill, click
in the Hcm tile.
You should now see multiple versions of the skill. We'll be using version 20.04.08.
- In the tile for version 20.04.08 of the skill, click
and select Extend.
- In the Create Extended Skill dialog, for Display Name, enter a name in the form
<YOUR_INITIALS>_HCM_ExtendedSkill
.For example, if your initials are "AB", enter
AB_HCM_ExtendedSkill
. - Click Extend.
The extended skill opens in the UI.
Notice that all the intents and utterance are marked with the
icon, which indicates that they are inherited from the skill's base version and have not been customized.
Configure and Train the Extended Skill
Later on in this lab, you'll need to use the tester to test changes to the skill. So that you can test the skill on its own and incrementally (without having to re-add it to the digital assistant every time you have a change to test), you need to configure the skill to access the HCM instance.
- In the left navigation for the skill, select
and then select the Configuration tab.
- Scroll down to the Custom Parameters section of the page.
- Select the da.FARestEndpoint row and click the Edit button above the table.
- In the Edit Parameter dialog, make sure that the value of the parameter is
https://adc3-zshi-fa-ext.oracledemos.com
(or the value that your instructor has given you) and click OK. - In the top navigation, click the
button .
- In the Train dialog, leave Trainer Tm as the default, click Submit, and wait for the training to complete.
This might take a few minutes. You'll be informed when the training completes with a popup message like the following:
![Screenshot showing the message 'The AB_FA_DA_Extended skill is trained using the Trainer Tm training model and ready for use.](img/trained2.png)
If you miss that message, you can confirm that the training has finished when the Train button has a checkmark next to it ().
While you are waiting for the training to complete, note the following things on extended skill's page:
- On the top, it shows that you have created an extension of the skill, and that extension is in draft state with a version number of 20.04.08.
- There are buttons for Local, Inherited, and Customized, which you can use to filter the display of the skill’s intents.
- There are icons next to the intents, utterances and entities which indicate that they are inherited from the base skill and no customization has been done so far.
Enhance an Existing Intent
One of the HCM skill's functions is to provide benefit coverage details. We’d like to make sure that it handles queries for benefits provided by a given insurance provider, e.g. YourLife, a fictitious insurance company.
Test for the "YourLife" Insurance Provider
- In the top navigation for your extended skill, click
to open the tester.
- In the Message field, enter Does YourLife offer discounts?
This is what you should see:
The skill doesn't understand this request.
- Close the tester.
Look for "YourLife" in Example Utterances
Let's dig down into the intent for feedback and see if there's anything we can do about it.
- In the left navigation for the designer, select
.
- Select the Benefits Coverage intent.
- Find the Examples section of the page.
The examples here are example utterances that are used to train the skill to understand when a user wants to provide feedback.
Let's see if any of these utterances include "YourLife".
- In the Filter field, type
YourLife
, and press Enter.As you can see, none of the examples contain "YourLife".
Add to Benefits Coverage Utterances
Now let's add some example utterances that contain "YourLife" so that the skill is more likely to correctly respond to user input that contains that name.
- Next to the Examples section, click Advanced input mode.
- In the Enter your example utterances here field, paste the following utterances and click Create.
- Who is included in YourLife program?
- Do I get any discount for LASIK under YourLife program?
- Does YourLife offer discounts?
- Can I use FSA funds after my YourLife benefit is applied?
You should see the examples inserted into the table.
- Clear
YourLife
from the Filter field (so that it doesn't get in the way later on).
Test the Enhanced Intent
To see if these enhancements work, we need to retrain the skill and then test it again.
- Find the
button in the top navigation and click it.
- Leave Trainer Tm as the default, click Submit, and then wait for the training to complete.
- Click the tester icon (
).
- In the tester, click Reset.
- In the Message field, enter Is my family included in YourLife program?.
This is what you should see:
- Select Get an access token.
Another browser tab should open with the text: "
Authentication successful! You can return to the conversation.
" - Return to the browser tab with your Digital Assistant instance.
Now you should see a response regarding dependents covered under the various plans:
The additional utterances to the Benefits Coverage intent in the training model have improved the accuracy of the skill's response.
- Close the tester.
(Optional) Create a New Entity
Now let's add a new entity. Entities detect information in the user input that can help the intent fulfill a user request. Each entity represents a type of information and has valid values for this information type. The Hcm skill has a few dozen entities, with two examples being BenefitsPlanType (with valid values of health
, vision
, and dental
) and AbsenceType (with valid values including Sick
and Vacation
).
Now we'll add an entity for benefits insurance provider types.
- In the left navigation for the designer, select
.
- Click
to create a new entity.
- In the Name field, enter
BenefitsInsuranceProvider
. - In the Configuration section, in the Type dropdown, select Value list.
- Click
.
- For Value, type
YourLife
. - Click Create.
- Click
again.
- For Value, type
SoundHealth
. - For Synonyms, type
sound-health
and click Create. - Click
again.
- For Value, type
VisionHealthCare
and click Create.This is how the Create Entity dialog should now look:
- Click Create to conclude creation of the entity.
- In the Filter field, type
benefitsi
to help you navigate back to the entity you just created.You'll notice that there is no icon for it (since it isn't inherited).
Associate the Entity with Its Intent
For an entity to be recognized when parsing the user input message, it needs to be associated with one or more relevant intents. So let’s associate the new entity with the new intent:
- In the left navigation for the designer, select
.
- Select the Benefits Coverage intent.
- Click
.
- In the Filter field, type
Benefits
, and then select the BenefitsInsuranceProvider entity. - Retrain the model by clicking
and clicking Submit.
Test the Entity
The Try It Out feature enables you to test whether the skill identifies entity values in user input.
- In the left navigation for the designer, select
.
- Click
.
- In the Message field of the dialog, type Who is included in YourLife program? and click Send.
You should see a table showing entities and the values extracted from the input.
You can see that the input has resolved to the Benefits Coverage intent (though the value you get may not exactly match what's in the screenshot). In addition, the YourLife value of the BenefitsInsuranceProvider entity was detected.
Since the entities are recognized in the user input, the skill doesn’t have to ask the user for that information later in the flow.
(Optional) Customize Error Message in Skill
In this section, we'll customize an error message in the HCM skill to adjust its content and tone.
Along the way, we'll see how we can use resource bundles to store the message. Using resource bundles is a good practice since it enables you to develop multi-lingual versions of the skill where you have full control over the translated strings.
View the Message to Be Customized
First, let's try to enter feedback for an employee that is not in the system and see how the skill responds.
- Click the tester icon (
).
- In the tester, click Reset.
- Type I want to provide feedback for Norman Lewis.
- Click Get an access token.
After you are authenticated, you will see the error message "Sorry, I can't find anyone with that name. Please enter a different name."
- Close the tester.
Customize the Message
Let's modify that message.
- In the left navigation for the skill, click
to open the dialog flow editor.
- In the editor, navigate to the state
noEmployeeFoundForFeedbackName
(around line 1117).Note that the error message you received is assigned to the
prompt
property.We could update the message directly in the dialog flow. However, to demonstrate a best practice, we'll create a resource bundle to store the message instead.
- In the left navigation for the skill, click
.
- Click + Key.
- In the Key field, enter noEmployeeFoundForFeedbackName
Important: Make sure that there aren't any empty spaces in the field.
- In the Text field, enter I noticed that this person is not listed in the Directory. Please try with a different name.
- Click Create Entry.
You can see that a new key has been created in the resource bundle (on page 5).
Now we'll update the dialog flow to refer to this key.
- In the left navigation for the skill, click
.
- In the editor, navigate to the state
noEmployeeFoundForFeedbackName
(around line 1120). - Update the
prompt
value to point to new key you just created:>prompt: "${bundle('noEmployeeFoundForFeedbackName')}"
- Click the Validate button at the top of the page to ensure there are no issues in the code.
Test the Customization
Now that you have customized the message, verify it in the tester.
- Click the tester icon (
).
- In the tester, click Reset.
- Type I want to provide feedback for Norman Lewis.
- Click Get an access token.
After you are authenticated, you will be prompted with new customized error message.
- Close the tester.
You have successfully customized the error message in your extended HCM skill!
(Optional) Use Insights to Improve Utterance Quality
In this section, you'll use the Insights feature to identify user phrases that are not being correctly understood by the skill and then retrain the skill to handle them better.
Let's start by entering some phrases in the tester and noting the skill's response.
- Click the tester icon (
).
- In the Message field of the tester, enter I want to report my observation for Frank Pukta and press Enter.
- In the tester, click Reset.
- Now try the following phrase: I want to report my observation
- Click Get an access token.
- You should see this response:
Though the phrases you entered should correspond with the Anytime Feedback intent, the skill didn't seem to understand them.
- Close the tester.
- In the left navigation of the skill, click
and select the Retrainer tab.
You'll notice that the page initially displays utterances that have been matched with the
unresolvedIntent
intent and that the utterance "I want to report my observation for Frank Pukta" meets that criterion. - In the Add To dropdown, select Anytime Feedback and click Add Example.
This adds "I want to report my observation for Frank Pukta" to the example utterances for the Anytime Feedback intent.
- In the dropdown where unresolvedIntent is currently selected, select Directory and click Search.
In the search results, you should now see the "I want to report my observation".
- In the Add To dropdown, select Anytime Feedback and click Add Example.
- Retrain the model by clicking
and clicking Submit.
- Open the tester (
), enter Can I report an observation?, and press Enter.
You should now see a relevant response.
(Optional) Create a New Feature in the Skill
In this section, you will add a new feature where a user that is requesting to do goal management tasks is pointed directly to the web page where they can do that.
To implement this feature, you will create a new intent and modify the skill's dialog flow to manage the skill's response when a user's input matches to that intent.
Create the New Intent
- In the left navigation for the designer, select
.
- Click the + Intent button.
- In the Name field, type
Manage My Goals
. - In the Conversation Name field, click
and enter
Manage My Goals
. - Next to the Examples section, click Advanced input mode.
- Copy the following utterances, paste them into the Enter your example utterances here field, and click Create.
- Can you please redirect me to My Goals
- I want to view my goals and performance objectives
- Show me my goals
- I want to view my performance
- Can you show me my goals for this year
- What are my goals and performance objectives
You should see the examples inserted into the table.
These example utterances will help the skill resolve similarly-worded user requests to this intent.
Update the Dialog Flow
In this sub-section, you add logic in the dialog flow to respond to the user's request to manage goals.
- In the left navigation for the designer, click
to open the dialog flow editor.
- Scroll down to about line 247.
You should find yourself in a code block for a "System.Intent" component.
- Place right before the first letter of the line
unresolvedIntent: "unresolvedIntent
(after the white space) and press Enter. - In the code box below, click
to copy the code to your clipboard.
Manage My Goals: "manageMyGoals"
- Put your cursor at the very beginning of the empty line that you have just created and paste the code.
This screenshot illustrates where the code should be inserted:
Important: Make sure that you maintain the indentation. The
actions
line must be indented 6 spaces. The line that you inserted and the line below it must have indentation of 8 spaces. - In the code box below, click
to copy the code to your clipboard.
##################### Manage My Goals ######################################## manageMyGoals: component: "System.Output" properties: text: "You can create, update, and complete a goal via <a href='${system.config.da.FARestEndPoint}/hcmUI/faces/deeplink?objType=MY_GOALS&action=NONE'>My Goals</a> page." transitions: return: "done"
- Scroll to the very end of the dialog flow, create a new line, and place your cursor at the very beginning of that line.
- Paste the code that you have just copied.
Again, make sure that the indentation is preserved, starting with the
manageMyGoals:
line, which must be indented 2 spaces.
In the code that you just pasted, you can see that:
- A simple
System.Output
component is used to display the URL to which the user will go to manage goals. - The domain name for the URL is fetched from the custom parameter, the value of which you modified earlier.
Retrain the Model and Test the Feature
- Retrain the model by clicking
and clicking Submit.
- Open the tester (
), enter show me my goals and press Enter.
In the response, you should see a link to a web page that enables the logged-in user to manage performance goals.
Note: The tester doesn't render the URL as a link, but the chat widget in the HCM service does. You can verify this later in the lab once the skill has been finalized and deployed as part of the digital assistant to the HCM service.
Here's what the web page looks like:
(Optional) Add FAQs - Uploading Static Answer Text
Now let's add some FAQs to the skill with Oracle Digital Assistant's answer intent feature. You use answer intents for cases when a user request can be answered with static text and doesn't need further interaction with the skill.
We'll add a couple FAQs about how the company is responding to the Covid-19 pandemic.
- Download Intent-based-FAQ-Intents.zip to your machine.
- Extract the
Intent-based-FAQ-Intents.csv
file from the zip. - In the left navigation for the designer, select
.
- Click More and select Import Intents.
- Select the
Intent-based-FAQ-Intents.csv
file that you just extracted and select Open. - Click the Local button so that just the intents that have been added in the extended version of the skill are displayed.
You should see three new intents: HR Guidance, Critical Employees and Working from Home.
This what the HR Guidance intent looks like:
- Retrain the model by clicking
and clicking Submit.
- Click
.
- In the Message field of the dialog, type How is our company dealing with this pandemic and click Send.
You should see results similar to the following, thus confirming that the input resolved to the static intent:
Review Customizations in the Dialog Flow
Now that we have made all of the changes that we have planned in the dialog flow, it's time to validate the syntax, review the changes, and then accept or decline the customizations.
In previous sections, you made few important modifications to the base HCM dialog flow code. To finalize your work, you need to review the changes you made and, if appropriate, possibly revert some of them.
- In the left navigation for the skill, click
.
- At the top of the dialog flow, add a comment similar to the one shown below. (If you begin a line with the
#
, that line is treated as a comment.) - Click Review Customization.
This will open a standard code comparison editor for you to review the changes that you have made in the dialog flow.
You can revert some or all of the changes here.
- Click the arrow next to the comment that you just added to revert it.
- Scroll down to the
manageMyGoals
state that you added earlier and quickly review it.You'll keep this code, so don't make any changes.
- Click Apply and then Close.
(Optional) Rebase Your Extended skill
Rebasing is the process of automatically applying changes you have made in your extended skill to a new version of its base skill. You rebase when a new version of the base skill that you extended is released. This enables you to take advantage of updates to the base skill without having to manually reapply your extensions to the updated base skill.
In this case, we just extended version 20.04.08 of the Hcm skill, which was released a few months ago. But since then, a new version of the skill was released to fix a few issues and add some new features. By rebasing, you can automatically apply the changes that you already made to the previous version of the skill to the new base version.
Install the New Version of the Skill
Before you can rebase, you need to install the new version of the skill in your instance.
- Click
to open the side menu and then select Development > Store.
- In the Filter field, type Hcm to narrow down the list.
The most recent version of the Hcm skill will be shown.
- Click the tile for Hcm to open it.
- On the page for the skill, click Pull.
Rebase the Skill
- In the left navigation for your skill (the one with your customizations), select
and then select the General tab.
When a new version of the base skill is available, the Rebase button is enabled.
- Click the Rebase button.
A Rebase skill pop-up window will appear.
- Select the 20.07.10 version of the base skill as shown below and click Next.
- Review the dialog flow differences and click Next.
- In the Version field, enter
20.07.10.01
. - Finally, click Rebase to rebase your skill.
Once the rebase completes, you will see the updated base skill information on the General tab.
Note: At press time, due to a problem with the instance in this lab, the rebase sometimes fails with one of the following errors:
You can now have the latest version of the skill with your enhancements included!
Publish the Skill
Before you can make a skill available to your users, you need to publish it. To do so, you:
- On the top of the page for the extended skill, click
to open the menu for managing the skill, click the More button, and then select Publish.
- On the Publish Skills page, click Publish.
Once you have published the skill, the icon on the skill's tile changes to indicate that it is a published extended skill.
Update the Digital Assistant with the Extended HCM skill
You have extended both the digital assistant and the HCM skill. Now to you need to add the extended skill to the extended digital assistant.
Update the Digital Assistant
Note: Before you begin this section, make sure that you have published the extended skill. Otherwise, you will not be able to update the digital assistant to use that version of the skill.
- Click
to open the side menu and then select Development > Digital Assistants.
- In the Filter field type your initials and press Enter.
- Open your extended digital assistant.
- On the Skills page of the digital assistant, select the HCM skill.
- Click Update Skill.
- Under New Skill Version, find and select your extended skill.
- Select Update Skill.
You should see that your digital assistant has been updated with your extended skill.
Train and Test the Updated Digital Assistant
- Retrain the digital assistant by clicking
and clicking Submit.
- Open the tester (
), enter Hi and press Enter.
- Next enter Who are my directs.
- Next enter I want to update my goals for this year.
- Finally What is HR policy for corona virus epidemic?
Congratulations! You have successfully extended your HCM skill and associated it with your extended digital assistant!
(Optional) Integrate the Updated Skill in the HCM UI
In this section, we'll show how you use a web channel to make the updated digital assistant available in your HCM instance.
As you saw in the first part of this lab, the HCM instance that you are working with has a chat widget through which users can initiate a conversation with the HCM skill. The chat widget itself was set up and configured using HCM Experience Design Studio. And the widget is connected to the HCM skill through a web channel that was set up in the Digital Assistant instance before you began the lab.
Now we'll update the web channel in Digital Assistant to use the extended version of the skill.
If you are doing this lab on a shared instance, this section will be performed by instructor.
Update the Web Channel to the HCM UI
Now we'll update the channel that connects the HCM instance with the Digital Assistant instance so that it uses the extended version of the skill.
- In Oracle Digital Assistant, click
to open the side menu and then select Development > Channels.
- Locate the channel named ODA_HCM_WEB_CHANNEL and open it.
- In the Route To dropdown, select your copy of the skill (
<your_intials>_FADigitalAssistant
). - Click Change to confirm the changed channel routing.
After you click Change, the routing will be changed to your extended skill.
- Log in to the HCM UI with the following instance URL and credentials (or following instructions provided by the instructor).
- Instance URL: https://adc3-zshi-fa-ext.oracledemos.com/hcmUI/faces/FuseWelcome?fndThemeName=Vision_Redwood
- User name: robert.jackman
- Password: Provided by the instructor.
- Click on the widget on the bottom right of your screen to open the chat window.
- In the widget, test for the changes you made to the skill:
- Hi
- What are the HR guidelines for epidemic
You should get appropriate responses, thus confirming that your extended skill has been connected with the HCM instance:
(Optional) Configure the Digital Assistant Chat Widget in HCM
In this section, you will be configuring the Digital Assistant chat widget using HCM experience Design Studio. This section focuses on HCM experience design studio only. If you need to activate Digital Assistant in Oracle Cloud HCM, see Activate a Digital Assistant in Oracle Cloud HCM.
Pre-requisite: You need to sign-in as a user who is allowed to create a sandbox.
- Log in into your HCM instance.
- Click
to open the side menu, click Show More, scroll down to the Configuration section, and select Sandboxes.
- Click Create Sandbox.
- In the Name field, enter a name indicating that it's a sandbox for Digital Assistant integration.
- Select the HCM Experience Design Studio checkbox.
- Click Create and Enter.
- From the Tools dropdown at the top of the page, select HCM Experience Design Studio.
- From the left navigation, select Digital Assistant Configuration.
- If it isn't already pre-populated, fill in the Server URL of the ODA Instance field with the URL of your Digital Assistant instance.
It should look something like this:
idcs-oda-1234567890abcdef1234567890-t0.data.digitalassistant.oci.com
- In the Web Channel Id field, paste the ID that was generated when you created the web channel in Digital Assistant.
Important: Make sure there are no leading or trailing spaces in the pasted web channel ID.
- In the Features and Functionality Configuration section, select the Display time stamp checkbox.
- In the Custom Text section, set the value of the Set Placeholder text where user would type to
Type a message here
. - In the Layout section, set the Show the initial message on top or bottom property to
Bottom
. - Optionally, in the Custom Icons section, enter public URLs to specify custom icons for the logo and the bot.
- Click Save and Close.
- From the dropdown menu with the name of the sandbox (at the top of the page), select Publish.
- In the Publish Sandbox dialog, click OK.
- On the Sandbox Detail page, click Publish.
- If a Warning dialog appears, click Continue to Publish.
- Back on the Sandbox Detail page, click Done.
Want to Learn More?
This is the conclusion of the lab. If you want to learn more about how Digital Assistant works, you can explore the following topics: