Connect with us

Marketing Strategies

4 Ways Anyone Can Market a Product From Home

Published

on


Photo by Maddi Bazzocco on Unsplash

In this day and age, you’ll find a bunch of tools, software, and options to help you get started with that new business you’ve promised yourself you’d create. But, you also probably don’t have thousands of dollars to dump into a new business as you struggle with the house payment and food bill. You don’t need a fancy office or storefront to get your business started. In fact, you can market a product without leaving your home. I had a college student one year who was making serious bank by selling products from home in his spare time.

Now, we’re well into the quarantine period at this stage, and, even as some businesses cautiously begin to open, the vast majority of budding entrepreneurs are sitting at home contemplating what a future looks like after being laid off from their jobs or finding their job just disappeared. Just because you’re stuck on your couch in your PJs and bunny slippers doesn’t mean you can’t start the new business you’ve always wanted – especially from a marketing point of view. As we mentioned, there are so many different avenues to go down these days and many of them require very little upfront cost. So, turn off Netflix and pay attention to these 3 ways to market a product from home and begin your journey toward independence.

Market a product (or service) from home

If you’re an expert at something, or just a little goofy in a way others find entertaining, there are lots of things to market without leaving your home. Just remember, when we talk about how to market a product, we’re referring to bother goods (tangible products) and services (intangibles).

Market a service

Service options may not be possible for everyone, but you’re probably better at something than you think. And, services have the added advantage of costing nothing, so sales are fundamentally pure profit (after you take out marketing expenses).

Here are some examples of services you can offer for sale:

  1. Business services like accounting, financial planning (for these it helps if you have a license), marketing, or IT support. Fiverr and other marketplaces exist to market these services.
  2. Creative services like design or entertainment. For instance, folks produce concerts from their balconies or perform entire plays from home. By placing a sign with Venmo or PayPal account information, these performers turn their talent into profit.
  3. Maintenance services, like gardening or landscaping. Sure, you want to avoid services inside someone’s home to keep from spreading the virus, but outdoor spaces are much safer places to work.
  4. Personal services, such as hairstyling, are a no-no during the pandemic, but you can plan ahead for the end of stay-at-home orders. That way you’re hitting the ground running once the pandemic is over.

Market a product

Trying to market a product is a little riskier since you incur costs to acquire the product in the first place and, if you’re unsuccessful, that upfront cost is lost. Still, the tangible nature of products makes them somewhat easier to sell and most essentials are tangible products, unlike services, which are often discretionary.

New tools and inexpensive devices mean anyone can set up a studio at home to capture attention (and make money). For instance, during the pandemic, home cooks made a name for themselves by teaching online cooking classes or, in some cases, selling their goods through low-touch options. A few comedians made money posting daily skits on their TikTok channel.

Bespoke products, such as jewelry, art, masks, and other handmade products are in high demand right now and are easily made from home. Pinterest even has a pinboard of the best products to market from home.

I talked earlier about my student who made a tidy sum by dropshipping products. In his case, he sold miniature football helmets emblazoned with the logos for various professional and college teams. Weird, if know, but folks wanted that kind of stuff and were willing to pay for them. Rather than buy a bunch of helmets when many might go unsold, he arranged with the manufacturer to sell the products. Hence, every time a customer bought a helmet from the student’s website, an order went to the manufacturer, who sent the product along to the buyer. The student then paid the manufacturer and pocket the rest.

Now, this may sound implausible. Why didn’t the manufacturer just set up his own website and keep all the money? Well, it’s a reality that manufacturers are in business to make products not sell them. They don’t have the expertise and don’t want to bother when they can sell through a distributor and focus on their own business. That’s the way almost everything you buy gets to you. So, the student’s idea was a sound one.

Marketing your products

Of course, determining what to sell, developing the products, and setting up your channels of distribution are only one part when it comes time to market a product. The big task, the thing that distinguishes success from failure is the marketing part of the equation. Here are 3 options to use when you market a product from home or anywhere else, for that matter.

Social media

Social media is the easiest way to get your message across to anyone these days. Whether you’re using a social platform for personal reasons or business ones, a quick press of the ‘post’ button allows the entire planet to see what you have to say. It’s no wonder businesses are using every big platform they can get their hands on as a tool for marketing.

You should join in, too. Gone are the days of using social media to simply chat and meet people – it’s a lot more advanced now!

Facebook even hosts Marketplace — an online shop where you can sell anything from your old couch to your bespoke products or services in exchange for a small commission.

Build A Pretty Website

Or, be like my student to sell something from a website. Websites aren’t as tricky to create as they might appear at first blush and they’re easier now than they’ve ever been. I even offer a free guide to developing a website that walks a novice through the process screen-by-screen.

Sure, if you want to make the most sophisticated website, you’ll need to know a few tricks of the trade, but simple ones are pretty easy to get your head around. Just don’t be fooled by those drag-and-drop websites like Wix and Squarespace. You’ll find their templates limiting and search engines don’t like them much.

Speaking of search engines, folks use search engines all day every day, so it’s a good idea to make sure you’re website shows up high in the results when they look for (or something similar to) what you’re offering. You can find out a lot about SEO (search engine optimization) by reading other posts here or around the Internet.

