Oracle by Example brandingOracle Digital Assistant - Extending FADigitalAssistant and the HCM Skill

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.

section 0Before 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.

section 1Test 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.

  1. 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.

    Screenshot showing the red widget
  2. Click on the widget to open the chat window.
  3. 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.

    Screnshot showing the chat window
  4. Navigate to the Hcm skill (not the HCM Knowledge) skill by clicking the arrow icon (Screenshot showing a card for the Approvals skill) on the right of the carousel three times.

    This is the card that you should see.

    A screenshot of the Hcm card in the chat window. It contains the greeting 'I am here to help. Here are some things you can do' followed by buttons for showing salary, payslip, and sick balance.

    Notice that it has three buttons that you can select from.

  5. Select show me my salary.

    You will be shown the user's salary details.

    Screenshot of the chat window with a response containing the user's salary details
  6. Next, type what is. Observe that as you type, you are shown auto-suggestions.
    Screenshot of the chat window showing the user input of 'what is' and auto-suggestions of 'change emergency contact' and 'what is my sick balance'
  7. Select what is my sick balance.
    Screenshot of the chat window showing an answer to 'what is my sick balance'

    The sick leave balance is shown along with the Schedule time off option.

  8. If you like, click Schedule time off.

    You will be redirected to another browser tab where the Absence web page will open.

    Screenshot of a web page for 'Add Absence'

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.

section 2Set 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:

  1. In Oracle Digital Assistant, click main menu icon to open the side menu and then select Development > Store.
  2. 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.

    Screenshot of the Oracle Digital Assistant. In the left navigation, 'Store' is selected. In the main content area, there is a tile for FADigitalassistant.
  3. In the tile for FADigitalAssistant, click the All Versions icon to show all of the versions of FADigitalAssistant that are available.
  4. Click the tile for FADigitalAssistant version 20.04.12 to open it.
    Screenshot showing tiles for 4 versions of FADigitalAssistant, including the tile for version 20.04.12
  5. On the page for FADigitalAssistant version 20.04.12, click Pull.
    Screenshot of the tile for version 20.04.12, including its Pull button
  6. In the confirmation dialog that appears, click Pull.
    Screenshot of the confirmation dialog.

    Once completed, you will be prompted with the list of items added to your digital assistant.

    Screenshot of a dialog showing the skills that have been added to the digital assistant, including skills that are already in the instance and skills that needed to be imported from the Skill Store.
  7. 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.

  1. Click main menu icon to open the side menu and then select Development > Digital Assistants.

    You should see an entry for FADigitalAssistant version 20.04.12.

    A screenshot of the Digital Assistants page, including a tile for FADigitalAssistant

  2. Click the tile for FADigitalAssistant version 20.04.12 to view the skills attached to this digital assistant.
    A screenshot of the Skills page for FADigitalAssistant, with a list of the skills that it contains, including Approvals, Expenses, Hcm, HCM Knowledge, and several others.

    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:

  1. In the list of the digital assistant's skills, select Hcm.
  2. Scroll down to the Parameters section of the page.

  3. 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.

  1. Click the Tester icon (the Skill Tester icon), which is located at the top of the page.
  2. 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.

  3. In the tester's Message field, type Hi, and click Enter.

    You should see the following response:

    A screenshot of the tester, as described in the following text.

    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.

  4. In the Message field of the chat window, type What is my salary and press Enter.
  5. Select Get an access token.

    This will redirect to another browser tab.

  6. 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.

  7. Return to the previous browser tab.

    You will get the reply as shown below:

    Screenshot of the tester, with the reply 'Sure! To get started please sign in:', followed by buttons for 'Get an access token' and 'Cancel', followed by the answer to the question 'what is my salary'.
  8. 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.

  9. Close the tester.

section 3Extend 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

  1. On the top of the page for the digital assistant, click the 'Click here to manage your digital assistant' icon to open the menu for managing the digital assistant, click the More button, and then select Extend.
    Screenshot showing the menu that appears after clicking the 'Click here to manage your digital assistant' icon. The menu contains the 'More' button.
  2. 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.

  3. Select the Open extended digital assistant checkbox.
  4. 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:

  1. In the list of skills on the left side of the pane, select the skill.
  2. 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.

