Example: Adding an API skill
This example is to create a skill that allows you to ask Coleman Digital Assistant to search for a specific skill rather than browsing through a list of skills.
- Select User Menu > Coleman Digital Assistant.
- Click Add Skill.
-
Specify the basic information:
- Skill ID
- Specify SkillSearch.
- Name
- Specify Skill Search.
- Description
- Optionally, specify This skill accepts a search term and searches across Coleman Digital Assistant skills.
- Language
- Select English.
- Click Next. Select API in the Fulfillment Type field.
-
Specify this information:
- API Suite
- Select Coleman.
- Product
- Select Infor Coleman Digital Assistant.
- Select API
- Select viewSkill. You can use the search bar to locate the API.
- Path
- This field is defined based on the API selected. This value is displayed: coleman/cskconfigsvc/api/v1/skills/{skillGuid}.
- Method Type
- This field is defined based on the API selected.
- Parameters
- This field is defined based on the API selected. This value is displayed: GET.
- Request Body
- This field is defined based on the API selected.
- Response Body
- This field is defined based on the API selected.
-
Click Next. Specify this information for these requirements.
-
Specify this information:
- Name
- Specify searchTerm.
- Type
- Select String.
- Prompt
- Specify the question to present to the user for the requirement information. For example, specify What skill are you looking for?.
-
Specify this information:
- Name
- Specify skillSelection.
- Type
- Select Dynamic.
- Prompt
- Specify I found a few skills like that. Which one would you like?.
-
Specify this information:
-
Specify Requirement Fulfillment for
the searchTerm requirement.
- Click the coq wheel for the searchTerm requirement.
- Click Response.
-
Confirm that these variables are listed:
Variable Name JSON Path skillINames $.data.skillInfoResponse[*].name skillGuids $.data.skillInfoResponse[*].skillGuid skillGuid $.data.skillInfoResponse[0].skillGuid skillName $.data.skillInfoResponse[0].name -
Specify these Response
Conditions. Scroll down the Requirement
Fulfillment page.
- Variable
- Select HTTP Status Code.
- Operator
- Select Not Equals.
- Value
- Select 200-OK.
- Action
- Select Stop Skill and specify I'm sorry. I failed to find details on that skill.
-
Specify these Response
Conditions. Scroll down the Requirement
Fulfillment page.
- Variable
- Select skillNames.
- Operator
- Select Size Greater Than.
- Value
- Select 1.
- Action
- Select Elicit Requirement for the skillSelection requirement. Specify I found a few skills like that. Which one would you like?.
- Title
- Specify {skillNames}.
- Value
- Specify {skillGuids}.
-
Specify these Response
Conditions. Scroll down the Requirement
Fulfillment page.
- Variable
- Select skillNames.
- Operator
- Select Size Less Than.
- Value
- Select 1.
- Action
- Select Repeat Prompt. Specify the response: I'm sorry. I couldn't find a skill with {searchTerm} in it. Please try a different search.
-
Specify Requirement Fulfillment for
the searchTerm requirement.
- Click the cog wheel for the searchTerm requirement.
- Click Response.
-
Confirm that these update variables are listed:
Variable Name Custom Path skillGuid {skillSelection.value} skillName {skillSelection}
-
Click Next. Define a set of utterances that start the skill when
asked by the user. Specify each phrase.
- Find a skill.
- What skills can I invoke?
- Pick a skill.
- What can I do?
-
Click Next. Define a Response
Variable. These fields are defined based on the API selected.
Specify this variable and the JSON path:
- Variable Name
- Specify skillUtterance.
- JSON Path
- Specify $.data.skillUtteranceList[0].
-
Specify these Response
Conditions.
To add a condition, specify the condition and click the plus icon at the end of the line.
Response conditions use sequential logic. Each logic block is evaluated in order and responds based on the first condition that applies. Drag and drop on the left-hand side or use the arrows on the right-hand side to adjust the order of your response conditions.
-
Specify this information:
- Variable
- Select HTTP Status Code.
- Operator
- Select Not Equals.
- Value
- Select 200-OK.
- Action
- Select Message.
- Response
- Specify I'm sorry. I failed to find the skill you're looking for.
-
Specify this information:
- Variable
- Select skillUtterance.
- Operator
- Select Not Equals.
- Value
- Leave this field blank.
- Action
- Select Message.
- Response
- Specify You can invoke {skillName} by saying "{skillUtterance}".
-
Specify this information for a Default Response:
- Action
- Select Message.
- Response
- Specify I'm sorry. I could not find your skill.
-
Specify this information:
- Click Next. Review the skill on the summary page in the text view or flow view.
-
Click Save.
You can now converse with Coleman Digital Assistant to look up a specific skill.
Related topics