kbmaine
06/04/2025, 2:47 PMVapi Support Bot
06/04/2025, 2:49 PMtransfer-destination-request webhook in your server and routing calls based on the current time. Here’s a simple example in JavaScript:
js
const hour = new Date().getHours();
if (hour >= 9 && hour < 17) {
// Forward to reservation or events team based on call details
res.json({ destination: { type: "number", number: "+1234567890", message: "Connecting you to reservations." } });
} else {
// Capture details and send email (implement your email logic here)
res.json({ error: "Our team is unavailable. We'll email you shortly." });
}
This lets you forward calls during business hours and handle them differently after hours. You’ll need to implement the email logic in your backend. [See dynamic transfer docs](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests) for more details.
Source:
- [Dynamic Call Transfers](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests)Kings_big💫
06/05/2025, 6:35 AMVapi Support Bot
06/05/2025, 4:18 PMVapi
06/05/2025, 8:48 PM