0xJakess
02/19/2025, 6:16 PMKyle Brunker
02/20/2025, 9:37 PMconst 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