Salesforce.com Inc. shares declined in the extended session Tuesday after the cloud-based customer relationship-management company said it would acquire Slack Technologies Inc. in a deal worth $27.7 billion and topped Wall Street estimates for the quarter.