Browse the docs

Build an agent

Call analysis

When a call ends, CallShift reads it back: a summary, an outcome, and the information you asked the agent to collect. You find them on the call and in the after-call webhook.

Outcome flags

FlagTrue when
isReachedA person answered
isSignificantA real conversation took place
isSuccessfulThe call met its objective, as the agent's evaluationPrompt defines it
isSilentNobody spoke

The flags are null until the call is analysed. Together they make a funnel (dialed, reached, significant, successful), and GET/v1/calls filters on each.

Summary and evaluation

Two prompts of the agent drive the analysis: summaryPrompt says what the summary should hold, and evaluationPrompt says what makes a call successful.

JSON
{
  "summaryPrompt": "Summarise the call in two sentences: the caller's request and the outcome.",
  "evaluationPrompt": "The call is successful if the caller booked a visit."
}

Information to collect

informationToCollect lists what the analysis extracts from each call. Each entry has a name, a type (string, number, boolean or enum with its enumValues) and a description.

JSON
{
  "informationToCollect": [
    { "id": "visit", "name": "Visit booked", "type": "boolean", "description": "Did the caller book a visit?" },
    { "id": "day", "name": "Preferred day", "type": "enum", "enumValues": ["Weekday", "Weekend"] },
    { "id": "goal", "name": "Fitness goal", "type": "string", "description": "In a few words" }
  ]
}

The values arrive in the call's qualificationCriteria, keyed by name:

JSON
{ "qualificationCriteria": { "Visit booked": "true", "Preferred day": "Weekend", "Fitness goal": "Run a half marathon" } }
Names are keys

Renaming an entry changes its key in every call that follows, and silently breaks the mappings that read it. Treat a name as frozen once a CRM or a scenario consumes it. Values arrive as text, a boolean included ("true" or "false"): compare them as text.

Campaign totals

GET/v1/campaigns/{campaignId} returns a campaign's metrics: totalCalls, reached and callsCompleted.