Work With An Agency

Marketing agencies are great for advertising your business and, newer digital agencies handle everything from SEO to content marketing, to social media marketing. Some agencies are pretty specialized, such as an SEO agency, while others offer a range of integrated services.

The entire reason agencies exist is to optimize your business and make it more profitable. Whether it’s an app marketing agency or one specializing in SEO, they offer services and advice to help your business succeed. You sit back and let them come up with all kinds of strategies and campaigns. Sure, there’s an upfront investment with an agency, but your money usually pays off in the long-term if you choose the right agency.

Influencers!

Influencers are well-connected people and they’ve always existed. The trendsetters who determine which fashions succeed or the soccer mom who started the run to Starbucks after drop-off. Some are so popular we call them micro-celebrities and I recently heard that these folks are forever changing the notion of celebrity.

Influencers drive the behavior of others with their ideas and trends. For some reason, the average human being likes to look up to influencers whether it’s the unboxing kid who goes ape over a new toy or the fashionista who demonstrates the proper technique for smoky eyes.

So, it’s a good idea to consider using an influencer to promote your work. Influencers often work for just the cost of the product (making most of their money through advertising), although some demand a hefty fee. Influencer marketing is an easy method and one that many startups use to get their business started.


قالب وردپرس

Continue Reading
Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Marketing Strategies

It’s the Message, Stupid

Published

on


If I was to call you stupid how would you feel? You’d probably be offended, but I can guarantee, the message would get your attention. I’ll explain that in a bit.

The first thing I want to talk about is systems. I just finished writing my fifth book called “Toilet Paper Math“, and it explains how a system of marketing can work. The bottom line with systems is they only work when you feed them the right message for the right audience at the right time.

Hands Tied In A Knife Fight

I’ve talked recently with a handful of financial advisors who obviously are having trouble because we’re in the middle of very challenging times. And they’re trying to figure out how they can get their message out. Unfortunately, most financial advisors are going to a knife fight with both hands tied behind their backs. What do I mean by this? It’s called compliance.

The thing about being a financial advisor is the SEC and other governmental bodies will not allow them to make promises or promote products. When you see financial commercials, you’ll often see a disclaimer that says results may vary. That’s because nobody can predict the financial markets. If they make a promise, there are no guarantees because there is no way to predict the future.

Each of them has marketing systems. They have lists, they have funnels, they have mailers, emails, and seminars. They have a wide variety of things they can do, but the one thing that they can’t do is create a message that really gets people’s attention. That’s the key. If they did try to do something that was outside the box, they could lose their business.

They’re regulated and constrained, in ways that most of us aren’t.

I want to offer you up three different tools that you can use to get people’s attention so that the systems that you put together will actually work the way you want them to.

Disruption

The first type of message at your fingertips is a disruptive message. One of those kinds of messages actually got a president elected. In 1992, James Carville coined the phrase, “It’s the economy, stupid.” And that took the Clinton campaign to the White House.

Another way to say this, and let me say it two different ways is the K.I.S.S. method. You’ve heard it said as, “Keep It Simple, Stupid” or “Keep It Super Simple”. If you say, “Keep It Simple, Stupid”, it invokes a different message than “Keep It Super Simple”. The way that you say things can disrupt the way that you think.

Brands and advertisers use this all the time. There was a commercial back when I was a kid and it had a bunch of people in a restaurant and it was all noisy and clangy. Then, one guy says to another person at his table, “Well, my broker’s E. F. Hutton and E. F. Hutton says…” And the entire place goes quiet.

Then the announcer comes on and says, “When E. F. Hutton talks, people listen.” And that’s exactly it. You want to create something that gets people to stop in their tracks.

Some brands that use this are Nike, “Just Do It.” What is it? It’s whatever you want it to be. And Apple, “Think Different.” Think differently than what? Different than you had before?

Questions

The next kind of interruptive way of doing things is asking a deep question. What would happen if you…? And that’s the question you have to ask, you have to get the person to feel like you’re talking directly to them. How about if I asked you this, how could $50,000 change your life? If I wait for a second, you’re going to start to roll that through your head and start to come up with different ways that you could utilize that.

Another way to say that is, “Would you honestly pay for what you sell if somebody else offered it?” Again, you’re putting that person in the customer’s mind. You’re changing their perspective. By asking those deep questions, you get people to stop, pause, think, and engage with the information as if it was meant directly for them.

The Magical Metaphor

The last messaging tool I want to give you is what I call the magical metaphor. You’ve probably heard the term and I love this one, perfume on a pig or lipstick on a pig. You can clean up a pig, put a ribbon on its tail and spray it with perfume, but it’s still a pig. Another one that I really like is cat herding.

How do you herd cats? Or how about nailing jello to a wall? Both of those create a message in your mind. And that message says, it’s impossible, right? That’s the key to get somebody to get the concept through the metaphor.

And I Quote

Here are some real famous ones.

“All the world is a stage and the men and the women are merely players. They have their exits and their entrances. So you can imagine being in a play and we’re all part of that play.”