Notice that all the skills except Hcm now are marked with the Customized icon 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.

  1. In the left navigation for the digital assistant, select the Settings icon and then select the Configurations tab.
    Screenshot showing FADigitalAssistant's Settings page, with the Configurations tab selected. In the main content area, there is a 'Routing Parameters' heading, followed by several parameter names and values.
  2. 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:
    Screenshot showing the 'Show Bot Help Prompt' parameter and its value 'Hi, I'm Acme Bot, your personal digital assistant! Here are some things you can do'
  3. Change the value of the Max Sample Utterance to 3.
    Screenshot showing the 'Max Sample Utterance' parameter and its value of 3.

    This affects the number of choices that are displayed for each skill under the help prompt.

  4. In the top navigation, click the Train icon button .
  5. In the Train dialog, leave Trainer Tm as the default, click Submit, and wait for the training to complete.
  6. 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.

    If you miss that message, you can confirm that the training has finished when the Train button has a checkmark next to it (The Train button with a check icon in it.).

  7. In the top navigation for the digital assistant, click the Skill Tester icon to open the tester.
  8. 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.)

    the Skill Tester icon

Now that your customizations are in place for FADigitalAssistant, it's time to move on to extending and customizing the HCM skill.

section 4Extend 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.

  1. Click main menu icon to open the side menu and then select Development > Skills.
  2. In the Filter field type Hcm and press Enter.

    You should see an entry for the most recent version of the Hcm skill.

    Screenshot of the Skills page, including a tile for the Hcm skill

    However, for purposes of this lab, we'll be working with an earlier version of the skill.

  3. To show all versions of the skill, click the All Versions icon in the Hcm tile.

    You should now see multiple versions of the skill. We'll be using version 20.04.08.

  4. In the tile for version 20.04.08 of the skill, click Options menu icon and select Extend.
    Screenshot showing the tile for version 20.04.08 of the skill with the Options menu open, and the Extend option selected.
  5. In the Create Extended Skill dialog, for Display Name, enter a name in the form <YOUR_INITIALS>_HCM_ExtendedSkill.
    Screenshot showing the Created Extended Skill dialog.

    For example, if your initials are "AB", enter AB_HCM_ExtendedSkill.

  6. Click Extend.

    The extended skill opens in the UI.

    Screenshot of the Intents page for the extended skill

    Notice that all the intents and utterance are marked with the Inherited icon 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.

  1. In the left navigation for the skill, select the Settings icon and then select the Configuration tab.
  2. Scroll down to the Custom Parameters section of the page.
  3. Select the da.FARestEndpoint row and click the Edit button above the table.
    Screenshot of the Custom Paramaters section of the Configuration tab. The da.FARestEndpoint entry is selected.
  4. 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.
    Screenshot of the Edit Parameter dialog, containing fields for Name, Display Name, Type, Value, and Description. The Name and Display Name fields are both set to 'https://adc3-zshi-fa-ext.oracledemos.com'. The Value field is set to  'https://adc3-zshi-fa-ext.oracledemos.com'.
  5. In the top navigation, click the Train icon button .
  6. 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.

