What is the best way to include metadata on an ind...
# support
f
When using the create call API, I thought it was possible to pass metadata on a call level (this is important as each call needs to access customer information). The docs were down last week, but now they are back up I see there doesn't seem to be a call level metadata object. There is one for the assistant - Is it best practice to pass the metadata into the assistant object even though it is being used to identify a specific call in this case (each call has a non-persistent assistant), or am I missing something here?
v
@focusanalytics It's great to hear that you're looking into the best practices for using metadata with the create call API. If each call has a non-persistent assistant and requires specific customer information, it would indeed be appropriate to pass the metadata within the assistant object. Since the assistant is transient and created for each call, the metadata associated with it will effectively serve the purpose of call-level metadata. Here's how you can structure it:
Copy code
json
{
  "assistant": {
    "metadata": {
      // Your call-specific customer information here
    }
    // Other assistant-specific configurations
  }
}
By doing this, you ensure that each call has its own set of metadata tied to the temporary assistant, which allows you to access the necessary customer information for that particular call. If you have any further questions or need more clarification, please let me know!
You can continue this conversation by mentioning me in the message.
7 Views