I thought I would make millions of dollars through my startup, but I failed miserably.

I had read amazing stories of startups like Flipkart and Zomato, but nobody told me that 90% of new companies fail within two years of taking their initial steps.

I failed in my first year.

I sometimes feel cheated, but the fault is mine. I believed in just one side of the story, and so, I am going to tell you the other side—the secret behind the failure of first-time entrepreneurs.

In April 2013, I started getting uncomfortable in my office. It was a dull cubicle of an IT company in Gurgaon. I was pretending to fix defects when I was actually wasting time on the internet. My mind was taken over by thoughts of freedom from my boring job. And my manager and other colleagues could sense that there was something wrong.

I had just returned from the US a month ago, and I told my manager: “Sir, I need a little break to set up my home and adjust again in India.” My son was just six months old, and he was having issues adjusting to the Indian climate. I worked from home for a few days, but my real problem persisted: I was unhappy with my job.

I decided to put all my savings in my startup rather than buying a home.

I started thinking about leaving the job and building a company.

My brother-in-law—who was also unhappy with his job in a recruitment firm—and I started talking about setting up a business, even though we were unsure about the product. We were comfortable working with each other. I had saved a good amount of money by living frugally during my US trip, and I decided to put all my savings in my startup rather than buying a home.

We began by incorporating a private limited company, investing Rs5 lakh each, and dividing the equity equally. We found a basement office in Gurgaon with a monthly rent of Rs13,000. We spent another Rs1 lakh on renovating the space. We bought the furniture, air conditioners, an inverter, and a refrigerator.

We wanted to solve a problem related to schools because education is a billion-dollar industry. A child’s education is the second biggest expense for a parent, and we thought that any product for schools would translate into big profits.

We decided to create an ERP (enterprise resource planning) tool—an online software for schools to manage everything from fees, inventory, communication with parents, and so on.

Once we developed this idea, our next step was to hire a team. I was confident that we would be able to hire easily. We had everything to build a good team: an office, money in the bank, a hiring policy and, most importantly, a co-founder with a recruitment experience of more than 10 years.

We hired one person—a fresher open to learning new technologies for our cloud-based product. We needed a senior person to handle all the development work because my brother-in-law and I still retained our full-time jobs.

We started interviewing people. My co-founder analysed a pile of resumes, as he had access to all the major recruitment portals. We selected the best people, and interviewed them in cafes or restaurants. Our office was still under renovation.

We met several people for product development and design, but no one was ready to join a startup like ours. We were shocked.

“I could have hired 10 people for any other company by this time. I am not sure why people are not joining us,” my co-founder said.

“Maybe they will join after seeing our new office,” I said.

Since we both had worked at corporates, we spent a few days drafting a new hiring policy. Along with basic salary, we introduced company incentives based on revenue and an individual performance bonus.

Our office was ready in June. We moved in and resumed our hiring process. Someone told me to hire the initial team from my personal network, but none of my friends had a profile that matched.

Finally, I found a person in Chandigarh. We were impressed with his technical capabilities, but doubted his managerial and leadership skills. Still, we thought of giving him a try—and anyway, no one else was ready to join us. He was a costly hire. We offered him Rs60,000 per month plus company incentives if we made any revenue by the end of the year.

It was an exciting time. Our product was taking shape. The co-founders were spending hours on whiteboards discussing the features, and the developers were busy coding. We managed to hire a designer for about Rs25,000 per month, but we compromised a lot with his skill set and attitude. We were already feeling the heat of startup hiring.

We wanted to complete the product as soon as possible so that we could start selling.

Our first potential client—a known school principal—appreciated our idea and demo, but put us on hold till she heard from higher management.

Then, we started facing unexpected problems. Our junior developer was not performing up to our expectations, and we had to ask him to leave. With a team of just four people, we completed the first version of our product.

We were confident that our product sell once it hits the market. We included all the features of top ERP products in the market to beat our competitors, but we weren’t happy with the front-end design, and we were constantly looking for a better designer.

Our first potential client—a known school principal—appreciated our idea and demo, but put us on hold till she heard from higher management. We gladly sent her the sales material and thought we would deploy our software in a few months.

Six months into, the cost of product development was:

Company incorporation: Rs30,000

Office renovation: Rs1,20,000

AC/fridge/inverter: Rs40,000

Rent: Rs91,000

Salaries: Rs3,60,000 + Rs1,00,000 + Rs65,000

Travel, food, marketing material and others: Rs1,00,000

Total: Rs9,56,000

We were confident in our software, but to sell it, we had to leave our jobs. We were ready to take the risk. We put in our resignations. We decided to move our development office to Chandigarh where I would manage operations, and my co-founder would handle sales in Gurgaon.

It went well. Our senior developer was now spending more time in development than traveling between Gurgaon and Chandigarh. We saved money on office rental, and I saved money on my living expenses.

Then, in another surprise, our designer ran away with the laptop. We tracked him down and recovered the laptop, but we lost our only designer. I took the challenge and learned the basics of web designing. We revamped the entire design in one month. The product came out nicely.

Meanwhile, we started reaching out to schools. But none of the co-founders had a sales background. We struggled to get appointments. We found that principals had no decision-making power. The decision-makers were never available in the school. Most school administrators do not check or respond to emails..

