Overview
Actions allow your AI agent to perform specific, predefined tasks during a conversation.Each action includes a name, display name, execution text, and optional parameters to make the execution dynamic. You can create actions to:
- Trigger workflows or automations.
- Call external APIs.
- Send structured responses to users.
- Execute commands with dynamic inputs.
Creating an Action
- Navigate to AI Agent → Actions in the CometChat dashboard.
- Click Create Action.
Display Name
A human-friendly name shown in the UI.Example:
Create Support Ticket
Execution Text
The text prompt shown to the AI when this action is triggered.Example:
Create a Zendesk ticket with the following details.
Name
A unique identifier for the action. This is used programmatically and should not contain spaces.Example:
create_support_ticket
Description
A short explanation of what the action does.Example:
Creates a support ticket in Zendesk based on user query details.
Parameters
A JSON schema that defines what input values the action requires. Important: The"<parameterName>"
must exactly match the Tool Name you created in AI Agent → Tools.This ensures that the Action can send correctly formatted data to the intended Tool. Example:
string
, number
, boolean
, object
, or array
.
Parameter Descriptions: Clearly explain the purpose and expected format of each parameter.
Example Action: Create Zendesk Ticket
Field | Value |
---|---|
Display Name | Create Support Ticket |
Execution Text | Create a Zendesk ticket with the provided details. |
Name | create_support_ticket |
Description | Creates a support ticket in Zendesk for user issues. |
Parameters | See JSON example above |
Best Practices
- Keep display names short and clear – instantly understandable to end users.
- Use consistent naming – for the
Name
field, use lowercase with underscores. - Match parameter names to tool names – ensures correct tool invocation.
- Validate parameters – always define parameter types and descriptions to prevent AI misinterpretation.
- Document purpose – add clear descriptions for developers integrating the action.