Structured data from phone calls: typed answers your agent can trust

A phone call ends as a conversation. Your agent needs a price, a yes or no, or a date. This guide shows how the collect field turns a call into typed values, what comes back when the business cannot answer, and how the caller's review and the transcript keep your agent from acting on a guess.

Why a summary or transcript is not enough

A transcript records everything that was said, including the hold music apology and the person who said "let me check" twice. An agent can read it. It cannot easily branch on it. To decide whether to place an order or try another supplier, code needs a value it can compare: true, 42.5, 2026-12-03.

HumanCalls returns both. A real person makes the call and asks your questions. The result holds typed answers in outcome, plus a summary, a recording and a transcript. You choose which answers you want before the call starts.

Defining the fields with collect

collect maps field names to a type. Names use lower_snake_case. Each field takes a type, an optional description and an optional required flag. You can define up to 25 fields per task. A bare type string such as "number" is still accepted, but a description helps your caller ask the right question.

TypeGood forExample value
stringNames, part numbers, short notes"Dana at the front desk"
numberPrices, quantities, lead times in days185
booleanYes or no questionstrue
dateDelivery, ready or appointment dates"2026-12-03"

Mark a field required when the task has no point without it. Leave a field optional when it would be useful but the business may not know or may not say.

Worked example: a quote with four fields

Everything below is example data. Fieldwork Printing, Lakeside Hardware and the 555 number are fictional.

Request (example data)
curl -X POST https://humancalls.ai/v1/calls \
  -H "Authorization: Bearer $HC_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: quote-flyers-0193" \
  -d '{
    "to": "+13125550147",
    "business": "Fieldwork Printing",
    "on_behalf_of": "Lakeside Hardware",
    "goal": "Get a price for 500 double-sided A5 flyers",
    "max_minutes": 10,
    "collect": {
      "quoted_price": {"type": "number", "required": true, "description": "Total price in USD before tax"},
      "includes_delivery": {"type": "boolean", "description": "Is delivery included in the price"},
      "ready_date": {"type": "date", "description": "Earliest date the order is ready"},
      "contact_name": "string"
    },
    "delivery": {"mode": "polling"}
  }'

Poll GET /v1/calls/:id until the task reaches a final status. A completed task looks like this:

Result, abridged (example data)
{
  "status": "completed",
  "outcome": {
    "quoted_price": 185,
    "includes_delivery": false,
    "ready_date": "2026-12-03",
    "contact_name": null
  },
  "outcome_notes": "The person who answered would not give a name. Delivery is quoted separately.",
  "summary": "Fieldwork Printing quoted $185 for 500 flyers, ready 3 December, delivery extra.",
  "duration_seconds": 312,
  "billed_minutes": 6,
  "cost_usd": 6.00
}

312 seconds rounds up to 6 minutes at $1 per connected minute. A call nobody answers, a declined call and a canceled call cost $0. See pricing.

How missing answers come back

When the caller cannot get an optional answer, the field comes back as null. It is not filled with a likely value, an empty string or zero. In the example, contact_name is null because nobody gave a name. outcome_notes says why in plain words.

Treat null as "not known" in your code. Do not default it to false. A missing includes_delivery is a different situation from a business that said delivery is not included, and your agent should handle the two differently.

How review and evidence keep an agent from guessing

After the call, an AI pass builds a checklist from your goal and context, drafts analysis.outcome from the saved transcript, and reports each check as confirmed, missing or unclear, with evidence. You can add optional checklist strings to make your own requirements explicit.

That draft is not the final answer. Your caller reviews it. The call.media_ready and call.analysis_ready events only report progress. Wait for a terminal event, such as call.completed, or a final status when polling, before you act. That is the caller-reviewed result.

The transcript is the evidence behind each value. Its JSON lists sentences with speaker, text, start_seconds and end_seconds, so your agent or a person on your team can find the moment a price was quoted. Recordings and transcripts may arrive after completion, so keep polling until the URLs are present, then fetch them with your bearer key. For the wider pattern, read human in the loop for AI agents.

Writing fields that get clean answers

  • Ask one thing per field. Split "price and delivery" into a number and a boolean.
  • Put the unit in the description: USD, days, units, before or after tax.
  • Use date for dates, not string, so your code does not parse "next Tuesday".
  • Keep required for the answers your agent cannot act without.
  • Use context for background the caller needs, not extra fields.

The same fields work from a chat app. Connect Claude, ChatGPT or another MCP client at https://humancalls.ai/mcp and read the result with get_call. See add a phone call tool to any MCP client and the developer docs. Common jobs include collecting quotes and checking stock and price. What callers always and never do is on trust and process.

Questions

Which field types can I ask for?
string, number, boolean and date. Each field can have a description and a required flag, and a task can have up to 25 fields.
What happens if the business will not answer one of my questions?
An optional field comes back as null, and outcome_notes usually explains what happened. Your code should treat null as unknown, not as a no.
Can I act on the result as soon as the analysis is ready?
No. call.analysis_ready is a progress event with a draft. Wait for a terminal event or a final status, which carries the caller-reviewed result.
How do I check where a value came from?
Open the transcript. Each sentence has a speaker, the text and start and end times, and the recording is available with your bearer key.
Do I need a webhook to get typed answers?
No. Pass delivery: {"mode": "polling"} and poll GET /v1/calls/:id. A verified webhook connection is optional.

Related

Try it with 10 free minutes

$1 per connected minute after that, and nothing when nobody picks up.

Request a callConnect a chat app