If you miss that message, you can confirm that the training has finished when the Train button has a checkmark next to it (The Train button with a check icon in 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

  1. In the top navigation for your extended skill, click the Skill Tester icon to open the tester.
  2. In the Message field, enter Does YourLife offer discounts?

    This is what you should see:

    Screenshot of the skill tester showing the response 'I didn't quite get that. Try rephrasing your question, please.'

    The skill doesn't understand this request.

  3. 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.

  1. In the left navigation for the designer, select the Intents icon.
  2. Select the Benefits Coverage intent.
    Screenshot of the skill's Intents page with the Benefit Coverage intent selected.
  3. 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".

  4. In the Filter field, type YourLife, and press Enter.

    As you can see, none of the examples contain "YourLife".

    Screenshot of the Examples section of the Benefits Coverage intent. The text 'YourLife' is in the Filter field, and below that is the text 'There are no matching example utterances

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.

  1. Next to the Examples section, click Advanced input mode.
    Screenshot showing the Advanced input mode link within the Examples section of the page.
  2. 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.

    Screenshot showing the above utterances added to the list of utterances in the Examples section
  3. 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.

  1. Find the Train bot icon button in the top navigation and click it.
  2. Leave Trainer Tm as the default, click Submit, and then wait for the training to complete.
  3. Click the tester icon (the Skill Tester icon).
  4. In the tester, click Reset.
  5. In the Message field, enter Is my family included in YourLife program?.

    This is what you should see:

    Screenshot showing the response to the above message, which is a card containing the options 'Get an access token' and 'Cancel'
  6. Select Get an access token.

    Another browser tab should open with the text: "Authentication successful! You can return to the conversation."

  7. Return to the browser tab with your Digital Assistant instance.

    Now you should see a response regarding dependents covered under the various plans:

    Screenshot showing the tester containing the response, including coverage details for Medical, Dental, and Vision.

    The additional utterances to the Benefits Coverage intent in the training model have improved the accuracy of the skill's response.

  8. 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.

  1. In the left navigation for the designer, select the Entities icon.
  2. Click the Add Entity button to create a new entity.
  3. In the Name field, enter BenefitsInsuranceProvider.
  4. In the Configuration section, in the Type dropdown, select Value list.
  5. Click the Add Value button.
  6. For Value, type YourLife.
  7. Click Create.
  8. Click the Add Value button again.
  9. For Value, type SoundHealth.
  10. For Synonyms, type sound-health and click Create.
  11. Click the Add Value button again.
  12. For Value, type VisionHealthCare and click Create.

    This is how the Create Entity dialog should now look:

    Screenshot showing the Create Entity dialog. The Name field contains the value 'BenefitsInsuranceProvider'. The Type dropdown is set to 'Value List'. The values are 'YourLife', 'SoundHealth', and 'VisionHealthCare'. The 'SoundHealth' entry has the synonym 'sound-health'.
  13. Click Create to conclude creation of the entity.
  14. In the Filter field, type benefitsi to help you navigate back to the entity you just created.
    Screenshot showing the Entities tab of the skill. The 'BenefitsInsuranceProvider' entity is selected.

    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:

  1. In the left navigation for the designer, select the Intents icon.
  2. Select the Benefits Coverage intent.
  3. Click the Add Entity button.
  4. In the Filter field, type Benefits, and then select the BenefitsInsuranceProvider entity.
    Screenshot of the skill's Intents page with the Benefits Coverage intent selected. In the Intent Entities section of the page, there are entries BenefitsInsuranceProvider and Benefits.
  5. Retrain the model by clicking Train bot icon and clicking Submit.

Test the Entity

The Try It Out feature enables you to test whether the skill identifies entity values in user input.

  1. In the left navigation for the designer, select the Intents icon.
  2. Click screenshot of the Try It Out label.
  3. 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.

    a screenshot of the Try Out Intents/Q&A dialog. It shows the chat message 'Who is included in YourLife program?'. Below that is a table with the confidence scores for three intents. Benefits Coverage has a confidence score of 100%. Below that is a table that lists the BenefitsInsuranceProvider entity and the the value 'YourLife'.

    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.

  1. Click the tester icon (the Skill Tester icon).
  2. In the tester, click Reset.
  3. Type I want to provide feedback for Norman Lewis.
  4. 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."

    Screenshot of the tester showing the the error message 'Sorry, I can't find anyone with that name. Please enter a different name.'
  5. Close the tester.

Customize the Message

Let's modify that message.

  1. In the left navigation for the skill, click the Flows icon to open the dialog flow editor.
  2. In the editor, navigate to the state noEmployeeFoundForFeedbackName (around line 1117).

    Note that the error message you received is assigned to the prompt property.

    Screenshot showing  the state noEmployeeFoundForFeedbackName.

    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.

  3. In the left navigation for the skill, click the Resource Bundles icon.
  4. Click + Key.
  5. In the Key field, enter noEmployeeFoundForFeedbackName

    Important: Make sure that there aren't any empty spaces in the field.

  6. In the Text field, enter I noticed that this person is not listed in the Directory. Please try with a different name.
    Screenshot showing the Create Entry dialog with the key 'noEmployeeFoundForFeedbackName' and the value 'I noticed that this person is not listed in the Directory. Please try with a different name.'
  7. Click Create Entry.

    You can see that a new key has been created in the resource bundle (on page 5).

    Screenshot of the Resource Bundles page for the skill, as described above.

    Now we'll update the dialog flow to refer to this key.

  8. In the left navigation for the skill, click the Flows icon.
  9. In the editor, navigate to the state noEmployeeFoundForFeedbackName (around line 1120).
  10. Update the prompt value to point to new key you just created:
    >prompt: "${bundle('noEmployeeFoundForFeedbackName')}"
    Screenshot of the Dialog Flow editor showing the value of the 'prompt' property as described in the above text.
  11. 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.

  1. Click the tester icon (the Skill Tester icon).
  2. In the tester, click Reset.
  3. Type I want to provide feedback for Norman Lewis.
  4. Click Get an access token.

    After you are authenticated, you will be prompted with new customized error message.

    Screenshot of the tester showing the response 'I noticed that this person is not listed in the Directory. Please try with a different name.'
  5. 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.

  1. Click the tester icon (the Skill Tester icon).
  2. In the Message field of the tester, enter I want to report my observation for Frank Pukta and press Enter.
    Screenshot of the tester showing the above message and the response 'I didn't quite get that. Try rephrasing your question, please.'
  3. In the tester, click Reset.
  4. Now try the following phrase: I want to report my observation
  5. Click Get an access token.

  6. You should see this response:
    Screenshot of the tester with the above message and the response 'Sorry, I didn't get that. These are the details I can provide. Select what you want to see', followed by buttons for Email, Title, Manager, and Nickname.

    Though the phrases you entered should correspond with the Anytime Feedback intent, the skill didn't seem to understand them.

  7. Close the tester.
  8. In the left navigation of the skill, click Insights icon 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.

    Screenshot showing the Retrainer tab of the skill's Insights page, as described in the above text.
  9. In the Add To dropdown, select Anytime Feedback and click Add Example.
    Screenshot showing the Retrainer tab of the skill's Insights page, showing the selection of 'Anytime Feedback' from the Add To dropdown and the clicking of 'Add Example'.

    This adds "I want to report my observation for Frank Pukta" to the example utterances for the Anytime Feedback intent.

  10. In the dropdown where unresolvedIntent is currently selected, select Directory and click Search.
    Screenshot showing three closed dropdowns with displayed values of Intent, Matches, and Directory. Below that are buttons for + Criteria and Search.

    In the search results, you should now see the "I want to report my observation".

  11. In the Add To dropdown, select Anytime Feedback and click Add Example.
  12. Retrain the model by clicking Train bot icon and clicking Submit.
  13. Open the tester (the Skill Tester icon), enter Can I report an observation?, and press Enter.

    You should now see a relevant response.

    Screenshot of the tester showing the response 'Who do you want to provide feedback for?

(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

  1. In the left navigation for the designer, select the Intents icon.
  2. Click the + Intent button.
  3. In the Name field, type Manage My Goals.
  4. In the Conversation Name field, click the Edit icon and enter Manage My Goals.
  5. Next to the Examples section, click Advanced input mode.
    Screenshot showing the Advanced input mode link within the Examples section of the page.
  6. 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.

    Screenshot of the skill's Intents page with the Manage My Goals intent selected and the above utterances showing in the Examples section of the page.

    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.

  1. In the left navigation for the designer, click the Flows icon to open the dialog flow editor.
  2. Scroll down to about line 247.

    You should find yourself in a code block for a "System.Intent" component.

  3. Place right before the first letter of the line unresolvedIntent: "unresolvedIntent (after the white space) and press Enter.
  4. In the code box below, click Copy icon to copy the code to your clipboard.
            Manage My Goals: "manageMyGoals"
  5. 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:

    Screenshot of the dialog flow. The inserted line appears below the 'actions:' line and above the 'unresolvedIntent' line. It has the same indentation as the 'unresolvedIntent' line.

    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.

  6. In the code box below, click Copy icon 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"
    
  7. Scroll to the very end of the dialog flow, create a new line, and place your cursor at the very beginning of that line.
  8. Paste the code that you have just copied.
    Screenshot of the dialog flow containing the pasted text. The pasted text appears right below a line for a return transition.

    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

  1. Retrain the model by clicking Train bot icon and clicking Submit.
  2. Open the tester (the Skill Tester icon), 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.

    Screenshot of the tester showing a response with the code for a link to a web page.

    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:

    Screenshot of a web page that shows goals for Robert Jackman that are filtered by the Review Period and Goal Plan dropdowns.

(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.

  1. Download Intent-based-FAQ-Intents.zip to your machine.
  2. Extract the Intent-based-FAQ-Intents.csv file from the zip.
  3. In the left navigation for the designer, select the Intents icon.
  4. Click More and select Import Intents.
    Screenshot of the part of the skill's Intents page which contains the 'More' menu. The menu is opened and 'Import Intents' is selected.
  5. Select the Intent-based-FAQ-Intents.csv file that you just extracted and select Open.
  6. 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.

    Screenshot of the skill's Intents page with the Local filter selected. The above-mentioned new intents are displayed as well as the Manage My Goals intent.

    This what the HR Guidance intent looks like:

    Screenshot of the skill's Intents page with the HR Guidance intent displayed.
  7. Retrain the model by clicking Train bot icon and clicking Submit.
  8. Click screenshot of the Try It Out label.
  9. 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:

    Screenshot showing the Intent Tester with the above input. Results are displayed for the HR Guidance (100% confidence), Absence Balances (0%) and Anytime Feedback (0%).

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.

  1. In the left navigation for the skill, click the Flows icon.
  2. 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.)
    A screenshot of the first 5 lines of the dialog flow, the first three lines of which are a comment. The first line contains the '#' character. The second line contains the # character plus 'RDH HCM Extended Skill' The third line contains just the '#' character.
  3. Click Review Customization.
    Screenshot of the top part of the Dialog Flow page, showing the + Components and Review Customization buttons.

    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.

  4. Click the arrow next to the comment that you just added to revert it.
    Screenshot of the Review Customizations page. The left side is labeled 'Current Dialog Flow' and the right side is labeled 'Original Dialog Flow'. The left side contains the 3-line comment added earlier. Next to those three lines is an arrow that you can click to revert the changes.
  5. Scroll down to the manageMyGoals state that you added earlier and quickly review it.
    Screenshot of the Review Customizations page. In the left side there is code for the manageMyGoals state.

    You'll keep this code, so don't make any changes.

  6. 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.

  1. Click main menu icon to open the side menu and then select Development > Store.
  2. In the Filter field, type Hcm to narrow down the list.

    The most recent version of the Hcm skill will be shown.

  3. Click the tile for Hcm to open it.
  4. On the page for the skill, click Pull.

Rebase the Skill

  1. In the left navigation for your skill (the one with your customizations), select the Settings icon and then select the General tab.

    When a new version of the base skill is available, the Rebase button is enabled.

    Screenshot of the skill's Settings page with the General tab selected. On the tab are several properties such as Base Skill, Display Name, etc. and the Rebase button.
  2. Click the Rebase button.

    A Rebase skill pop-up window will appear.

  3. Select the 20.07.10 version of the base skill as shown below and click Next.
    Screenshot of the Rebase Skill dialog. The Base Skill dropdown is open and version 20.07.10 is selected.
  4. Review the dialog flow differences and click Next.
    Screenshot of the Rebase Skill dialog that shows dialog flow differences between the base and extended versionss of the skill.
  5. In the Version field, enter 20.07.10.01.
  6. Finally, click Rebase to rebase your skill.
    Screenshot of the Rebase Skill dialog that contains a value of 20.07.10.01 for the version and a Rebase button.

    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:

    A screenshot with the error message 'An internal error occurred for the requested skill. Try again later.'
    A screenshot with the error message 'There was an unexpected error processing the request. Please contact Oracle Support Services.

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:

  1. On the top of the page for the extended skill, click the 'Click here to manage your digital assistant' icon to open the menu for managing the skill, click the More button, and then select Publish.
    Screenshot showing the 'Click here to manage your digital assistant' icon selected, which displays a menu, from which the More menu is displayed, from which the menu item Publish is selected.
  2. 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.

    Screenshot showing the tile for an HCM skill. In the upper right part of the tile is an icon, the alt text of which is 'Published: Skill bot is read-only'

section 5Update 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.

  1. Click main menu icon to open the side menu and then select Development > Digital Assistants.
  2. In the Filter field type your initials and press Enter.
  3. Open your extended digital assistant.
  4. On the Skills page of the digital assistant, select the HCM skill.
  5. Click Update Skill.
    Screenshot showing the digital assistant's Skills page. The Hcm skill selected and the Update Skill button is activated.
  6. Under New Skill Version, find and select your extended skill.
    Screenshot of the Update Skill dialog. Within the dialog, the New Skill Version dropdown is open and it displays the extended skill.
  7. Select Update Skill.
    Screenshot of the Update Skill dialog. The New Skill Version field's value is the extended skill.

    You should see that your digital assistant has been updated with your extended skill.

    Screenshot of the digital assistant's Skills page. Among the skills listed is the extended version that you created of the Hcm skill.

Train and Test the Updated Digital Assistant

  1. Retrain the digital assistant by clicking Train bot icon and clicking Submit.
  2. Open the tester (the Skill Tester icon), enter Hi and press Enter.
    Screenshot of the tester as it appears after the user enters 'Hi'>
  3. Next enter Who are my directs.
    Screenshot of the tester containing the answer to the previous input, which consists of 5 team members, including Andy Belmont, Brian Joseph, etc.
  4. Next enter I want to update my goals for this year.
  5. Finally What is HR policy for corona virus epidemic?
    Screenshot of the tester with an answer to the above questions.

Congratulations! You have successfully extended your HCM skill and associated it with your extended digital assistant!


section 6(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.

  1. In Oracle Digital Assistant, click main menu icon to open the side menu and then select Development > Channels.
  2. Locate the channel named ODA_HCM_WEB_CHANNEL and open it.
    Screenshot of the Users tab of the Channels page in Oracle Digital Assistant. The ODA_HCM_WEB_CHANNEL channel is selected.
  3. In the Route To dropdown, select your copy of the skill (<your_intials>_FADigitalAssistant).
    Screenshot showing the Route To dropdown opened and displaying an extended digital assistant.
  4. Click Change to confirm the changed channel routing.
    Screenshot of the Change Channel Routing dialog, which contains a message asking you to confirm the change.

    After you click Change, the routing will be changed to your extended skill.

    Screenshot of the Channels page, with the value of the Route To field being an extended skill.
  5. Log in to the HCM UI with the following instance URL and credentials (or following instructions provided by the instructor).
  6. Click on the widget on the bottom right of your screen to open the chat window.
  7. 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:


section 7(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.

  1. Log in into your HCM instance.
  2. Click main menu icon to open the side menu, click Show More, scroll down to the Configuration section, and select Sandboxes.
    Screenshot of the Configuration section of the menu in HCM, including the menu item Sandboxes.
  3. Click Create Sandbox.
    Screenshot of the Sandboxes page, including a button for Create Sandbox.
  4. In the Name field, enter a name indicating that it's a sandbox for Digital Assistant integration.
  5. Select the HCM Experience Design Studio checkbox.
    Screenshot of the Sandbox Detail section of the Create Sandbox page, which includes a checkbox for HCM Experience Design Studio
  6. Click Create and Enter.
    Screenshot of the Create Sandbox page, which includes the Create and Enter button.
  7. From the Tools dropdown at the top of the page, select HCM Experience Design Studio.
  8. From the left navigation, select Digital Assistant Configuration.
    Screenshot of HCM Experience Design Studio. The left navigation contains a few items, including one for Digital Assistant Configuration, which is selected.
  9. 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

  10. 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.

  11. In the Features and Functionality Configuration section, select the Display time stamp checkbox.
  12. In the Custom Text section, set the value of the Set Placeholder text where user would type to Type a message here.
  13. In the Layout section, set the Show the initial message on top or bottom property to Bottom.
  14. Optionally, in the Custom Icons section, enter public URLs to specify custom icons for the logo and the bot.
    Screenshot of the Custom Icons section of HCM Experience Design Studio, where you can set icons for Ask Button, Logo, and Bot, among other things.
  15. Click Save and Close.
  16. From the dropdown menu with the name of the sandbox (at the top of the page), select Publish.
  17. In the Publish Sandbox dialog, click OK.
  18. On the Sandbox Detail page, click Publish.
  19. If a Warning dialog appears, click Continue to Publish.
  20. Back on the Sandbox Detail page, click Done.

more informationWant 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: