SurveyGizmo Blog

From survey design all the way through taking action, you'll find tried and tested survey knowledge on each and every page of our blog.

Hacking Our Survey API to Power a Restaurant

The topic of this article is a bit off the well-beaten path for a survey tools blog. It just goes to show the cool and random things you can do with survey software that has an open survey API once you get to know it.

We don't like to talk about ourselves this way, but survey software is really just a glorified web form with a backend. (I'm on vacation this week, so the sales team won't be able to take revenge on me for saying that on our blog.)

What that means is if you are clever you can use our tool to solve a large number of office issues. The one I want to tell you about is what we call our "Order Up" system for Pancake Thursdays at SurveyGizmo.

Better Breakfast Through Surveys

Every Thursday we cook eggs, bacon, sausages, and pancakes (with chocolate chips in fun patterns) for the entire company. We started doing this recently, and given that there's about fifty of us in the office now, the first time we had Pancake Thursday it took almost 6 hours to get everyone served!

So the next Thursday morning we had an idea: we would send out a survey to get everyone's order and create a simple widget using our API to show the orders as they come in.

As an added bonus, it would notify each employee with an email once their order was ready!

We call it the "Order Up" system - and we can't live without it.

Designing a Survey Ordering System

The survey was pretty simple. We have just two survey questions: "What's your email address?" and a checkbox question for what items from the menu you'd like to eat.

We also created a hidden field to flag if the order has been completed or not. The respondent never sees it; we flag it through the API when the order is ready for pickup.

We then used the survey API to create the cook's screen. Michael is inevitably the cook each week (it was his idea). So he has a laptop set up in the kitchen which refreshes and shows him the orders as they come in.

The Order Up Survey also tallies how many strips of bacon, eggs, etc that have been ordered in real-time so he can cook in bulk.

The entire system only took about an hour to set up, and it's been a fun and easy way to make Pancake Thursdays work and get it down to only two hours of cooking. (Not to mention we've been there's that).

I mention this just as a suggestion to everyone -- keep your eyes open for neat ways that a data collection tool can be used to optimize all the little internal processes at your company. If you have an idea or have an unconventional way you're using our survey software in your company, let us know!

The Code That Makes it Possible

If you are curious, here's the (very dirty) PHP code that we used to build the order-up dashboard! Passwords and SurveyIDs have been changed to protect the innocent (and our pancake orders).

//---- start code (don't judge us on code style)

function makeapicall($url)
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_NOPROGRESS, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_POST, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$buffer = curl_exec($ch);

if ($buffer === false) {
return false;

return unserialize($buffer);


$uri = "{$_GET['orderup']}.pson?_method=POST&[4]=Yes";
$results = makecall($uri);


//get orders

$uri = "[field][0]=status&filter[operator][0]==&filter[value][0]=Complete&limit=500";

$results = makecall($uri);
$orders = array();
$orderups = array();

foreach($results["data"] as $result)
if($result['status'] != 'Complete')continue;

if($result["[question(4)]"] == "Yes")
if($result['id'] == $_GET['orderup'])
mail($result["[question(2)]"],"Your Pancake Thursday order is ready!","Come and Get it!!!!",null,"");
$orderups[] = $result;
$orders[] = $result;

Spread the word
Try SurveyGizmo out!

By accessing and using this page, you agree to the Terms of Use. Your information will never be shared.

Be in the know!

Subscribe to get regular updates and best practices for survey creation, data collection, and data analysis.