Setting the customer column
# support
u
In the https://dashboard.vapi.ai/calls call logs, how can i set the customer field for different assistants? in the https://docs.vapi.ai/api-reference/assistants/create docs i don't see the field to add customer.
k
The customer field is actually set when creating a call, not when creating an assistant. This is because customer information is specific to each call instance rather than being tied to the assistant configuration. Here's how you can set the customer field when creating a call:
Copy code
const call = await vapiClient.calls.create({
  phoneNumberId: "your-phone-number-id",
  customer: {
    number: "+1234567890", // Customer's phone number
    name: "John Doe",      // Optional customer name
    metadata: {}           // Optional metadata about the customer
  },
  assistant: {
    // Your assistant configuration
  }
});
The reason for this design is: - Assistants are reusable configurations that can handle calls from multiple customers - Customer details are specific to each call interaction - This allows the same assistant to serve different customers while maintaining separate contexts for each call