Agent Availability Check
What Agent Availability Check does
Section titled “What Agent Availability Check does”Agent Availability Check asks an external API whether a destination is available before Moja routes to it. Configure it on a Target or outbound RTB when your buyer or call center provides an availability endpoint.
The check uses both the endpoint’s HTTP status and a condition applied to its response body. Passing this check does not bypass other routing requirements, such as hours, caps, concurrency limits, or advanced filters. It also does not guarantee that someone will answer the call.
Configure the check
Section titled “Configure the check”- Under Targets / RTBs, create or edit a Target or outbound RTB and turn on Agent Availability Check.
- Enter the API URL and choose the HTTP Method: GET or POST. Add any required headers or query parameters. For POST requests, configure the request body and its format.
- Select Eligible HTTP status codes. The defaults are 200, 201, and 202. A different status makes the destination unavailable unless you explicitly include it. An eligible status alone is not enough—the response mapping must also pass.
- Configure Response Mapping:
- API response format: JSON, CSV (comma), CSV (tab), or CSV (pipe).
- Availability field path: for JSON, the field containing the availability value. Use dot notation for nested fields, such as
data.agents.available. - Availability column (header name): for CSV, the column to read from the first data row beneath the header.
- Operator and Required Value: the condition that determines availability.
- Set Timeout (milliseconds), run Test Configuration, review the result, and save the Target or RTB.
The timeout field defaults to 5000 ms (5 seconds) and accepts 1000–30000 ms. Availability requests add routing delay, so use a responsive endpoint and the shortest practical timeout. A higher setting does not guarantee that every routing path will wait that long.
Example: an available-agent count
Section titled “Example: an available-agent count”Suppose your endpoint returns HTTP 200 with:
{"ready": 5}Configure:
- API response format: JSON
- Availability field path:
ready - Operator: Greater Than (>)
- Required Value:
0
The check passes when the HTTP status is eligible and ready is greater than zero.
This is an example, not a fixed product rule. Choose a condition that matches your endpoint’s contract. An agent count, a status code, and a text status can require different comparisons.
For CSV, use a header row followed by a data row, for example:
ready,agents5,2Select CSV (comma) and use ready as the availability column.
What makes a destination unavailable?
Section titled “What makes a destination unavailable?”An enabled check makes the destination unavailable when:
- The HTTP status is not in the eligible list.
- The mapped field is missing or its condition fails.
- The request times out or encounters a network error.
- Moja cannot load the availability-check configuration.
Moja excludes that destination from the routing decision. Other destinations remain subject to their own eligibility checks and the campaign’s routing configuration.
Test and troubleshoot
Section titled “Test and troubleshoot”Test Configuration uses sample caller and location values shown in the form. Review the returned HTTP status, status eligibility, response body, extracted value, and whether the check would block the destination. A successful request or a displayed response does not necessarily mean the availability condition passed.
For actual calls, inspect the call’s Call Life records for Agent Availability Check Passed or Agent Availability Check Failed. Available details can include the returned HTTP status, response time, mapped field and value, and failure reason.
After saving, verify the result on a controlled call. A configuration test is not proof of the complete live routing outcome.
Related guide
Section titled “Related guide”Understanding Webhooks, Agent Availability, and Call Flow explains which feature to use. This article covers availability-check configuration and interpretation. *** End of File

