theschnack
10/20/2025, 5:53 AMChiranjeet Mishra
10/20/2025, 5:53 AMVapi Support Bot
10/20/2025, 5:54 AMjs
app.post("/api/assistant-selector", async (req, res) => {
if (req.body.message?.type === "assistant-request") {
const phoneNumber = req.body.call.from.phoneNumber;
const customer = await hubspotAPI.getCustomerByPhone(phoneNumber);
res.json({
assistantId: "your-assistant-id",
assistantOverrides: {
variableValues: {
customerName: customer?.name || "valued customer",
customerPhone: phoneNumber
}
}
});
}
});
This avoids LLM hallucination and ensures the actual caller number is used for lookups and personalization.
Source:
- [Personalization with user information](https://docs.vapi.ai/assistants/personalization)theschnack
10/20/2025, 6:09 AMVapi Support Bot
10/20/2025, 6:33 AMtheschnack
10/20/2025, 6:43 AMtheschnack
10/20/2025, 6:44 AMChiranjeet Mishra
10/22/2025, 4:06 AM