Twilio (NYSE:TWLO) took a hit last year after one of its key customers decided to explore other cloud communications platforms, raising questions about the company's ability to sustain its rapid growth. But 2018 has turned out to be a strong year for the company, as Twilio stock is now trading close to all-time highs after gaining over 250% so far this year.

Investors are now probably wondering if it is still a good idea to hold Twilio or if they should book profits given its sensational rise. Given that there are clear signs that the cloud communications specialist can scale new highs and deliver more upside, I'd lean toward the former course of action.

A hand drawing a rising arrow with a black marker.

Image source: Getty Images.

Satisfied customers spending more

The simplest reason Twilio looks all set to sustain its momentum is because its solutions are a hit with customers. This is evident from the rapid growth in the number of Twilio's active customer accounts, which shot up 32% year over year to 57,350 in the quarter that ended in June.

The more impressive stat, however, is that the company's revenue jumped 54% annually during the quarter. So Twilio's revenue grew at a faster pace than its customer base, indicating that its existing clients are spending more money.

According to Twilio, its dollar-based net expansion rate increases when an active customer account increases the usage of solutions within the same application or buys a new product. So this metric can be used as a yardstick to determine the stickiness of Twilio's products, as well as the company's ability to drive more business within existing accounts.

The good news is that this metric has been picking up the pace lately.

Chart showing growth in Twilio's customer base.

Data source: Twilio, Chart by author.

Twilio's dollar-based net expansion rate was 137% during the second quarter as compared to 131% in the prior-year period. As you can see from the chart above, the company witnessed a slowdown in customer spending last year. But it has managed to turn this around thanks to aggressive marketing strategies and smart product development moves that have boosted customer acquisition and cross-sales.

A weakness addressed

Twilio has burnt its hands before by relying too much on just one customer for its revenue. The company was getting 17% of its revenue from Uber at the end of 2016. So the ridesharing specialist's reported decision to either develop its own cloud communications platform or outsource the same to other third parties spooked Twilio investors.

But that's not going to be the case anymore. Twilio's top 10 active customer accounts now supply 17% of the total revenue, down from 21% in the year-ago quarter. What's more, it's now locking in customers for longer time periods as the growth in its base revenue shows, which it considers a reliable indicator of future revenue trends.

Twilio's base revenue includes the money received from only those active customers who have struck 12-month minimum revenue commitment contracts. The good news is that Twilio's base revenue shot up 54% year over year last quarter, and it now accounts for more than 91% of the company's total revenue.

This combination of longer contracts and a bigger, diversified customer base that's spending more money on its products and services is setting Twilio up for solid top-line growth in the long run as its fortunes are no more dictated by a single account.

Stable margins

Twilio is a fast-growing company, so it is natural for it to spend big on product development and customer acquisition. Not surprisingly, its operating expenses shot up nearly 68% year over year last quarter. As a result, the company's net loss more than tripled to $24 million despite the massive jump in the revenue.

However, the company's gross and operating margins haven't crashed despite the increase in its expenses.

TWLO Gross Profit Margin (TTM) Chart

TWLO Gross Profit Margin (TTM) data by YCharts.

This margin performance can be traced back to the way Twilio is growing its revenue. Its strategy of creating a platform for contact center solutions helps keep clients within the Twilio ecosystem, and they end up buying the add-ons that Twilio provides.

For instance, Twilio's fully programmable Flex platform, which was launched earlier this year, allows developers to customize the contact center needs of an organization. The company has now made the Flex platform even better by acquiring Ytica, which will make contact center management easier for clients.

With Ytica, Twilio clients can customize contact center reporting, gain valuable insights with speech analytics, and boost the customer agent's performance with the help of workforce optimization software. So, Twilio now has one more product to cross-sell to its existing customers.

Sitting on a gold mine

The cloud-based contact center industry is still in its early stages of growth. Twilio estimates that the cloud has penetrated just 10% to 15% of the contact center market so far, but this is going to change in the coming years. The cloud-based contact center market could nearly triple in size in the next five years, according to one estimate, so Twilio is doing the right thing now by aggressively building its customer base.

Once it has established a solid client list, it can reduce its expenses and boost the bottom line. Analysts expect its earnings to increase at an annual pace of 20% for the next five years. However, Twilio can do better if it manages to sustain its current pace of growth, which should boost investor confidence and help the stock deliver more upside.

Harsh Chauhan has no position in any of the stocks mentioned. The Motley Fool owns shares of and recommends Twilio. The Motley Fool has a disclosure policy.