https://retellai.com/?utm_source=discord&utm_medium=seo logo
when I am trying to get the post analysis data fro...
# ❓・ai-evy-support
t
@AI Evy when I am trying to get the post analysis data from retell AI, while a batch call or multi call, then the data I get 1st is a null data and after that I can push the new data, as the new data is the same data with same IDs but with post call analysis. And now that data won't update in supabase as it now has the same id data as the previous null data, and I get an error, so help me to solve this problem
a
Thanks for tagging me @theonly_shravan. I'll look through relevant sources and get back to you shortly.
### Answer Based on the available sources, here's what's happening with your post-call analysis data: The post-call analysis fields are populated after the call ends, and Retell AI does not populate custom post-call analysis fields for non-connected calls and calls where no conversation happened [(1) ]() . Additionally, when using post-call data analysis with a list of variables to extract, the LLM will try to fill the variables, but there's no guarantee all fields will be populated [(2) ]() . This explains why you're receiving null data initially—the post-call analysis hasn't been completed yet when the first webhook event fires. To solve your Supabase update issue, you should: 1. Check for field existence before using the data [(1) ]() —this is explicitly recommended in the documentation 2. Use an UPSERT operation in Supabase instead of INSERT, which will update existing records with the same ID rather than throwing an error 3. Handle the webhook events properly by checking if post-call analysis data exists before attempting to store it, or design your database schema to allow updates to the same record The typical flow is: - First webhook: Call data with null/missing post-call analysis fields - Second webhook (after analysis completes) : Same call ID but now with populated post-call analysis fields Your Supabase schema should accommodate this by using the call ID as a primary key and allowing updates to overwrite the initial null values with the completed analysis data.
​ To learn more, see the sources I considered: [[1] Post Call Analysis Overview](https://docs.retellai.com/features/post-call-analysis-overview) [[2] Post Call Data Analysis - Nullable Variables](https://discord.com/channels/1186424376300679209/1376599913621885099) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.