Having my own End-Of-call-report
# support
h
is it possible to make a tool that does exactly what end-of-call-report does except I can add more to the call report? I mean like it is possible to let's say make a tool that has { "message": { "type": "end-of-call-report", "endedReason": "hangup", // or the actual reason for the call ending "call": { /* Call Object containing relevant details */ }, "recordingUrl": "https://vapi-public.s3.amazonaws.com/recordings/1234.wav", // URL to the recording "summary": "The user picked up the phone then asked about the weather...", // Summary of the call's main points "transcript": "AI: How can I help? User: What's the weather? ...", // Transcript of the conversation "messages": [ { "role": "assistant", "message": "How can I help?" }, { "role": "user", "message": "What's the weather?" } ], "customerDetails": { "name": "John Doe", // Replace with actual name "email": "john@example.com", // Replace with actual email "address": "123 Main St, Anytown, USA" // Replace with actual address } } } Where I can add customer details or ect. ik know this is a little complicated lol but It would be super helpful
@User Let me know when you get the chance!
v
Yes, it's definitely possible to extend the end-of-call report to include additional customer details like you've shown in your example! 🙌 While there isn't a direct built-in feature to add custom fields to the standard end-of-call report, you can achieve this using webhooks and custom server-side logic. Here's how: 1. Set up a webhook endpoint to receive the standard end-of-call reports:
Copy code
javascript
   app.post('/vapi-webhook', (req, res) => {
     const message = req.body;
     if (message.type === 'end-of-call-report') {
       // Process and extend the report here
     }
     res.status(200).json({ success: true });
   });
2. Configure your assistant to send end-of-call reports to your server:
Copy code
json
   {
     "serverMessages": [
       "end-of-call-report"
     ]
   }
3. Extend the report with customer details in your server code. You can merge the standard report with additional customer information from your database or other sources. 4. Store or forward the enhanced report as needed for your use case. The key is that you'll receive the standard report via webhook, then your server code can add the additional customer details before storing or processing it further. For capturing customer information during calls, you can use [analysis plans with structured data](https://discord.com/channels/1211482211119796234/1211483291191083018/1337367190030123080) to extract relevant details from the conversation, or include metadata when setting up the call that can be referenced later. Let me know if you need more specific guidance on implementing this! 😊 Sources: - [Server URL Events Documentation](https://docs.vapi.ai/server-url/events) - [Discord Discussion on End-of-Call Reports](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1342410769232302122) - [Discord Discussion on Customer Information](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1337367190030123080)
h
would i need to set up the webhook outside of vapi by using make then?
@Vapi Support Bot
s
@Hunter J. King You can try setting up a tool but it's not worth the effort as you have to use the LLM and then results won't be deterministic sometimes you will get the expected outcome and most of time may not so I suggest instead use exisiting webhook events. If you still insist on toll let me know i can try to pull something for you.
6 Views