Actions in Journeys
Learn about actions in journeys and how they determine the assistant's behavior through functions, intents, and messages.
Actions in Journeys
Actions define how a journey progresses by executing specific operations when triggered. They determine the assistant's behavior and response flow, allowing it to process user input, fetch data, and provide relevant responses.
Actions are the building blocks of a journey, enabling automation, decision-making, and interaction handling.
Types of Actions
There are three primary types of actions in journeys:
1. Functions
Functions allow the assistant to execute logic or retrieve external data within a journey. These can be used to fetch product information, verify user details, or trigger business operations.
Types of Functions:
- Connection Functions – Predefined functions that are imported from journey templates and interact with external services.
- Custom Functions – User-defined JavaScript functions that allow for custom logic and API calls.
When to Use:
- To retrieve external data (e.g., fetch order status, sync with third-party APIs).
- To process user input dynamically.
- To execute calculations or custom business logic.
2. Intents
Intents define what the user wants to do and serve as triggers for journey flows. They ensure that the assistant understands user messages and responds accordingly.
Each intent consists of:
- A description – Summarizes what the intent captures.
- Utterances – Sample phrases that users might say to trigger the intent.
When to Use:
- To initiate specific journeys based on user input.
- To improve user intent recognition and response accuracy.
- To customize conversation flows for different queries.
3. Messages
Messages define the responses displayed to the user at different points in a journey. These messages provide clarifications, confirmations, or instructions.
When to Use:
- To confirm an action has been completed.
- To provide static responses to guide users.
- To display important information during the journey.
How Actions Work in Journeys
1. Adding an Action
Actions can be added directly within the Journey Builder:
- Open a journey in the Journey Builder.
- Click on the action type (Function, Intent, or Message).
- Select or create the action.
- Configure any necessary inputs, descriptions, or conditions.
- Save the journey.
2. Configuring Actions
- For Functions – Define arguments, select API endpoints, or write JavaScript logic.
- For Intents – Adjust descriptions and utterances for better recognition.
- For Messages – Edit message text to ensure clear communication.
3. Testing Actions
- Run test cases within the journey builder to verify how actions respond.
- Modify settings as needed to improve accuracy and flow.
- Ensure that functions return expected results and that intents trigger correctly.
Summary
Action Type | Purpose | Usage |
---|---|---|
Functions | Execute logic, retrieve external data, and process information. | Fetching product details, verifying users, API calls. |
Intents | Recognize user input and trigger journey flows. | Starting a journey when a user asks a question. |
Messages | Display responses and guide users through interactions. | Confirming an action, providing instructions. |
Actions allow journeys to adapt, automate, and enhance the assistant's interactions with users. By combining functions, intents, and messages, you can build powerful workflows that provide seamless, intelligent responses.