Cloud communications platform provider Twilio Inc plans to buy customer data infrastructure company Segment for $3.2 billion, Forbes reported on Friday.