architect-post-call-data
Set up post-call data collection and evaluation criteria
Two related but separate post-call configs. Data collection answers "what facts were in the call?"; evaluation criteria answer "was the call good?". Both are written with PATCH /v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID (host https://api.elevenlabs.io, header xi-api-key: $API_KEY), branch-scoped, live on merge.
Ground the design in real calls first
Before proposing fields or criteria, read the agent and a representative sample of its conversations (in parallel where independent):
GET /v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID: read the system prompt andfirst_messageto see what the agent is positioned to gather, and read the existingplatform_settings.evaluation.criteriaandconversation_config.platform_settings.data_collectionso you extend rather than clobber.GET /v1/convai/conversations?agent_id=$AGENT_ID: recent call volume and a sample to inspect.GET /v1/convai/conversations/{cid}on 2-3 of those: confirm the target data actually appears in transcripts, and note the exact phrasing the agent uses and where calls terminate early. These payloads carry customer PII; do not copy transcripts into other systems or logs, and respect zero-retention-mode accounts.
Part 1: Data collection (structured extraction)
An independent post-call LLM extraction runs over the transcript for each field. Config lives at conversation_config.platform_settings.data_collection, an object keyed by field name. Each field has type, description (the extraction prompt), an optional enum, and value-source flags.
Design each field against these rules: