Creating a skill flow to onboard new hires

Create a skill flow to combine a custom skill and prebuilt skills to email new hires with a content based on their role. In this tutorial, learn how to connect to the Sample employee, Dropbox, and Microsoft Outlook apps, add skills from them to your personal skill set, and create the skill flow with these skills.

Before you begin

Before you start this tutorial, you must provide the following resources:

Click the following buttons to download the OpenAPI (JSON and YAML formats) developed for this tutorial:

Connect to apps and add their skills to the personal skill set

The first step is to connect to the Sample employee, Dropbox, and Microsoft Outlook apps and add their skills to the personal skill set.

Sample employee

  1. On the watsonx Orchestrate home page, click Add skills from the catalog.
  2. Search for the Sample employee app.
    1. Click the Search apps field.
    2. Type Sample employee and press Enter.
  3. Select the Sample employee tile.
  4. Click the Connect app button.
  5. You can type any API key, for example, type employee123.
  6. Click the Connect app button.
  7. In the Retrieve employees skill tile, click Add skill +.

The process to connect to the Sample employee app, and add the Retrieve employees skill to the skill set.
Figure 1. The process to connect to the Sample employee app, and add the Retrieve employees skill to the skill set.

Quick checkpoint! The icon A green check icon appears to show that the app is connected. indicates that the connection was successfully established. Now, it's time to connect to the Dropbox app and add the Download the content of a file skill to the personal skill set.

Dropbox

  1. On the watsonx Orchestrate home page, click Add skills from the catalog.
  2. Search for the Dropbox app.
    1. Click the Search apps field.
    2. Type Dropbox and press Enter.
  3. Select the Dropbox tile.
  4. Click the Connect app button.
  5. You are redirected to the Dropbox webpage to log in and give watsonx Orchestrate permission to connect to your Dropbox account.
    1. Enter the email of your Dropbox account.
    2. Click Continue.
    3. Enter the password of your Dropbox account.
    4. Click Log in.
    5. On the warning page, click Continue.
    6. On the permissions page, click Allow.
  6. In the Download the content of a file skill tile, click Add skill +.

The process to connect to the Dropbox app, and add the Download the content of a file skill to the skill set.
Figure 2. The process to connect to the Dropbox app, and add the Download the content of a file skill to the skill set.

Quick checkpoint! The icon A green check icon appears to show that the app is connected. indicates that the connection was successfully established. Now, it's time to connect to the Microsoft Outlook app and add the Send an email using Microsoft Outlook skill to the personal skill set.

Microsoft Outlook

  1. On the watsonx Orchestrate home page, click Add skills from the catalog.
  2. Search for the Microsoft Outlook app.
    1. Click the Search apps field.
    2. Type Microsoft Outlook and press Enter.
  3. Select the Microsoft Outlook tile.
  4. Click the Connect app button.
  5. Select the email type according to your account permissions:
    1. If you don't have admin permission in your email account, select the Non-admin user option.
    2. If you have admin permissions in your email account, select the Admin user option.
  6. Click the Connect app button.
  7. You are redirected to the Microsoft Outlook webpage to log in and give watsonx Orchestrate permission to connect to your Microsoft Outlook account.
    1. Enter your email address.
    2. Click Next.
    3. Enter the password of your account.
    4. Click Sign in.
  8. In the Send an email using Outlook skill tile, click Add skill +.
Quick checkpoint! The icon A green check icon appears to show that the app is connected. indicates that the connection was successfully established. With these apps and their skills in your personal skill set, you can go ahead and create the skill flow.

Create the skill flow

The second step is to create the skill flow. In this skill flow, you combine the skills from the Sample employee, Dropbox, and Microsoft Outlook apps:

  1. From the main menu menu, select Skill studio.
  2. Click Create skill, and select Skill Flow.
  3. Click the edit icon Edit skill details to name and describe your skill flow:
    • In the Name field, enter Send onboarding content over email.
    • In the Description field, enter Send a content over email to onboard new hires.
    • Click Save.
  4. Click the add icon Add-alt to add a skill to your flow.
  5. Search for the Sample employee app and click its tile.
  6. In the Retrieve employees skill tile, click Add skill +.
  7. Click the add icon Add-alt to add the next skill to the flow.
  8. Search for the Dropbox app and click its tile.
  9. In the Download the content of a file skill tile, click Add skill +.
  10. Click the add icon Add-alt to add the next skill to the flow.
  11. Search for the Microsoft Outlook app and click its tile.
  12. In the Send an email using Outlook skill tile, click Add skill +.

The following image illustrates how the skill flow looks like.

The skill flow with the Retrieve employees, Download the content of a file, and Send an email using Outlook skills added.
Figure 3. The skill flow with the Retrieve employees, Download the content of a file, and Send an email using Outlook skills added.

Quick checkpoint! Now that you have the Retrieve employees, Download the content of a file, and Send an email using Outlook skills in your flow, you can go ahead and set the values that these skills must receive as inputs when you use the skill flow.

Set input values

After you add the skills to your flow, you must define which values these skills must receive as input values.

First, set the input value to the Download the content of a file skill, which must receive the path to the file to send to an employee. The path is based on the employee's role that comes from the Retrieve employees skill, for example, "/${role}.txt".

  1. From the skill flow, click the Download the content of a file skill tile.
  2. In the path input field, click the Specify default value icon Specify a default value icon.
  3. Click Insert variables icon.
  4. Click Retrieve employees, scroll down, and click role.
  5. Enter .txt after the variable.

The following image illustrates how the mapping for the Download the content of a file skill looks like.

The process of mapping values to the input field of the Download the content of a file skill.
Figure 4. The process of mapping values to the input field of the Download the content of a file skill.

Next, set the input values for the Send an email using Outlook skill. This skill must define the email body as the content from the Download the content of a file skill, and the email address from the Retrieve employees skill:

  1. Click the Send an email using Outlook skill tile.

  2. In the body.Content input field, click Download the content of a file, scroll down and click fileContent.

  3. In the To input field, click Retrieve employees, scroll down and click email.

    The process of mapping values to the input fields of the Send an email using Outlook skill.
    Figure 5. The process of mapping values to the input fields of the Send an email using Outlook skill.

  4. Click Actions > Save as draft to save the skill flow.

Quick checkpoint! You get the message Skill flow saved successfully when you save the skill flow as a draft.

Enhance and publish the skill flow

The last step is to enhance the skill flow to generate the phrases to trigger it in the chat:

Note:Phrase generation is a feature for SaaS deployment only.
  1. From the Skill studio > Skills and apps > Create a Flow page, click Actions > Enhance.
  2. On the enhance page, click the Phrases tab.
  3. Click the Enter new train phrase field, enter Send onboarding content over email, and press enter.
  4. Another field is loaded and you can add as many phrases as you want.
  5. Click the Enter new train phrase field again, enter Onboard new hires, and press enter.
  6. Click Publish to finish.

Results

The skill flow is available in the Skill and apps page. In the Skills list, you can see the Send onboarding content over email skill flow with the Published status.

The Send onboarding content over email skill flow is published and available to be add to the skill set.
Figure 6. The Send onboarding content over email skill flow published and available to be add to the skill set.

What to do next

Now that you learned how to connect to the Sample employee, Dropbox, and Microsoft Outlook apps, add skills from them to your personal skill set, and create the skill flow with these skills, you can use this skill flow. For more information, see the "Add the skill flow to the personal skill set" and "Use the skill flow" topics in the "Using the skill flow to onboard new hires" tutorial.