Salesforce is set to buy Fin, formerly known as Intercom, in a multibillion-dollar deal subject to regulatory approval.