How to create a phone poll in under 5 minutes
By admin • Jul 1st, 2010 • Category: TwilioA couple weeks ago, an awesome company named Twilio released an open source business phone platform called OpenVBX.
Many have described it as a roll-your-own Google Voice for businesses, where you create your own auto-attendants, call forwarding, conference and voicemail systems, but I want you to think of it as much more.
I don’t have a large business, so many of these possibilities aren’t much use to me, but what interests me are all the things small businesses could use it for. Especially since OpenVBX does not require any programming knowledge.
Today I am going to show you how you can use it to create your own text message and phone polling system in under 5 minutes.
Here’s what you’ll need:
Requirements
- Twilio account
- Web server
- MySQL
- PHP5
- OpenVBX
- OpenVBX Subscriptions Plugin
- OpenVBX Keyword Matching for SMS Menus
If you haven’t used Twilio before, try it out. They’ll give you a free trial with $30 worth of credit so you can build your apps.
For this application you’ll need a full account as we will be purchasing a phone number.
Part 1 – Installation
- Download OpenVBX and plugins.
- Unzip the archives and upload them to the correct location on your server.
The entire content of the plugins archives should go in the /plugins directory.
Rename the folder chadsmith-OpenVBX-Plugin-Subscriptions-xxxxxxx to subscriptions and chadsmith-OpenVBX-Plugin-Match-xxxxxxx to match.
- Create your database and browse to the domain you’re using for the install. Hopefully everything will check out on your server, if so hit next.
- Configure your database.
- Enter the SID and token for your Twilio account.
- Enter the options for your site and create your account, then login.
Part 2 – Prepare the poll
The Susbcriptions plugin is something I created so people can make their own opt-in text message marketing/auto-dialer campaigns (more on that later) but it also works well for polls.
- Click Manage Lists
Our poll will simply be one where people call in or text their response on which is better: Team Edward or Team Jacob.
Disclaimer: I know nothing about Twilight and really don’t care.
- Create a list called “Team Edward”
- Create a list called “Team Jacob”
Part 3 – Creating a flow
Flows are the part of OpenVBX where you tell Twilio’s server what should happen on a call or when someone sends a message. OpenVBX has an amazing setup where you drag widgets, or as they call them, applets, to build your application.
- Click Flows and push the button to create a new flow.
Give the flow a name and hit OK.
Then you’ll see a screen that asks what we should do.
- Create a menu.
Drag the menu applet to where it says ‘Drop applet here’.
A Menu Prompt screen will appear.
- Enter a prompt.
We want our poll to greet the caller and say the options, so click Read Text like a robot, and enter the text for our poll.
“Thank you for calling the Twilight Phone Poll. To vote for Team Edward, press 1. To vote for Team Jacob, press 2.”Click save.
- First Menu Option
The callers can either press 1 or 2, so enter 1 for the first option where it says Keypress, and drag a Subscription applet next to it.
The Subscription window will open where we want to mark them down for Team Edward, but since Twilight fans can’t be trusted, we want to make sure they only vote once.The Subscriptions plugin is written so you can only subscribe to each list once, but since we’re using two lists we want to make sure they’re unsubscribed from the Team Jacob list first.
Select Team Jacob from the dropdown and Remove.
Next, add another Subscription applet where we will add them to the list Team Edward.
Drop a Greeting applet, and click Read Text. Here we will tell the caller their selection.
After their vote is recorded we want to hang up. Drop a Hangup applet.
- Second Menu Option
Now that we’ve added option 1, scroll back to the Menu window (or minimize all other applets) and enter the settings for option 2.
Again, we will need to drop a Subscription applet, make sure they’re not on the list for Team Edward, add them to the list for Team Jacob, read their selection, and hang up.
- Other Menu Settings
Some people are rude, so since we’re paying by the minute we’ll want to finish the call flow by adding a few additional settings to the menu.
Scroll back to the Menu window and enter 0 times since we do not want to repeat the menu, and drop a Hangup applet so they’re disconnected if they press something incorrect or nothing.
Now click save and close.
Part 4 – Creating an SMS flow
Once our call flow is saved we will create one for SMS, so people can also vote by text.
- Click Create SMS Flow
Here we see a similar screen as when we created our call flow. Our call flow is started by Twilio whenever someone texts our poll.
- Create a keyword matching menu.
Drop a Match applet where it says ‘Drop applet here’. The match applet is similar to the one for the phone menu, except it decides what to do based on what the person texts.
For the SMS portion of our poll, people will text either the word EDWARD or JACOB to place their vote. It’s not case sensitive but will only record their vote as long as the message doesn’t include anything else.
- First keyword: Edward
Enter Edward for the first keyword and drop a Subscription applet next to it.
Again we want to remove them from Team Jacob first and add them to Team Edward.
After recording their vote, Drop a ‘Send a Reply’ applet to thank them for their vote.
- Second keyword: Jacob
Do the same thing for Jacob, but first remove them from Team Edward, and then send a reply.
- Backup plan
If they don’t text one of our two keywords, maybe they didn’t know how it works.
Scroll back to the Match Options window and where it says ‘Oops, the message didn’t match any of our choices.’ drop a ‘Send a Reply’ applet.
- Here we will respond with our instructions.
- Save
Save the flow and press close.
Part 5 – Set up a number
Now that our flow is created, we need a phone number to use with our poll. If you don’t already have one, click ‘Get a Number’.
- Get a Number.
Twilio offers toll free numbers, but those do not support SMS, so for our poll we will need a local one. Enter your desired area code and click Add number. Your number will be purchased (they cost $1) and will appear on the screen.
- Assign the flow
We’ve already created our Flow, so you’ll want to press Setup later.
From the Numbers screen, click ‘Connect a Flow’ and choose our poll.
You will receive confirmation that it worked. Once you do, call the number to try it out.
If you already had OpenVBX installed, hopefully that didn’t take too much longer than 5 minutes. If it did, you’ll will be a lot faster next time.
admin
Email this author | All posts by admin