Guide for Adding Business Hours Code to a Twilio Function
If you have a Twilio phone line and want to take calls during your open hours and send callers to voicemail after you close, you can use the code above to add business hours functionality to your Twilio phone line using a Twilio Function.
Prerequisites
Before you start, ensure that you have the following:
- A Twilio account
- A Twilio phone number
- Access to Twilio Studio
- Have completed the Greeting Message guide for setting your Studio Flow
Tools
Some of the tools and resources we’ll use for this fore you start, ensure that you have the following:
- A Twilio account
- A Twilio phone number
- Access to Twilio Studio
- Have completed the Greeting Message guide for setting your Studio Flow
Follow these steps to add the code as a Twilio Function:
- Login to your Twilio Console at https://www.twilio.com/console.
- Click on the "Functions" icon in the left-hand navigation bar.
- If you haven't already, create a new Service by clicking on the "Create a Service" button. Give your service a name (like,
inbound-call-functions
) the click Next.