https://retellai.com/?utm_source=discord&utm_medium=seo logo
h
@AI Evy 1. Does Retell always send structured JSON—including extracted fields/slots—to the webhook URL during call_ended or call_analyzed events, even if I am not using function calling? 2. Is the webhook payload guaranteed to contain call metadata, transcript, and any captured customer information (name, phone, service, preferred time, etc.) as JSON regardless of whether custom functions are enabled? 3. In Retell’s system, what is the difference between LLM function-calling JSON (agent-initiated) and event webhook JSON (system-initiated), and which one is the correct source of structured data for building a leads database?
a
Thanks for tagging me @harkxn. I'll look through relevant sources and get back to you shortly.
on) - Sent during the call when the agent decides to invoke a custom function - Contains
name
,
call
, and
args
fields - Used for real-time actions like booking appointments or querying databases - Your server responds with data that the agent uses to continue the conversation Event webhook JSON (system-initiated) : [(1) ]() - Sent at specific call lifecycle events (
call_started
,
call_ended
,
call_analyzed
) - Contains the complete call object with all metadata, transcript, and analysis [(1) ]() [(2) ]() - Used for logging, analytics, and post-call processing [(1) ]() - No response expected from your server (just a 2xx status code) For building a leads database, use the event webhook JSON from
call_ended
or
call_analyzed
events.
[(1) ]() [(2) ]() These provide the complete call data including transcript, analysis, and any collected variables. The
call_analyzed
event is particularly useful as it includes structured analysis data you can configure to extract lead information. [(2) ]()
### Answer 1. Yes, Retell always sends structured JSON to your webhook URL during
call_ended
and
call_analyzed
events, regardless of function calling usage.
[(1) ]() The webhook payload includes the event type and a complete call object. The call object contains metadata, transcript,
retell_llm_dynamic_variables
,
collected_dynamic_variables
, and other call details. [(1) ]() [(2) ]() 2. The webhook payload is guaranteed to contain call metadata and transcript as JSON, but customer information capture depends on your agent configuration. Every webhook event includes: [(1) ]() -
call_id
,
agent_id
,
call_status
-
transcript
(full conversation text) [(1) ]() [(2) ]() -
transcript_object
(structured with timestamps) -
metadata
(any custom data you passed) -
retell_llm_dynamic_variables
(variables you injected) -
collected_dynamic_variables
(variables collected during the call) [(2) ]() To capture specific customer information (name, phone, service, preferred time) , you need to configure your agent to collect these as dynamic variables or use post-call analysis. The
call_analyzed
event specifically includes a
call_analysis
object with
call_summary
,
user_sentiment
,
call_successful
, and
custom_analysis_data
. You can configure custom analysis to extract specific fields. 3. LLM function-calling JSON and event webhook JSON serve different purposes: LLM function-calling JSON (agent-initiated) : [(3) ](
​ To learn more, see the sources I considered: [[1] Webhook Overview](https://docs.retellai.com/features/webhook-overview) [[2] Get Call](https://docs.retellai.com/api-references/get-call) [[3] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.