We were unable to sell our product even though it cost much less than our competitors. We were devastated, and cried on each other’s shoulders. (The biggest benefit of having a co-founder in a startup.)

We found a few customers by leveraging references, but revenue was far away. My co-founder knew customers better than me. He said that few big schools would buy our product if we could implement a few more features.

I had a different opinion. I argued that we had enough features for any school, but that there was something missing in the sales process. I thought we should focus on small to medium schools, even if we make less money. Conflicts between co-founders began escalating.

We were running out of money, so we invested more of our personal savings into our startup. And then, we hired a sales person from a big competitor—our big mistake.

We felt that we’d found a silver bullet because he gave us access to our competitor’s product, and told us the secrets of selling to schools. We thought that finally “aache din aane wale hain” (The good days are about to come).

He worked with us for a month, but couldn’t crack even a single sale. We wondered what was wrong. Actually, he was able to sell in his previous company because of the brand name. He had never faced the heat of an unknown startup.

I was reading a lot of startup blogs and books. I started believing in lean startup methodologies and doing more with less resources.

We needed more money to survive. My co-founder was busy chasing big schools who could pay good money in advance. He also started establishing contacts with political and influential folks to win the deals. But we, the co-founders, were on different paths.

I was reading a lot of startup blogs and books. I started believing in lean startup methodologies and doing more with less resources. Unfortunately, my co-founder was still building our startup like a big corporate (alliances with other companies and politicians, hiring sales, and maintaining hierarchy).

I proposed to reduce our expenses:

Bring our only developer from cash to equity (up to 20%).

Stop chasing big schools and focus on small schools.

Target schools on the outskirts, which are relatively easy to win.

Fire the sales guy and spend all our time in sales.

But our vision and thoughts were not aligned. I knew that our relationship would be spoiled if we continued working together. We had long (and bitter) discussions on keeping the ownership and equity, but nothing came of it. Finally, my co-founder took over the company and promised to return my cash if the company made any profits in the future.

Expenses at the end of 11 months:

Initial six months: Rs9,56,000

Salaries: Rs3,00,000

Sales training: Rs30,000

Rent: Rs56,000

Travel, marketing, and others: Rs2,00,000

Total: Rs15,42,000

By now, we had wasted more than Rs15 lakh ($22,000) on a product that nobody wanted to purchase. After a few more weeks of struggle, my co-founder had to join a job. The end of the startup, SchoolGennie.

But I learnt some of the great lessons of my life:

1. Know your customer before building your product

The point should be clear by now. We built our product based on the assumptions and feature lists of our competitors. We should have talked to our customers before building our product.

We should have convinced two to three schools of different sizes to test our product. In exchange, we should have provided a lifetime free product and support for early-adopter schools. I should have validated my product before leaving my job.

2. Know where to spend money and where to save

We spent most of the money on office infrastructure and employee salaries. We could have avoided 80% of expenses by working from home and hiring employees on survival salary and ESOPs.

We avoided expenses on professional design of sales material, marketing tools, and paid consultancy. We should have spent money on these things since they translate into more sales or leads.

If the primary source of your customer acquisition is your website, then you should spend money on content marketing, sales deck, and sales pages. If you acquire your customers offline, then spend money on sales brochures and other printed material.

3. Get your hands dirty with the code, even if you are a non-techie

Non-technical co-founders remain clueless about technical know-hows. They should not behave like a foreign client who just assigns work and expects it to be completed by the technical team.

That didn’t work in my startup and it will not work in your startup. I advise you to start coding. There might be some exceptions, but a non-tech co-founder can take better decisions if he or she knows how things get implemented.

If you do not have a tech co-founder and are building a software product, then there is no exception.

4. Sell, even if you are from a non-sales background

The sales process is not just about good public speaking but addressing the concerns of the customer.

You can build a great product with a better understanding of your customer’s pain areas.

When I moved to Chandigarh, I tried sales in the local schools. I visited about 50 schools in one month and closed three deals. I not only learnt the sales process, but also got acquainted with customers’ real issues. You can build a great product with a better understanding of your customer’s pain areas.

Disclaimer: I am not suggesting that all co-founders should be doing all the things at all the time. No. They should be owners of their areas, but at the same time, they should have first-hand experience of all kind of jobs in a startup.

5. Take a decision and trust your intuition

We became bad at taking firm decisions. We started postponing tough decisions like the sales budget, hiring or firing, offering equity to the employees, deciding between chasing big schools and small schools, offering a free solution or charging premium and, in the end, on how to go our own ways.

Since the closure of my first venture, I started taking firm decisions based on the available information at that time. You can never have 100% data available for taking any decision. You should be smart enough to derive a conclusion with between 60% and 70% information and fill the gap with your intuition.

If you are confused with your decision, then you will not be able to execute with 100% confidence.

6. Money is just a by-product of a startup

We entrepreneurs start a venture to solve a customer’s problem (or to explore our passion), and money is just fuel for our startup vehicle.

If you focus on money, then you will become short-sighted. You can make money in the short-term, but you will lose strength in the long-term. Focus on solving problems and keeping your customers happy. The money will follow.

This post first appeared on Linkedin. We welcome your comments at ideas.india@qz.com.