Things were looking bleak for Manny Medina's tech company.
With just two months' worth of cash left in the business's bank account, his three co-founders were giving up hope.
While Manny, the chief executive, was pounding the streets of San Francisco in late 2013, desperately trying to secure new customers and investors, back at the firm's base in Seattle his three co-founders were putting everything up for sale. They expected the firm soon to go bankrupt.
"I phoned back, and they said they were listing the computers and everything else on eBay," says Manny. "We were all depressed. We'd been running the company for four years, and it just hadn't taken off, we didn't have anything to show for it.
"But I told them to stop. I had an idea to pivot the company, to give it one more roll of the dice."
The four friends had been running a business called Group Talent, which sold a software system that aimed to better link job vacancies with job hunters. The problem was that not enough recruitment firms wanted to buy it.
But with funds at Group Talent running perilously low at the end of 2013, Manny discovered that the recruiters were actually interested in one part of the software - its ability to easily organise and send out automated emails.
"Quite a few potential customers said they would buy that bit," he says. "So I realised we should just focus on that, and I convinced the guys that we should give it one more shot, and that is how we launched the new business - Outreach."
Fast forward to today, and Outreach is valued at $1.1bn (£840m), and has more than 4,000 business customers around the world. "I just had that glimmer of hope that things would work out, and we shouldn't quit," says Manny, 46.
Born and raised in a middle-class home in Ecuador, South America, Manny's first job was helping out every summer on his family's shrimp farm. He first moved to the US aged 21, to do a degree in computer engineering at Stevens Institute of Technology in New Jersey.
As his English was "fairly poor" at this stage, he says he coped in lectures and classes "by writing things down furiously, and asking lots of questions." However, he adds that "dating girls was really hard." To improve his English, he says he avidly read the Economist newspaper.
After Stevens, Manny did a masters in the same subject at University of Philadelphia, before going to Harvard Business School to do a masters in business administration. The corporate world then followed, with two years at Amazon, and six at Microsoft.
But worried that he was "not fulfilling my full potential" in life, he quit in 2011 to launch the first business, Group Talent, with friends. "I became the CEO because I was the only one who didn't code. I looked after making the coffee, and taking care of whatever distractions needed sorting out."
After four years of toil and struggle, Group Talent was retired in 2014, to the replaced with Outreach, and its focus on automated emails. Yet while Manny had a number of firms interested in buying it, he still desperately needed to find investors.
So he continued to travel around San Francisco and the wider Silicon Valley area to try to convince potential backers.
"I made a list of people who had invested in similar technology, and I set up lots of meetings," he says. Soon investments started to trickle in, with more than $600,000 raised in six months.
Manny also stepped up efforts to sell the new, refocused software. While it was originally targeted at recruitment consultants, he says he soon realised that it could equally be used by sales staff across all industries, which was a far larger group of potential buyers.
So he would set up face-to-face meetings with sales representatives, who started to use Outreach's software to enable them to contact more potential customers of whatever they were selling, and therefore give themselves an advantage. Sales grew quickly to more than $1m within the first year, thanks to positive word of mouth.
While other companies also sell automated contact systems, Manny's pitch to buyers was that Outreach was simpler to use, and more effective.
Last year it received $114m in investment, which gave it the $1.1bn valuation. In 2019 it was also named the fourth fastest-growing technology company in North America by Deloitte's 2019 Technology Fast 500 list. The company now has 450 employees.
Julie Bort, chief technology reporter at US business news website Business Insider, says that Manny and Outreach's story shows how vital it is for a company to really establish what its customers would want to buy.
"Manny Medina and Outreach's success proves that finding that big idea for a company is all about solving other people's problems, rather than a light-bulb moment," she says.
Looking forward, Manny says the plan is simply to keep growing the business. "We went through hell before we set up Outreach," he says, "but I knew we could make it if we just pulled through."