Now that you have knowledge on incorporating actions into your assistant by using templates, determining the sequence of steps in an action, and by using debug mode to fix any issues, you can begin developing your own actions. Remember, actions are considered the foundation of the build process in IBM watsonx Assistant. They represent the issues or tasks that your customers would like your assistant to address, and encompass the entire interaction between a customer and your assistant for a particular inquiry or request.
This tutorial details an approachable introduction to the action editor within watsonx Assistant by building a basic action that provides a unique response depending on one of two options selected.
If this is your first time building an assistant in watsonx Assistant, following these steps helps build familiarity with some of the most common behaviors that conversation builders repeat in watsonx Assistant when building virtual assistants. Try following these steps for your assistant's specific use case to result in a small action that you can build upon in the future.
Note that this tutorial is a part of a learning path for beginners. More in-depth information on building actions with templates can be found on the watsonx Assistant documentation pages.
To see the process, you can watch the following short video.
Prerequisites
To follow this tutorial, you need:
- An IBM Cloud account
- Access to any watsonx Assistant instance on a Lite, Plus Trial, Plus, or Enterprise plan
- Access to any assistant
- An understanding of the watsonx Assistant user interface
- A basic understanding of how the sequence of steps is determined within an action through the condition builder (covered in Build watsonx Assistant conversation content with templates)
Estimated time
It should take you approximately 15 minutes to complete the tutorial.
Steps
-
Within watsonx Assistant, navigate to the actions (a) Created by you tab (b), and click New action + (c).

-
Select Start from scratch to build an action for your own use case.

-
The New action window appears. Enter any phrase that your customer might say to start the interaction (a). Click Save (b).

Note: At first, only a single instance of a typical user input is required to initiate the action. Additional examples of user input can be included later.
-
The action editor appears with the first step selected. Enter a response for your assistant to reply with when the action starts (a). Click Save (b), then click Preview (c).

-
When your assistant is finished training, enter the phrase that the customer starts with into the preview chat to begin the action (a). The assistant responds with the response that you entered for the first step.

This conversation logic is an example of a simple question and answer flow. This is the quickest way to train your assistant on new topic coverage. However, there are a few best practices to follow to ensure that your assistant provides a polished customer experience. The first of which is to practice adding clarification steps at the start of the action. Click New step + (b).
-
After the new step appears on the left side of the screen, drag it above the first step. The blank Step 2 becomes Step 1, while Step 1 and its responses move to Step 2.

-
Within the Assistant says of the newly created Step 1, ask a clarifying question that helps the user to be better qualified for the response in Step 2 (a). Then, select Define customer response (b), and select Options (c).

-
In the Edit response window, enter the options that your user can select from (a, b). Click Apply (c), then close the Edit response window (d).

-
Back in the action editor, notice how Step 1 now has the options added. Let's help watsonx Assistant understand which step to go to when one of the options is selected. Click Step 2 (a) in the Conversation steps list because Step 2 has the appropriate response for one of the options. Then, update Step 2 to be taken with conditions (b, c). Next, ensure that the condition is set to the appropriate option from Step 1 (d). Finally, update the And then section to End the action (e). Now that Step 2 is set up for one of the response options from Step 1, add a new step for the other option (f).

-
Drag the new step down to become Step 3 (a). Set Step 3 to be taken with conditions (b, c). Ensure that the condition is set to the other option from Step 1 (d). Then, enter an appropriate response for the other option within the Assistant says section (e). Finally, update the And then section to End the action (f).

-
Open and refresh (a) the Preview to test out your assistant's new action (b). Try out both options.

Tip: Try providing information about one of the options in the first prompt and watch watsonx Assistant skip to the right step without asking the clarifying question.

Summary
This example of creating an action without a template is only scratching the surface of the types of conversations that you can build by using actions. Aside from Options, there are many other types of customer responses available to explore. Within And then there are near-endless possibilities of where your assistant can be directed, from pointing to other actions or repeating previous steps, to finding an answer through Watson Discovery and NeuralSeek — or even connecting the user to a live agent.
There are many best practices to eventually consider when it comes to building efficient conversational flows, such as adding more user examples within the Customer starts with section and using session variables. As a beginner, continue learning about the rest of watsonx Assistant's functions before returning to begin honing a proficiency in actions.
Any questions? Reach out to Alexander Dfouni.