Cloud communications provider Twilio said Monday it is acquiring Segment, a customer data infrastructure company, for $3.2 billion in Twilio Class A common stock.Shares of Twilio jumped more than 4%. The stock also briefly reached an all-time high of $322.68 per share.”Together, Twilio and Segment have an incredible opportunity to build the customer engagement platform of the future,” said Peter Reinhardt, Segment’s co-founder and CEO. “We created Segment to help businesses set themselves apart in the digital age and deliver rich, connected customer experiences built on high-quality data. By joining forces and applying our customer data platform to Twilio’s engagement cloud, we’ll be able to make the entire customer experience seamless from end-to-end.”The deal is expected to close in the fourth quarter of this year.”The segment has been growing like crazy, but the exciting thing for us is we get to accelerate our vision by five to 10 years,” Reinhardt later told CNBC’s “Squawk Box.”Many cloud companies have seen gains this year as schools and companies have had to rely on online services to keep people connected during coronavirus quarantines. The BVP Nasdaq Emerging Cloud Index, which includes more than 50 publicly traded cloud software vendors, is up 82.8% this year.Twilio stock has also been on a tear. It reached a 52-week high on Friday, jumping to $310.64 per share. Shares of the company have gained more than 211% year to date.Earlier this month, Twilio said in a filing that it anticipates more third-quarter revenue than the $401 million to $406 million range it provided in August, sending its stock higher. Analysts polled by Refinitiv had expected $407.9 million in revenue for the third quarter.The Segment deal is Twilio’s second major acquisition. It acquired SendGrid, which offers companies a cloud-based service for sending emails at a large scale, for $2 billion in February 2018.Subscribe to CNBC on YouTube.