Skip to main content
Custom Actions extend your AI agents with the ability to perform real-world tasks — look up inventory, check pricing, book meetings, send emails, and more.

Overview

Custom Actions are tools that agents can invoke during conversations.

Tool Types

Function Tools

Connect to your business systems for inventory, pricing, and more. Create a function tool by providing a name, description, and the information the agent should collect. Then point it to your endpoint.

Transfer Call Tools

Hand off calls to human agents. Add transfer destinations by providing phone numbers or labels for each team (e.g., Sales, Support).

SMS Tools

Send text messages such as order confirmations or follow-up information during conversations.

Creating Custom Actions

Step 1: Define the Function

Navigate to Custom Actions tab → Add Tool. Provide a name, description, and the parameters the agent should collect from the conversation (e.g., product ID, quantity).

Step 2: Configure the Server

Enter the URL for your API endpoint and any required authentication details. Store API keys securely using the Secrets settings.

Step 3: Test the Tool

  1. Click Test in the tool configuration
  2. Enter sample parameters
  3. Verify the response

Common Integrations

ERP Systems

Connect your agents to your ERP system to look up inventory, pricing, customer data, and orders.

CRM Systems

Connect your agents to your CRM to look up contacts, create deals, and track opportunities.

Calendar Systems

Connect your agents to your calendar system to schedule meetings, check availability, and send invitations.

Tool Prompts

Guide the agent on when and how to use tools:

System Prompt Instructions

## Available Tools

### check_inventory
Use this tool when customers ask about product availability.
Always check inventory before quoting delivery times.

### get_pricing
Use this tool for pricing questions. Requires product_id.
For volume pricing, include quantity parameter.

### schedule_meeting
Offer to schedule meetings when:
- Customer wants a detailed quote
- Customer has complex requirements
- Customer explicitly requests a meeting

Contextual Usage

## Tool Usage Guidelines

1. **Always confirm before actions**: "I can check that for you. One moment..."
2. **Handle errors gracefully**: "I'm having trouble accessing that. Let me transfer you..."
3. **Provide context**: "Based on your order of 500 units, the price is..."

Error Handling

Configure how your tools handle errors in the tool settings:
  • Timeout: Set how long to wait for a response. If the endpoint doesn’t respond in time, the agent delivers a fallback message.
  • Retries: Set the number of retry attempts for failed requests.
  • Fallback messages: Provide a user-friendly message the agent can say if the tool fails (e.g., “I’m unable to check that right now. Let me get you to someone who can help.”).

Security

API Key Management

Store API keys securely:
  1. Navigate to SettingsSecrets
  2. Add secret: PRICING_API_KEY
  3. Reference in tools: {{PRICING_API_KEY}}
Never hardcode API keys in tool configurations. Always use secret references.

Authentication

For systems requiring authentication, configure your credentials in the tool settings. Supported methods include API keys and OAuth2.

Testing Tools

Test Panel

  1. Go to Custom Actions tab
  2. Click Test on a tool
  3. Enter sample parameters
  4. View request/response

Conversation Testing

  1. Open agent test panel
  2. Ask questions that trigger tools
  3. Verify tool invocation in debug view

Best Practices

Tool Naming

  • Use clear, descriptive names: check_inventory not inv_chk
  • Use snake_case consistently
  • Group related tools with prefixes: crm_lookup, crm_update

Parameter Design

  • Make parameters intuitive
  • Provide clear descriptions
  • Set sensible defaults
  • Mark required fields appropriately

Error Messages

  • Provide user-friendly fallbacks
  • Don’t expose technical errors
  • Offer alternatives when tools fail

Troubleshooting

  • Check tool description matches use case
  • Verify system prompt includes tool instructions
  • Test with explicit trigger phrases
  • Verify endpoint URL is correct
  • Check authentication headers
  • Test endpoint directly with an API testing tool
  • Check API endpoint performance
  • Reduce timeout if endpoint is fast
  • Add loading messages for long operations

Next Steps

CRM Integration

Connect your CRM

ERP Integration

Connect ERP systems

Testing

Test custom actions