# Five9 Agent Availability Integration

> The Five9 integration enables CallGrid to receive real-time agent availability updates from your Five9 ACD (Automatic Call Distribution) environment.

Source: https://callgrid.com/knowledge-base/five9-agent-availability-integration
Last updated: 2025-09-23
Topics: Integrations, Agent Availability

The Five9 integration enables CallGrid to receive real-time agent availability updates from your Five9 ACD (Automatic Call Distribution) environment. This integration uses Five9's Statistics API to monitor agent status and route calls intelligently based on current agent availability and queue capacity.

![](https://callgrid.com/api/media/file/five9Template.png)

## Prerequisites

Before setting up this integration, ensure you have:

- An active Five9 account with administrative privileges
- Access to your Five9 Administration Console
- A generated Bearer Authentication Token from your Five9 account
- Your specific Domain ID for the integration

## Configuration Steps

### Step 1: Generate Bearer Authentication Token

1. Log into your Five9 Administration Console
2. Navigate to **Settings** → **API** → **API Keys**
3. Click **Create New API Key** or **Generate Token**
4. Set appropriate permissions for statistics access
5. Copy the generated Bearer token securely (you'll need this for the integration)

### Step 2: Identify Your Domain ID

1. In your Five9 Administration Console, note your domain identifier
2. This is typically found in your account settings or dashboard URL
3. The Domain ID is used to specify which Five9 domain to monitor
4. Example: If your Five9 URL is [https://app.five9.com/appsvcs/rs/svc/orgs/YourDomain](https://app.five9.com/appsvcs/rs/svc/orgs/YourDomain), then "YourDomain" is your Domain ID

### Step 3: Configure CallGrid Integration

#### Phase 1: Basic Template Setup

1. Navigate to your CallGrid destination settings
2. Click the **Webhook** tab
3. Enable **Webhook Integration**
4. Enable **Template Mode**
5. Select **Five9** from the Agent Availability templates
6. Fill in the required fields:

##### Required Configuration Fields

**Domain ID** _(Required)_

- Enter your Five9 domain identifier
- This identifies which Five9 domain to monitor for agent availability
- Example: YourCompanyDomain

**Bearer Authentication Token** _(Required)_

- Paste your Five9 Bearer authentication token
- This token authenticates your requests to Five9's Statistics API
- Example: Bearer abc123def456ghi789jkl012

1. Click **Save Webhook** to proceed to advanced configuration

#### Phase 2: Advanced Configuration (Optional)

After saving your basic template configuration, you'll be taken to the advanced configuration screen. The system automatically builds the webhook URL and authentication headers for you.

##### 

![](https://callgrid.com/api/media/file/five9Advanced.png)

##### Request Configuration

**URL Structure** The webhook URL is automatically generated based on your configuration:

[https://developer.alpha.us.five9.net/statistics/v1/domains/xxxxx/statistics/acd-status](https://developer.alpha.us.five9.net/statistics/v1/domains/xxxxx/statistics/acd-status)

**HTTP Method**

- **Method**: GET (automatically configured)
- **Timeout**: 10 seconds (default, adjustable)

##### Authentication Headers

The system automatically configures the Authorization header:

- **Key**: Authorization
- **Value**: Bearer 12345678 (your Bearer token)

##### Acceptance Parsing

The most important setting is the acceptance criteria, which determines when calls should be sent to this destination.

**Parsing Type**

- **Parse Type**: JSON (automatically configured)
- **Parse Field**: Configure which field from the API response to evaluate

**Default Acceptance Criteria** The system is pre-configured to check for agents ready for voice calls using the agentsReadyForVoice field:

- **Field**: agentsReadyForVoice
- **Condition**: Greater Than
- **Value**: 0

This configuration accepts calls only when at least one agent is ready to handle voice calls.

##### Agent Availability Parsing

**Response Field Options** Configure which fields from the Five9 API response to use for agent availability:

- **Property Path**: Enter the JSON path to the availability data
- **Common Fields**:
  - agentsReadyForVoice - Agents available to take voice calls
  - agentsLoggedIn - Total agents logged into the system
  - agentsOnCall - Agents currently handling calls
  - agentsInWrapUp - Agents in wrap-up mode
  - totalAgents - Total number of agents

##### Testing Your Configuration

To test your integration:

1. Fill in your **Domain ID** and **Bearer Authentication Token** in the configuration boxes
2. Click **Run Webhook** button to test the connection
3. Verify the test passes and shows your current ACD status data
4. Confirm the acceptance parsing works correctly with your agent threshold

The webhook test will connect to your Five9 system in real-time and show you whether calls would be accepted based on your current agent availability.

## How It Works

### Agent Status Monitoring

The integration monitors real-time agent status changes through Five9's ACD Status API:

1. **Real-time Polling**: CallGrid checks agent availability before routing each call
2. **ACD Status Evaluation**: The system evaluates current agent status against your criteria
3. **Smart Routing**: Calls are only sent when agent availability meets your thresholds
4. **Load Management**: Helps prevent overwhelming your call center during peak times

### API Response Structure

Five9's ACD Status API returns agent availability data in the following format:

{

"domain": "YourDomain",

"agentsReadyForVoice": 5,

"agentsLoggedIn": 12,

"agentsOnCall": 7,

"agentsInWrapUp": 2,

"totalAgents": 15,

"timestamp": "2025-09-23T15:30:00Z"

}

## Advanced Configuration Examples

### Example 1: Basic Agent Availability

**Acceptance Criteria:**

- Field: agentsReadyForVoice
- Condition: Greater Than
- Value: 0

This configuration accepts calls only when at least one agent is ready for voice calls.

### Example 2: Multiple Agent Threshold

**Acceptance Criteria:**

- Field: agentsReadyForVoice
- Condition: Greater Than
- Value: 2

This setup ensures calls are accepted only when at least 3 agents are ready for voice calls.

### Example 3: Capacity-Based Routing

**Acceptance Criteria:**

- Field: agentsLoggedIn
- Condition: Greater Than
- Value: 5

This configuration requires at least 6 agents to be logged in before accepting calls.

### Example 4: Load-Balanced Distribution

**Acceptance Criteria:**

- Field: agentsOnCall
- Condition: Less Than
- Value: 10

This configuration prevents accepting calls when more than 9 agents are currently on calls, avoiding system overload.

## Advanced Use Cases

### Multi-Domain Monitoring

Configure multiple CallGrid destinations, each monitoring different Five9 domains for enterprise-level call routing.

### Skill-Based Routing

Combine agent availability with Five9's skill groups for intelligent call distribution based on agent specializations.

### Performance Optimization

Use ACD status data to create dynamic routing rules that adapt to real-time call center performance.

## Troubleshooting

### Common Issues

**Authentication Failures**

- Verify your Bearer token is correct and current
- Ensure the token has proper permissions for Statistics API access
- Check that your Five9 account is active and accessible

**Invalid Domain ID**

- Confirm your Domain ID exists in your Five9 system
- Verify the Domain ID matches your Five9 account configuration
- Check that the domain is active and properly configured

**No ACD Data Returned**

- Ensure agents are logged into your Five9 system
- Verify the ACD service is running and configured
- Check that statistics collection is enabled in Five9

**API Rate Limiting**

- Monitor your API usage to stay within Five9's rate limits
- Consider implementing request throttling if needed
- Check Five9's API documentation for current rate limit policies

### Testing the Integration

**Manual API Test**:

curl -H "Authorization: Bearer your_bearer_token_here" \

"https://developer.alpha.us.five9.net/statistics/v1/domains/your_domain/statistics/acd-status"

**Template Configuration Test**:

1. After entering Domain ID and Bearer token, click **Save Webhook**
2. Review the auto-generated URL and authentication headers

**Advanced Configuration Test**:

1. In the advanced configuration screen, click **Run Webhook**
2. Verify the API response contains expected ACD status data
3. Test different field paths and acceptance criteria

**Live Integration Test**:

1. Monitor CallGrid logs for successful API calls
2. Verify ACD status data is being parsed correctly
3. Test call routing based on agent availability conditions

## Rate Limits and Considerations

- **API Rate Limit**: Monitor usage to stay within Five9's API rate limits
- **Response Time**: Typically under 500ms for ACD status checks
- **Data Freshness**: Real-time agent status updates
- **System Performance**: Consider the impact of frequent API calls during peak hours

## Support and Additional Resources

### Five9 Documentation

- [Five9 Developer Portal](https://developer.five9.com/)
- [Statistics API Documentation](https://developer.five9.com/docs/statistics-api)
- [ACD Status API Reference](https://developer.five9.com/docs/acd-status)

### CallGrid Support

If you need assistance with this integration:

1. Check the CallGrid logs for error messages
2. Verify all configuration parameters
3. Test API connectivity using provided curl commands
4. Contact CallGrid support with integration details