– William Shakespeare

“All of our words are but crumbs that fall down from the feast of the mind.”

– Khalil Gibran. .

“A hospital bed is a park taxi with the meter running.”

– Groucho Marx

Man, I can really relate to that last one!

Getting Attention

When we’re trying to create systems, we have to feed those systems with messages that are going to get attention. Messages that are going to make our concepts stick out and allow the audience to get in their minds so they can imagine something. Then they can feel empathy or a part of it. Something creates an emotion that helps urge them to take action. That action is to, hopefully, continue reading, to dig deeper, or to take the next step. What action are you trying to get them to take? How can you use your messages as the catalyst to start that process?

Final Thoughts

Let me leave you with this, systems are important. You need to be able to get those messages in there so that people will go through the steps to join the list, to open the email, to attend your webinar or seminar. From there you have the opportunity to continue the conversation. But the messages that you put out there are the most important ingredient. And that’s why you have to spend so much time thinking about how those messages play out in the minds of your listeners.

So again, “It’s the economy, stupid.”

Another blast from the past were t-shirts that had hands with fingers pointing on them that men and women would wear together and the fingers would point at each other and above it, it would say, “I’m with stupid.”

I would love to hear your thoughts on this. Comment below and share your thoughts, ideas, or questions about a message that connects. Are these tips making your business better? What worked and what did not live up to your expectations? Do you have any ideas or advice you could share?


قالب وردپرس

Continue Reading

Marketing Strategies

How to Make a Scalable SMS Chatbot Using Twilio, Python, and Google Sheets (with Free Code)

Published

on


Posted by R0bin_L0rd

Many of us are helping businesses that are facing hard times, or we’re facing hard times ourselves. If you’re working for a company (or client) that’s in trouble, the use of SMS chatbots could be a way for you to look outside your normal list of solutions and help them succeed in a completely different way. If you’re a marketer looking for work, adding this to your list of skills could mean you keep things ticking along while many of the usual doors are closed — or that you open new doors.

What you’ll get

In this post, I give you instructions and code to produce not just one, but a series of text-based chatbots that can be managed by Google Sheets.

The example here is set up to work with restaurants, but could be adapted to work with any business that needs to receive orders, check them against inventory/menus, and note them down to be fulfilled.

Once the system is set up, there will be no coding necessary to create a new SMS-based chatbot for a new business. Plus, that business will be able to manage key details (like incoming orders and a menu) by simply updating a Google Sheet, making all of this far more accessible than most other options.

But first, some context.

Some context

In September 2017, as one of my first big passion projects at Distilled, I wrote a Moz blog post telling people how to make a chatbot and giving away some example code.

This April, I got an email from a man named Alexandre Silvestre. Alex had launched “a non-profit effort to help the local small business owners navigate these challenging times, save as many jobs as possible, and continue to serve our community while helping to flatten the curve.”

This effort began by focusing on restaurants. Alex had found my 2017 post (holy moly, content marketing works!) and asked if I could help his team build a chatbot. We agreed on some basic requirements for the bot:

  • It had to work entirely within text message (and if the order was super complicated it had to be able to set up a call directly with the restaurant).
  • Running it had to be as close to free as possible.
  • Restaurants had to be able to check on orders, update menus, etc., without setting up special accounts.

The solution we agreed on had three parts:

  • Twilio (paid): supplies the phone number and handles most of the conversational back-and-forth.
  • Google Cloud Functions (semi-free): when a URL is called it runs code (including updating our database for the restaurant) and returns a response.
  • Google Sheets (free): our database platform. We have a sheet which lists all of the businesses using our chatbot, and linking off to the individual Google Sheets for each business.

I’ll take you through each of these components in turn and tell you how to work with them.

If you’re coming back to this post, or just need help with one area, feel free to jump to the specific part you’re interested in:

—<a href="https://moz.com/blog#pricing" Pricing
Twilio
Google Sheets
Google Cloud Functions
Test the bot
Break things and have fun
Postscript — weird hacks

Pricing

This should all run pretty cheaply — I’m talking like four cents an order.

Even so, always make sure that any pricing alerts are coming through to an email address you actively monitor.

When you’re just starting on this, or when you’ve made a change (like adding new functionality or new businesses), make sure you check back in on your credits over the next few weeks so you know what’s going on.

Twilio

Local Twilio phone numbers cost about $1.00 per month. It’ll cost about $0.0075 to send and receive texts, and Twilio Studio — which we use to do a lot of the “conversation” — costs $0.01 every time it’s activated (the first 1,000 every month are free).

So, assuming you have 2,500 text orders a month and each order takes about five text messages, it’s coming to about $100 a month in total.

Google Sheets

Google Sheets is free, and great. Long live Google Sheets.

Google Cloud Functions

Google shares full pricing details here, but the important things to know about are:

1. Promotional credits

You get a free trial which lasts up to a year, and it includes $300 of promotional credits, so it’ll spend that before it spends your money. We’d spent $0.00 (including promotional credits) at the end of a month of testing. That’s because there’s also a monthly free allowance.

