Funding a startup is a tricky business. For every story of a Facebook or Zynga where the founders got the cash and kept full control of the company you can hear scores in which investors become the boss and founders essentially turn into employees.

Unless you have the net worth to swing a sizeable loan, if you need a lot of cash to get your business off the ground, you generally have to give up equity. The question becomes whether your brainchild becomes someone else's property. Even if sales take off, if you don't go along, you may not get to stay. And if things don't go well, there may not be the cash to keep moving until things turn around. That's become a big issue with the deflation of the unicorns, as once high-flying startups suddenly find themselves worth a lot less than the founders thought.

So it was interesting to speak with Dan Burton, CEO of Health Catalyst. The company provides data warehousing and analytic tools to the healthcare industry. So far they've raised $165 million in capital with the company retaining $140 million and $25 million a sales of shares from founders to investors. Some of his experiences are great tips for entrepreneurs trying to make their dreams happen.

Operate from principle

When you have something to guide your decisions and actions, it can help prevent you from getting seduced to do something foolish. "We've identified four operating principles and three cultural attributes that form our operating manual, our hiring formula and our retention formula," Burton said.

An important one is staying focused on customer success. The company doesn't provide commissions for sales people and makes decisions that keep client interests in focus.

Another principle is the interest in transforming healthcare, not just making money. "A lot of VC-backed companies end up exiting by being acquired," said Burton. "We believed we could not accomplish our mission if we got acquired. Even well intentioned acquisitions almost never end up working out. We've telegraphed that we're not open to the path." Investors who want a short-term don't get to put money in. "We're only a good investment if you believe this company in the long term is built to last and accomplish its mission."

Stay reasonable

"I got some great advice a long time ago from ... my second year entrepreneur professor at [Harvard Business School]," Burton said. "His advice was to leave a little money on the table for partners and make sure you treat everyone fairly in negotiations because it comes back. We focused on a valuation that felt fair, that recognized progress, but left some money on the table so whoever invested at whatever stage has an opportunity for a great return."

Beyond making sure that investors can ultimately make money, Burton and his team also focuses on the interests of team members. "We err on the side of generosity in compensation," he said. "We aim at the 65th or 70th percentile."

Watch how people behave

Health Catalyst focuses on win-win deals. Not only is it important for the investors, but for the company itself. More often than once, Burton and his management team have seen "that an investor is willing to write a term sheet on a higher valuation than we were seeking but display behaviors in word or deed that were not win-win." In that case, don't do the deal.

Create investor demand

"Every round where we've raised capital, we've erred on the conservative side of valuation," Burton said. "We wanted to err on the side of being over-subscribed at a price point where there was much more demand than supply." When you have more potential investors than you need, you can be choosy. "We've maintained clean terms along the way and been fortunate to have investors who are very supportive and long-term focused," he said.

Build relationships

"We've been fortunate in each of the realms of capital that we raised, we started with a tremendous partnership with Sequoia Capital as a first investor," Burton said, calling them "very classy, very long-term focused, and ... a very good partner to us." To find further investments, Health Catalyst worked from personal referrals and recommendations. The result was typically potential investors who knew where the company stood. "We saw a few cases where an investor got aggressive with a few terms, but usually the screen process was pretty good," he said.

Bring in the customers

In a b-to-b company like Health Catalyst, getting customers as investors can be a smart move. They have an interest in long-term relationships and want to see your firm succeed because they depend on the product. "We find that in the healthcare industry, with the mission that we have to really see outcomes improve, our missions are so tightly aligned with our customers' missions that they make a strong investor for us," Burton said.

Get the right structure

Sequoia and Norwest Venture Partners have been two major investors in Health Catalyst. "Those investors still have certain rights as large investors that have put a lot of money into health catalyst, and I respect those," Burton said. They've earned those rights. We would never feel good about crossing them in a way that they'd feel was unfair and they've reciprocated."

However, the company has protected itself. "Even the two of them added together don't get to that majority level [of share ownership]," he said. "It's a given that there should be a healthy contention between different stakeholders because of the different things they bring. But it's always respectful and it's productive." And with enough stakeholders, it's less likely that the varying interests will turn into a majority to radically change the company's strategic direction.