Proof of concept

How I Built an Automated Text Messaging Ordering System In Less Than A Day

How I Built an Automated Text Messaging Ordering System In Less Than A Day

COVID-19 has hit us all pretty hard. Whether you’re sick, know someone who has been sick, know someone who has passed, lost your job, been furloughed, or been forced to work from home, each and every one of us has been affected at a personal level to some degree.

The US unemployment rate is the highest its been since 1940 at a staggering 13%. That means one out of every 8 people are without a job right now. Ouch.

I am a software engineer by trade, so I am lucky enough to have the option of working from home during these tough times. My brother on the other hand, does not have the luxury.

He is a chef, and unfortunately his place of work has shut down indefinitely. So he’s been left without a job. He decided to take it upon himself to stay in the service industry and start up a business where he can continue to pursue his passion and make food for people.

The Job

He started a business where he provides a small menu of items to locals. The menu has 3 sides and four unique entrees to choose from. People order an entree and sides, he prepares and cooks the food, then delivers it to their door.

Simple concept, proven to work, and the market is there and not saturated. It’s a pretty good idea.

He told me about the idea about a week ago and asked me for advice. I told him a few basics, but warned him the hard part wasn’t going to be sourcing and cooking the food, it was going to be marketing.

You can’t sell your product if you can’t sell your business.

So he built a Facebook page and took the marketing on himself. Believe it or not, he started getting orders within the first couple of days. Which is when I jumped in.

The Problem

Any small business owner knows how much scaling hurts if you aren’t prepared for it. My brother learned that real quick with his business. It’s fine when you have one or two orders a day, but once he started getting 8 a day, it was hard to track who ordered what and what went where.

Photo by Francisco Moreno on Unsplash Photo by Francisco Moreno on Unsplash

He quickly outgrew his tiny operation, and hey, good for him! Maybe he can continue to do this when things shift back to normal. But for now, he had an immediate problem.

He can’t monitor Facebook, run to the store to buy food, prepare, and deliver meals all day every day. He needed a system that could validate orders from people. He needed a way to track what the current demand was. He was in need for a solution that gave him visibility into his consumers.

We had a chat about the issues, and came up with a solution. He needed an automated ordering system that could make sure people ordered valid things off the menu.

The Requirements

To build the perfect solution for my brother, he needed a system that could do the following:

  • Make sure customers order one of the four menu options
  • Require at least 2 and at most 20 servings per order
  • Accept orders for today only if they come in before noon
  • Don’t accept orders more than a week in advance
  • Notify him when a new order comes in
  • Notify the customer when the food is out for delivery
  • Provide a dashboard of the orders for an at-a-glance view

Not too bad, only 7 primary requirements. I’ve dealt with a lot worse. This should be a relatively small and quick build.

The Solution

We needed to get this out as quickly as possible, so I decided to go with some no-code solutions. A no-code solution is basically a drag and drop editor that writes the code for you behind the scenes. They feel a little like geocities did from Yahoo back in the day. Except they’ve come a long way since then.

I decided to build the automated ordering system in Twilio. Twilio is a cloud messaging company that provides a multitude of offerings when it comes to building solutions.

The solution was going to be a text message based system. A customer could text a number and it would walk them through an order. It would guide them through how many of each plate they wanted, what the delivery date was, and get their name and address.

Photo by Meghan Schiereck on Unsplash Photo by Meghan Schiereck on Unsplash

I bought a phone number for $1/month, and set to work. I used Twilio Studio to build the workflow. It is a drag and drop designer that lets you easily send a message, wait for a reply, do branching logic, and call external APIs.

For the dashboard, database, and validation logic, I opted for OutSystems. OutSystems is another no-code solution offering the ability to build reactive web pages with a drag and drop interface. It lets you turn out projects fast, and if the pages aren’t going to be client facing, it’s the perfect solution for “I need something and I need it now.”

In OutSystems, I did some basic modelling of the database and came up with the following diagram:

I then exposed a web service to provide Twilio Studio access into the system and enable the text messaging system to add orders as they come in.

From there, I had to update Twilio one more time, just to make sure it was calling the correct endpoints, then it was go time!

The Effort

Photo by Bench Accounting on Unsplash Photo by Bench Accounting on Unsplash

When you use services that are truly best-in-class, they make complex problems and solutions seem trivial. The sign of a great piece of software is that it makes hard problems easy, and that is exactly what Twilio and OutSystems do.

The drag and drop interfaces along with their simple designers enabled me to build and test the whole solution in about 8 hours. Now my brother has a scalable method to control his business, and it only took me about a day of “programming.”

I did not write any code to build the automated system, I just dragged, dropped, clicked, and typed in some text messages. If you would like to see the Twilio side of things, you can get a copy of it on my GitHub.

Unfortunately I can’t post an export of my OutSystems dashboard and API, but they make it so easy and their defaults are so nice, you should be able to get it in no time.

Conclusion

You don’t have to be highly technical to build a piece of software for your business anymore. You just have to know what tools you have at your disposal.

You can stand up an online store in minutes with Shopify. You can connect to your consumers in an hour by setting up a Facebook business page. You can build an automated text messaging system with an online dashboard in a day with Twilio and OutSystems.

Don’t let the fear of the unknown stop you from taking steps toward starting your business. Don’t confuse unfamiliarity with complexity. Expose yourself to these wonderful tools available for free on the internet. Get out there and start your business.

Feel free to get in contact with me if you’d like any help! If there’s one thing COVID-19 has taught me, it’s that people are awesome. We are all human, there’s no reason we shouldn’t help each other out.

Allen Helton

About Allen

Allen is an AWS Serverless Hero passionate about educating others about the cloud, serverless, and APIs. He is the host of the Ready, Set, Cloud podcast and creator of this website. More about Allen.

Share on:

Join the Serverless Picks of the Week Newsletter

Stay up to date with the best content serverless has to offer, learn about the latest updates to AWS serverless services, and get to know community superheroes, catered by AWS Serverless Hero Allen Helton. New issue every Monday.
Click here to see past issues.

Join the Serverless Picks of the Week Newsletter

Thank you for subscribing!
View past issues.