Salesforce.com (CRM - Get Report)  announced Wednesday it has entered an agreement to buy enterprise cloud-commerce company Demandware (DWRE) for $2.8 billion.

Demandware's shares surged more than 55% in premarket trading on news of the sale. The stock traded higher Wednesday to $74.76 per share, up $26.76 per share from its Tuesday close of $47.99.

San Francisco-based Salesforce will pay $75 a share in cash for all of Demandware's outstanding shares. The sale is expected to close in the second quarter of Saleforce's fiscal year 2017, ending July 31, 2016.

"Suffice to say, Demandware can be a very lucrative company when combined with Salesforce because Salesforce wants to know the customer," said Jim Cramer, TheStreet's founder. "But if you're going to know the customer, you got to know it end to end, and the one area that [Salesforce] did not have is the interface between the business and the consumer, the B2C. This [acquisition] gives them that."

The acquisition is expected to increase Salesforce's fiscal year 2017 total revenue by $100 million to $120 million. The second-quarter guidance for revenue in the second quarter is expected to be between $2.005 billion and $2.025 billion, an increase of between 23% and 24% year on year.

Second-quarter guidance on earnings per share is expected to be in the range of $0.21 and $0.22.

For the full year, the company has given guidance of a range of earning of $0.93 and $0.95 per share and revenue is expected to be between $8.26 billion and $8.32 billion, a 24% to 26% year-on-year increase.

The acquisition will give Salesforce customers access to an enterprise cloud-commerce platform, a statement said.

"A lot of what Salesforce is trying to do is capture all of your business, and they've been very, very good at it," Cramer said. "Salesforce wants to be with the consumer. The [acquisition] made sense."

Shares in Salesforce.com were down 2.40% in Wednesday premarket trading, and ticked down 26 cents midday Wednesday to $83.45 per share. The stock closed at $83.73 on Tuesday.