2. Free allowance and pricing structure

Even aside from the free credits, Google gives a free allowance every month. If we assume that each order requires about 5 activations of our code and our code takes up to five seconds to run each time (which is a while but sometimes Google Sheets is sluggish), we could be getting up to over 400,000 orders per month before we dip into the promotional credits.

Twilio

Twilio is a paid platform that lets you buy a phone number and have that number automatically send certain responses based on input.

If you don’t want to read more about Twilio and just want the free Twilio chatbot flow, here it is.

Step 1: Buy a Twilio phone number

Once you’ve bought a phone number, you can receive texts to that number and they’ll be processed in your Twilio account. You can also send texts from that number.

Step 2: Find your phone number

You can see your list of purchased phone numbers by clicking the Twilio menu in the top left hand corner and then clicking “Phone Numbers”. Or, you can just go to phone-numbers/incoming.

Once you see your phone number listed, make a note of it.

Step 3: Create your Studio Flow

Studio is Twilio’s drag-and-drop editor that lets you create the structure of your conversation. A studio “flow” is just the name of a specific conversation you’ve constructed.

You can get to Twilio Studio by clicking on the Twilio menu again and clicking on “Studio” under “Runtime”.

Create a new flow by clicking “Create a flow”.

When you create a new flow, you’ll be given the option to start from scratch or use one of the built-in options to build your flow for you (although they won’t be as in-depth as the template I’m sharing here).

If you want to use a version of the flow which Alex and I built, select “Import from JSON” and click “Next”. Then, download this file and copy the contents into the box that comes up.

Make sure that it starts with a single { brace, and ends with a single } brace. The box that comes up will automatically have {} in it and if you don’t delete them before you paste, you’ll double-up and it won’t accept your input.

If all goes well, you’ll be presented with a flow that looks like this:

You might be asking: What in the name of all that is holy is that tangle of colored spaghetti?

That’s the Twilio Studio flow we created and, don’t worry, it basically splits up into a series of multiple-choice questions where the answer to each determines where you go next in the flow.

Everything on the canvas that you can see is a widget from the Twilio Studio widget library connected together with “if this, then that” type conditions.

The Studio Flow process

Before we go into specific blocks in the process, here’s an overview of what happens:

  1. A customer messages one of our Twilio numbers
  2. Based on the specific number messaged, we look up the restaurant associated with it. We then use the name and saved menu of the restaurant to message the customer.
  3. If the customer tries to order off-menu, we connect a call to the restaurant
  4. If the customer chooses something from our menu, we ask their name, then record their order in the sheet for that restaurant and tell them when to arrive to pick up their order
  5. As/when the user messages to tell us they are outside the restaurant, we ask whether they are on-foot/a description of their vehicle. We record the vehicle description in the same restaurant sheet.

Let’s look at some example building blocks shall we?

Initial Trigger

The initial trigger appears right at the start of every flow, and splits the incoming contact based on whether it’s a text message, a phone call, or if code is accessing it.

“Incoming Message” means the contact was via text message. We only need to worry about that one for now, so let’s focus on the left-hand line.

Record the fact that we’re starting a new interaction

Next, we use a “Set Variables” block, which you can grab from the widget library.

The “Set Variables” block lets us save record information that we want to refer to later. For example, we start by just setting the “stage” of our interaction. We say that the stage is “start” as in, we are at the start of the interaction. Later on we’ll check what the value of stage is, both in Studio and in our external code, so that we know what to do, when.

Get our menu

We assume that if someone messaged us, triggering the chatbot, they are looking to order so the next stage is to work out what the applicable menu is.

Now, we could just write the menu out directly into Studio and say that whenever someone sends us a message, we respond with the same list of options. But that has a couple problems.

First, it would mean that if we want to set this up for multiple restaurants, we’d have to create a new flow for each. 

The bigger issue is that restaurants often change their menus. If we want this to be something we can offer to lots of different restaurants, we don’t want to spend all our time manually updating Twilio every time a restaurant runs out of an ingredient.

So what we really need is for the restaurants to be able to list their own menus. This is where Google Sheets comes in, but we’ll get to that later. In Twilio, we just need to be able to ask for external information and forward that external information to the user. To do that we use a Webhook widget:

This widget makes a request to a URL, gets the response, and then lets us use the content of the response in our messages and flow.

If the request to the URL is successful, Twilio will automatically continue to our success step, otherwise we can set it to send an “Oops, something went wrong” response with the Fail option.

In this case, our Webhook will make a request to the Google Cloud functions URL (more on that later). The request we send will include some information about the user and what we need the code to do. The information will be in JSON format (the same format that we used to import the Twilio flow I shared above).

Our JSON will include the specific Twilio phone number that’s been messaged, and we’ll use that number to differentiate between restaurants, as well as the phone number that contacted us. It’ll also include the content of the text message we received and the “stage” we set earlier, so the code knows what the user is looking for.

Then the code will do some stuff (we’ll get to that later) and return information of its own. We can then tell Twilio to use parts of the response in messages.

Send a message in response

Next we can use the information we received to construct and send a message to the user. Twilio will remember the number you’re in a conversation with and it’ll send your messages to that number.

