There’s nothing more depressing than launching a new product or service and seeing it tank in the marketplace. That happened to Pat Flynn, the host of the successful podcast Smart Passive Income, when he launched an ill-fated software venture a few years ago. While many of his other business lines flourished, his tech foray ended up costing him $15,000 -- a painful lesson.

“In the past, you’d build a business, shout it from the rooftops, and say, ‘Buy my thing!’” he says. “But if they didn’t buy the thing, you’d wonder, was the problem with the thing itself? Or the way it was talked about? Or the night you were on the roof?” You’d never exactly know why something worked or didn’t, and you certainly couldn’t predict in advance what would succeed. But that’s all changed with the focus in recent years on product testing and validation, fueled by Tim Ferriss’ The 4-Hour Workweek and Eric Ries’ The Lean Startup.

To ensure your new product or service will succeed, says Flynn, you need to validate whether your audience wants it and also whether you’re the right person to do it, or what Flynn refers to as the “idea-to-self fit.” Before investing a lot of time in an idea, he says, you need to determine “how it plays a role in what you want to do in life, and how it complements your trajectory and what you’re good at. Many of us latch onto the first idea we have, and we go with it because it’s low-hanging fruit, but it’s not necessarily the best one to pick.”

He recommends asking yourself, “What would make you say, ‘Life couldn’t get any better – it’s perfect?'” This involves mapping out your five-year priorities not just for work, but also family, finances, and health. Says Flynn, “This helps me easily make decisions that might otherwise be hard. I could make a lot more money if I were doing different things, but why do it if it doesn’t fit into the plan I have for five years from now?”

He also suggests looking in detail at your previous jobs and listing out the specifics of “what you liked and disliked about them, because now you can see what patterns there are, and you can make sure your new idea doesn’t work against” your clearly established preferences.

Finally, he asks readers to imagine themselves pitching to the Shark Tank judges and answering the question “What’s unique about you, and what are your unfair advantages?” Knowing these key elements will enable you to be sure the idea is right for you. But that’s only half the battle, of course – now it’s time to test whether other people will value it, as well.

As Flynn describes it, determining product-to-market fit looks like this: “You get in front of your audience, hyper-target them, and get them to raise their hand and say, ‘Yeah, I have this problem.’ Then, you talk to them and are honest with them: ‘I’m looking to potentially solve [your problem] with this idea, but I don’t have it built yet. I need to know for sure if people are interested in this. If I get 10 people to pre-order, we’ll greenlight it. You’ll get a discounted price and will be able to influence it because you’ll be here when I create it.’”

In other words, before producing the product and then trying to sell it, you approach your audience and start a conversation to see if the idea interests them. If yes, you ask them to pay in advance (the only real way to tell if they mean it) and, in exchange for their trust, give them a lower price than others will subsequently have access to, plus the opportunity to weigh in as you create the product to ensure it meets their needs as closely as possible. Even if you don’t already have your own audience, Flynn discusses several other ways to reach potential customers in the validation process, such as using online forums, social media platforms, or guest posting for colleagues with an audience similar to the one you’re seeking.

Launching a new product or service can be expensive. Nothing is certain, but following the steps Flynn lays out – determining whether the product is a fit for you personally, and then whether it matches your audience’s needs – will save any entrepreneur time, money, and heartache.