Create CX Agent
Action ID: create_cx_agent
Description
Create a CX agent.
Input Parameters
access_token
string
✓
-
The access token to use to create the agent
workspace_id
string
✓
-
The ID of the workspace to create the agent in
agent_name
string
✓
-
The name of the agent to create
data
object
✓
-
The data to create the agent with
string
✓
-
The email address to send notifications when the agent is created
Output Parameters
data
object
The data of the agent created
How It Works
This node creates a new CX (Customer Experience) agent within a specified workspace. It authenticates using the provided access token, then submits a request to create an agent with the specified name and configuration data. Upon successful creation, the system sends a notification email to the provided address and returns the agent's data including its ID, configuration, and status. This allows for programmatic agent provisioning in customer service automation workflows.
Usage Examples
Example 1: Basic Customer Service Agent
Input:
access_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
workspace_id: "ws_12345"
agent_name: "Support Bot Alpha"
data: {
"description": "Customer support agent for product inquiries",
"language": "en",
"timezone": "America/New_York"
}
email: "[email protected]"Output:
data: {
"agent_id": "agent_abc123",
"name": "Support Bot Alpha",
"status": "active",
"created_at": "2024-01-15T10:30:00Z"
}Example 2: Multilingual Sales Agent
Input:
access_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
workspace_id: "ws_67890"
agent_name: "Sales Assistant Pro"
data: {
"description": "Sales agent with multilingual support",
"languages": ["en", "es", "fr"],
"capabilities": ["product_info", "pricing", "availability"],
"working_hours": "9am-5pm EST"
}
email: "[email protected]"Output:
data: {
"agent_id": "agent_xyz789",
"name": "Sales Assistant Pro",
"status": "active",
"languages": ["en", "es", "fr"],
"created_at": "2024-01-15T11:00:00Z"
}Example 3: Technical Support Agent
Input:
access_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
workspace_id: "ws_11223"
agent_name: "Tech Support Specialist"
data: {
"description": "Technical support for enterprise customers",
"specialization": "software_troubleshooting",
"escalation_enabled": true,
"max_concurrent_conversations": 5
}
email: "[email protected]"Output:
data: {
"agent_id": "agent_def456",
"name": "Tech Support Specialist",
"status": "active",
"specialization": "software_troubleshooting",
"created_at": "2024-01-15T11:30:00Z"
}Common Use Cases
Automated Customer Support: Create specialized agents for handling common customer inquiries and support tickets
Sales Automation: Deploy sales agents that can answer product questions and guide customers through purchasing
Multi-Workspace Deployment: Programmatically create agents across multiple workspaces for different teams or departments
Dynamic Agent Provisioning: Automatically create new agents based on demand or seasonal needs
A/B Testing: Create multiple agent variants to test different configurations and conversation strategies
Regional Support: Deploy region-specific agents with localized settings and language support
Workflow Integration: Integrate agent creation into larger automation workflows for onboarding or scaling operations
Error Handling
Authentication Error
Invalid or expired access token
Regenerate the access token and ensure it has proper permissions
Invalid Workspace
Workspace ID doesn't exist or is inaccessible
Verify the workspace ID and check access permissions
Duplicate Agent Name
Agent with the same name already exists in workspace
Use a unique agent name or modify the existing agent
Invalid Data Format
Data object doesn't match required schema
Review the data structure requirements and ensure all required fields are present
Email Delivery Failed
Email address is invalid or unreachable
Verify the email address format and ensure it can receive emails
Quota Exceeded
Workspace has reached maximum agent limit
Remove unused agents or upgrade workspace plan
Notes
Access Token Security: Store access tokens securely and never expose them in logs or client-side code. Consider using environment variables or secure vaults.
Agent Naming: Use descriptive, unique names for agents to make them easily identifiable in the workspace. Avoid special characters that might cause issues.
Data Configuration: The data object structure depends on your CX platform's requirements. Consult platform documentation for available configuration options.
Email Notifications: The email notification confirms successful agent creation and typically includes the agent ID and access details.
Workspace Limits: Be aware of workspace agent limits. Creating agents programmatically can quickly reach quotas in high-volume scenarios.
Testing: Test agent creation in a development workspace before deploying to production to avoid issues with production configurations.
Last updated
Was this helpful?