This is the “Send & Wait For Reply” widget, meaning that once this message is sent, Twilio will assume the conversation is still going rather than ending it there.

In this case, we’re writing our welcome message. We could write out just plain content, but we want to use some of the variables we got from our Webhook widget. We called that specific Webhook widget “get_options”, so we access the content we got from it by writing:

{{widgets.get_options

The response comes back in JSON, and fortunately Twilio automatically breaks that up for us. 

We can access individual parts of the response by writing “parsed” and then the label we gave that information in our response. As it is, the response from the code looked something like this:

{“name”: restaurant_name,

“dishes_string”: “You can choose from Margherita Pizza, Hawaiian Pizza, Vegetarian Pizza”

“additions”: “large, medium, small”}

We get the available menu by writing “{{widgets.get_options.parsed.dishes_string}}”, and then we write the message below which will be sent to people who contact the bot:

Make a decision based on a message

We can’t assume everyone is going to use the bot in exactly the same way so we need to be able to change what we do based on certain conditions. The “Split Based On…” widget is how we select certain conditions and set what to do if they are met.

In this case, we use the content of the response to our previous message which we access using {{options_follow_up.inbound.Body}}. “Options_follow_up” is the name of the Send & Wait widget we just spoke about, “inbound” means the response and, “Body” means the text within it.

Then we set a condition. If the user responds with anything along the lines of “other”, “no”, “help”, etc., they’ll get sent off on another track to have a phone call. If they respond with anything not on that list, they might be trying to order, so we take their order and check it with our code:

Set up a call

If the user says they want something off-menu, we’ll need to set up a call with the restaurant. We do that by first calling the user:

Then, when they pick up, connecting that call to the restaurant number which we’ve already looked up in our sheets:

Step 4: Select your studio flow for this phone number

Follow the instructions in step two to get back to the specific listing for the phone number you bought. Then scroll to the bottom and select the Studio Flow you created.

Google Sheets

This chatbot uses two Google Sheets.

Free lookup sheet

The lookup sheet holds a list of Twilio phone numbers, the restaurant they have been assigned to, and the URL of the Google Sheet which holds the details for that restaurant, so that we know where to look for each.

You’ll need to create a copy of the sheet to use it. I’ve included a row in the sheet I shared, explaining each of the columns. Feel free to delete that when you know what you’re doing.

Free example restaurant sheet

The restaurant-specific sheet is where we include all of our information about the restaurant in a series of tabs. You’ll need to create a copy of the sheet to use it. 

Orders

The orders tab is mainly used by our code. It will automatically write in the order time, customer name, customer phone number, and details of the order. By default it’ll write FALSE in the “PAID/READY?” column, which the restaurant will then need to update.

In the final stage, the script will add TRUE to the “CUSTOMER HERE?” column and give the car description in the “PICK UP INFO” column.

Wait time

This is a fairly simple tab, as it contains one cell where the restaurant writes in how long it’ll be before orders are ready. Our code will extract that and give it to Twilio to let customers know how long they’ll likely be waiting.

Available dishes and additions tabs

The restaurant lists the dishes that are available now along with simple adaptations to those dishes, then these menus are sent to customers when they contact the restaurant. When the code receives an order, it’ll also check that order against the list of dishes it sent to see if the customer is selecting one of the choices.

Script using sheet tab

You don’t need to touch this one at all — it’s just a precaution to avoid our code accidentally overwriting itself.

Imagine a situation where our code gets an order, finds the first empty row in the orders sheet, and writes that order down there. However, at the same time, someone else makes an order for the same restaurant, another instance of our code also looks for the first empty row, selects the same one, and they both write in it at the same time. We’d lose at least one order even though the code thinks everything is fine.

To try to avoid that, when our code starts to use the sheet, the first thing it does is change the “Script using sheet” value to TRUE and writes down when it starts using it. Then, when it’s done, it changes the value back to FALSE.

If our script goes to use the sheet and sees that “Script using sheet” is set to TRUE, it’ll wait until that value becomes FALSE and then write down the order.

How do I use the sheets?

Example restaurant sheet:

  1. Make a copy of the example restaurant sheet.
  2. Fill out all the details for your test restaurant.
  3. Copy the URL of the sheet.

Lookup sheet:

  1. Make a copy of the lookup sheet (you’ll only need to create one).
  2. Don’t delete anything in the “extracted id” column but replace everything else.
  3. Put your Twilio number in the first column.
  4. Paste the URL of your test restaurant in the Business Sheet URL column.
  5. Add your business’ phone number in the final column.

Sharing:

  1. Find the “Service Account” email address (which I’ll direct you to in the Cloud Functions section).
  2. Make sure that both sheets are shared with that email address having edit access.

Creating a new restaurant:

  1. Any time you need to create a new restaurant, just make a copy of the restaurant sheet.
  2. Make sure you tick “share with the same people” when you’re copying it.
  3. Clear out the current details.
  4. Paste the new Google Sheet URL in a new line of your lookup sheet.

When the code runs, it’ll open up the lookup sheet, use the Twilio phone number to find the specific sheet ID for that restaurant, go to that sheet, and return the menu.

Google Cloud Functions

Google Cloud Functions is a simple way to automatically run code online without having to set up servers or install a whole bunch of special programs somewhere to make sure your code is transferable.

If you don’t want to learn more about Google Cloud and just want code to run — here’s the free chatbot Python code.

What is the code doing?

Our code doesn’t try to handle any of the actual conversations, it just gets requests from Twilio — including details about the user and what stage they are at — and performs some simple functions.

Stage 1: “Start”

The code receives a message from Twilio including the Twilio number that was activated and the stage the user is at (start). Based on it being the “start” stage, the code activates the start function.

It looks up the specific restaurant sheet based on the Twilio number, then returns the menu for that restaurant.

It also sends Twilio things like the specific restaurant’s number and a condensed version of the menu and additions for us to check orders against.

Stage 2: “Chosen”

The code receives the stage the user is at (chosen) as well as their order message, the sheet ID for the restaurant, and the condensed menu (which it sent to Twilio before), so we don’t have to look those things up again.

Based on it being the “chosen” stage, the code activates the chosen function. It checks if the order matches our condensed menu. If they didn’t, it tells Twilio that the message doesn’t look like an order. 

If the order does match our menu, it writes the order down in the first blank line. It also creates an order ID, which is a combination of the time and a portion of the user’s phone number.

It sends Twilio a message back saying if the order matched our menu and, if it did match our menu, what the order number is.

Stage 3: “Arrived”

The code receives the stage the user is at (arrived) and activates the arrived function. It also receives the message describing the user’s vehicle, the restaurant-specific sheet ID, and the order number, all of which it previously told Twilio.

It looks up the restaurant sheet, and finds the order ID that matches the one it was sent, then updates that row to show the user has arrived and the description of their car.

Twilio handles all the context

It might seem weird to you that every time the code finds some information (for instance, the sheet ID to look up) it sends that information to Twilio and requests it afresh later on. That’s because our code doesn’t know what’s going on at all, except for what Twilio tells it. Every time we activate our code, it starts exactly the same way so it has no way of knowing which user is texting Twilio, what stage they’re at, or even what restaurant we’re talking about.

Twilio remembers these things for the course of the interaction, so we use it to handle all of that stuff. Our code is a very simple “do-er” — it doesn’t “know” anything for more than about five seconds at a time.

How do I set up the code?

I don’t have time to describe how to use Google Cloud Functions in-depth, or how to code in Python, but the code I’ve shared above includes a fair number of notes explaining what’s going on, and I’ll talk you through the steps specific to this process.

Step 1: Set up

Make sure you:

Step 2: Create a new function

Go here and click “create a new function”. If you haven’t created a project before, you might need to do that first, and you can give the project whatever name you like.

Step 3: Set out the details for your function

The screen shot below gives you a lot of the details you need. I’d recommend you choose 256MB for memory — it should be enough. If you find you run into problems (or if you want to be more cautious from the start), then increase it to 512MB.

Make sure you select HTTP as the trigger and note down the URL it gives you (if you forget, you can always find the URL by going to the “Trigger” tab of the function).

Also make sure you tick the option to allow Unauthenticated Access (that way Twilio will be able to start the function).

Select “Inline editor” and paste in the Gist code I gave you (it’s heavily commented, I recommend giving it a read to make sure you’re happy with what it’s doing).

Click “REQUIREMENTS.TXT” and paste in the following lines of libraries you’ll need to use:

  • flask
  • twilio
  • pytz

Make sure “function to execute” is SMS, then click the “Environment Variables” dropdown.

Just like I’ve done above, click “+ ADD VARIABLE”, write “spreadsheet_id” in the “Name” column, and in the “Value” column, paste in the ID of your lookup sheet. You get the ID by looking at the URL of the lookup sheet, and copying everything between the last two slashes (outlined in red below).

Click on the “Service account” drop down. It should come up with just “App Engine default service account” and give you an email address (as below) — that’s the email address you need all of your Google Sheets to be shared with. Write it down somewhere and add it as an edit user for both your lookup and restaurant-specific sheets.

Once you’ve done all of that, click “Deploy”.

Once you deploy, you should land back on the main screen for your Cloud Function. The green tick in the top left hand corner tells you everything is working.

Step 4: Turn on Sheets API

The first time your code tries to access Google Sheets, it might not be able to because you need to switch on the Google Sheets API for your account. Go here, select the project you’re working on with the dropdown menu in the top left corner, then click the big blue “ENABLE” button.

Step 5: Go back to Twilio and paste in the HTTP trigger for your code

Remember the trigger URL we noted down from when we were creating our function? Go back to your Twilio Studio and find all of the blocks with the </> sign in the top left corner:

Click on each in turn and paste your Google Cloud URL into the REQUEST URL box that comes up on the right side of the screen:

Test the bot

By now you should have your Cloud Function set up. You should also have both of your Google Sheets set up and shared with your Cloud Function service account.

The next step is to test the bot. Start by texting your Twilio number the word “order” to get it going. It should respond with a menu that your code pulls from your restaurant-specific Google Sheet. Follow the steps it sends you through to the end and check your Google Sheet to make sure it’s updating properly.

If for some reason it’s not working, there are two places you can check. Twilio keeps a log of all the errors it sees which you can find by clicking the little “Debugger” symbol in the top right corner:

Google also keeps a record of everything that happens with your Cloud Function. This includes non-error notifications. You can see all of that by clicking “VIEW LOGS” at the top:

Conclusion: break things and have fun

All of this is by no means perfect, and I’m sure there’s stuff you could add and improve, but this is a way of building a network of scalable chatbots, each specific to a different business, and each partially managed by that business at minimal cost.

Give this a try, break it, improve it, tear it up and start again, and let me know what you think!


Postscript: weird hacks

This bit is only really for people who are interested, but because we’ve deliberately done this on a shoestring, we run into a couple weird issues — mainly around requests to our bot when it hasn’t been activated for a bit.

When Twilio gets messages for the first time in a while, it turns on pretty quickly and expects other things to do so, too. For example, when Twilio makes requests to our code, it assumes that the code failed if it takes more than about five seconds. That’s not that unusual — a lot of chat platforms demand a five-second max turnaround time.

Cloud Functions are able to run pretty fast, even with lower memory allowances, but Google Sheets always seems to be a bit slow when accessed through the API. In fact, Google Sheets is particularly slow if it hasn’t been accessed in some time.

That can mean that, if no one has used your bot recently, Google Sheets API takes too long to respond the first time and Twilio gives up before our code can return, causing an error.

There are a couple parts of our script designed to avoid that.

Trying again

The first time we activate our Cloud Function, we don’t want it to actually change anything, we just want information. So in Twilio, we start by creating a variable called “retries” and setting the value as 0. 

If the request fails, we check if the retries value is 0. If it is, then we set the retries value to 1 and try again. If it fails a second time, we don’t want to keep doing this forever so we send an error and stop there.

Waking the sheet up

The second time we activate our Cloud Function we do want it to do something. We can’t just do it again if it doesn’t return in time because we’ll end up with duplicate orders, which is a headache for the restaurant.

Instead, during an earlier part of the exchange, we make a pointless change to one of our sheets, just so that it’s ready for when we make the important change.

In our conversational flow we:

  1. Send the menu
  2. Get the response
  3. Ask for the user’s name
  4. Write the order

We don’t need to do anything to the sheet until step four, but after we get the user’s response (before we ask their name), we activate our code once to write something useless into the order sheet. We say to Twilio — whether that succeeds or fails — keep going with the interaction, because it doesn’t matter at that point whether we’ve returned in time. Then, hopefully, by the time we go to write in our order, Google Sheets is ready for some actual use.

There are limitations

Google Sheets is not the ideal database — it’s slow and could mean we miss the timeouts for Twilio. But these couple of extra steps help us work around some of those limitations.

Sign up for The Moz Top 10, a semimonthly mailer updating you on the top ten hottest pieces of SEO news, tips, and rad links uncovered by the Moz team. Think of it as your exclusive digest of stuff you don’t have time to hunt down but want to read!





Source link

قالب وردپرس

Continue Reading

Marketing Strategies

How Broadcast Journalism Helped Me Pivot to Social Media Management

Published

on


Pivoting from a career in broadcast journalism was a big decision for me.

I loved everything about a newsroom environment: the breaking news, researching topics, identifying sources for stories, and feeling like I had a pulse on trends and issues taking place in the world.

I was successful at it, too. In fact, I worked at some of the biggest news corporations in the world, including CNN, ABC News, CBSLA and others.

However, at some point — because I was spending so much time on social media listening for breaking news and looking for story ideas — my interest in social media evolved.

I knew I wanted to make a transition, but I was scared of taking a leap and pivoting to social media marketing.

Today, I can tell you that I’m so happy I did. I learned that my job is not my entire identity, and through journalism, I have so many transferrable skills to thrive in any industry.

Switching careers can feel exciting, but comes with feelings of self-doubt and anxiety.

Here, I want to highlight how broadcast journalism helped me succeed in social media, and tips you can use if you’re considering a career shift of your own.

7 Takeaways From Journalism You Can Apply to Social Media

1. Ask the 5 W questions.

Who? What? Where? When? and Why? These questions are ingrained in any journalist.

The foundational questions to news gathering also apply in the context of content creation, marketing plans, and any content strategy. For instance, any marketer likely asks these questions daily:

Who is this message for?

What is the core message we want them to take away from this?

When (and where) are they most likely to be to consume this message?

Why should they care?

“Why” also goes a little deeper in social media. The internet is flooded with information and it’s your job to capture someone’s attention — and hold their attention for your content.

Why would someone click on this ad?

Why are we targeting this group?

Why is it important that they see this message?

The root of these questions have helped me cut through the jargon of promotions and company announcements to get to the root of the message in the simplest words.

Pro Tip: In journalism school, I learned to simplify the facts by “explaining this story to my mom.” This framework has really helped me simplify information down to its core. I practice this often when trying to take a complex company announcement and whittle it down to its simplest takeaway.

2. Focus on the core story, not the details.

When it comes to creating content, journalists have a unique element they bring to the table: storytelling.

Some people may get caught up in numbers, the tagline, a paragraph in an announcement, and so on.

As a former journalist, I think about the core of the message we want to convey in a social post.

The key takeaway could involve visual elements and emotional triggers, but its foundation will include a concise message or story.

3. Keep up-to-date on industry and competitor trends.

The advantage journalism has provided me when it comes to conducting research is that, even if you have an intuitive sense of your audience, your journalism instincts still compel you to “look into it” and confirm your hypothesis.

For instance, for conducing market research — including what my audience is feeling, thinking, struggling with, dreaming of, reading about, etc. — I put my “investigative” hat on and look within Facebook Groups, or other websites where people can leave comments or questions (such as Quora or Amazon reviews) to gather information about what my audience is seeing, thinking, and feeling.

Additionally, a couple of keyword searches gives me a framework to work with while doing research.

Referring to the latest studies, trends, and reports helps me identify any overlaps and enables me to be a successful social media professional because I keep a pulse on issues that are top-of-mind to my audience.

A little research goes a long way in social media content and writing.

Journalists are naturally curious people, so we sometimes find ourselves entertained by trends and topics that get people talking. We like to quickly parachute in on behavior like this and figure out what the hype is all about, source who started it, and figure out why it’s taking off.

It’s amusing, to say the least, but this innate skill in journalists has helped me in social media because I can (for the most part) keep up with the latest memes, videos, or other trending news that’s popular that day or week. It also helps me recall previous news events or trends that were popular in the past.

Context of topics, audiences, and trends helps me while making editorial or marketing decisions and creating content.

4. Create quality content, even with minimal assets.

When it comes to content creation, journalists have had to work with little or major constraints when it comes to telling a story. You might have only a few usable sound bites, poor video quality, or you’re working with only sound.

Broadcast journalism helped me feel comfortable with improvising and maximizing any assets available.

I learned how to do video, audio and photography editing. I learned different storytelling formats such as radio, TV, print, and online, as well as how to distinguish each piece (i.e. infographic, video, blog post, listicle) and how to adapt them to different social media platforms.

I learned to do this in the most concise way possible, which helped me tremendously while writing short headlines and easy-to-understand text that includes a call to action.

5. Write concisely, and make every word count.

Whether it’s copywriting, writing in a brand’s voice, creating catchy headlines and titles, creating copy that converts a user, incorporating a call-to-action, or enticing a reader to learn more … it’s all important in social media.

Broadcast journalism helped my social media career with my writing skills alone. Ultimately, packaging information in a concise way is so important in social media.

Twitter has a 280 character limit. However, I’m proud that I learned how to write tweets when it had a 140-character limit — including character counts toward photos, videos, and GIFs that were attached!

Brevity is always a best practice when it comes to writing on social media, and broadcast journalism has helped me succeed in that regard.

Effective writing helps your audience understand you, what you offer, and your value and is a critical skill for attracting an online audience.

Pro Tip: Practice reading your words out loud to catch typos or awkward sentence structures. I learned this while writing copy for TV news and it has helped me tremendously while crafting social media posts.

6. Learn how to communicate effectively in crises. 

Social media is an extension of any brand, and understanding when something is a reputational risk is important.

My career in broadcast journalism helped me identify potential pitfalls or anticipate remarks people might make. The last thing I want to do is appear tone-deaf or miss the mark with marketing messages.

Working in broadcast journalism has trained me to never lower my guard and always keep my eyes open for threats or liabilities in social posts, marketing campaigns, and imagery.

I also understand news cycles, and during a crisis, I’ve learned how to evolve and adapt to new circumstances and information.

For example, during a crisis such as the COVID-19 pandemic, there were different phases of crisis communication companies needed to understand. It was important to pause, pivot marketing and messaging, and identify pain points and re-position your brand, among other things.

Working with so many PR and marketing professionals over the years taught me about how to “own the narrative” of a brand’s story and to serve as a brand steward on social media.

7. Stay resourceful and help your audience find answers to their needs.

I say I’m a digital content strategist, but really, I’m a professional problem-solver.

If I don’t have an answer, I’ll either find the answer or find someone who does.

Broadcast journalism taught me to be resourceful, help my audience with valuable and actionable information, and think quickly on my feet and pitch smart angles.

I’ve come across so many random scenarios while working in social media, including:

  • Converting and transferring files
  • Helping people with their wifi
  • Syncing folders on Sharepoint
  • Identifying fonts
  • Pitching a story on behalf of the company
  • Finding alternative channel or format to communicate a message
  • Sourcing video to its original owner

You name it, I’ve probably helped someone figure something out, and because of it, I’m an invaluable asset to my team and my company.

I solve people’s problems (in person and online) which makes me feel like I’m doing a great social service.

Journalists have a big opportunity in the marketing, social media, content strategy, storytelling and advertising space — if you are on the fence, I encourage you to take the leap.





Source link

قالب وردپرس

Continue Reading

Trending