Is what I'm trying to achieve possible?
# support
j
I'm really struggling trying to implement what I think is simple functionality. My assistant is processing requests from customers who wants to book a viewing at a property. I've created a tool that retrieves the property information from our CRM and the agent is able to accurately discuss with the customer the options around which properties are available to view. At the end of the call I want to post back to the CRM the customer's information and the details of the property. To be accurate, I need to send back a UNIQUE ID that defines the property the customer wants to view. In the tool that gets the list of properties, I return as a JSON object, each property, with details about the property and its ID. My problem is, that I can't use the structured data extraction features of VAPI to extract the ID, unless the assistant mentions the ID in the call. I believe that the results of the tool call are not being made available to the LLM that is processing the structured data, just the transcript of the call. If that's the case, then I won't be able to extract the ID unless I get the assistant to mention the ID every time it refers to a property. So, is my understanding correct, or am I just being a prompt noob and unable to create the right prompt to extract the data.
v
You are correct: Vapi's structured data extraction only works on the call transcript, not on the tool call results or their returned JSON. To reliably extract the property ID, you need the assistant to mention it during the conversation. Example prompt for the assistant:
Copy code
"Great, I've booked your viewing for 123 Main St. (Property ID: 4567)."
This ensures the ID appears in the transcript and can be extracted at the end of the call. [See Vapi custom tools documentation for more details.](https://docs.vapi.ai/tools/custom-tools) Source: - [Custom Tools](https://docs.vapi.ai/tools/custom-tools)
v
Message marked as helpful by @james_apex! 🎉
j
Yup, that's resolved the issue. Thanks Bot!
5 Views