By Nina Trentmann and Mark Maurer

Salesforce.com Inc. is preparing to close what would be its biggest deal ever -- and it plans to do so with a new finance chief.

San Francisco-based Salesforce, which built a reputation around its customer relationship management software, Tuesday said President and Chief Financial Officer Mark Hawkins intends to retire from his role, effective Jan. 31.

The company on Tuesday also confirmed it would buy collaboration platform provider Slack Technologies Inc. in a $27.7 billion transaction.

Amy Weaver, president and chief legal officer at Salesforce, is set to replace Mr. Hawkins, who became CFO in 2014, on Feb.1. Mr. Hawkins will transition into an advisory role as CFO emeritus until October 2021, the company said.

Mr. Hawkins, who oversaw Salesforce's stellar growth to more than $200 billion in market capitalization, said he was grateful for his 40-year career in the technology sector. "I'm excited to begin my next journey -- spending time with my family, doing some volunteering, doing some incremental board work," Mr. Hawkins said on an earnings call on Tuesday.

Mr. Hawkins has had a long run leading finance organizations at software and technology companies, including as CFO of Autodesk Inc. and Logitech International SA. He also worked as a vice president of finance at Dell Technologies Inc. and as group controller at Hewlett-Packard Co., years before the company decided to split into two separate entities.

Salesforce Chief Executive Marc Benioff credited Mr. Hawkins with having been an important part of the company's success. "Mark, you set the foundation," Mr. Benioff said during the earnings call on Tuesday. "We all know it takes a great CFO to help scale a company that well," he said.

Ms. Weaver, Mr. Hawkins's successor, joined the company in 2013 as senior vice president and general counsel. Before her time at Salesforce, she served as senior vice president and deputy general counsel at Expedia Group Inc. and worked at law firms Perkins Coie LLP and Cravath Swaine & Moore LLP.

Mr. Benioff described Ms. Weaver as a trusted adviser. "My focus will be to support that momentum as we continue to grow, as well as to scale the business efficiently," Ms. Weaver said during the earnings call.

Salesforce's deal still has to clear Slack shareholder and regulatory approval, a process that is expected to take until mid-2021.

Analysts questioned the timing of Mr. Hawkins's departure ahead of the coming integration. "The Street would like a veteran like Hawkins to oversee the closing process and integration of Slack," said Dan Ives, a managing director at Wedbush Securities Inc., a financial-services firm. "It's the biggest deal they have done and they are losing their CFO," he said.

Salesforce has been acquisitive in recent years. It last year bought data-analytics platform Tableau Software Inc. for more than $15 billion in stock. In 2018, it acquired cloud-application builder MuleSoft Inc. for about $6.5 billion.

Salesforce declined to make Mr. Hawkins or Ms. Weaver available for an interview and declined to comment beyond its release and the earnings call. Slack declined to comment beyond its press release.

Adriano Marchese contributed to this article.

Write to Nina Trentmann at nina.trentmann@wsj.com and Mark Maurer at mark.maurer@wsj.com

(END) Dow Jones Newswires

12-01-20 2123ET