Seeing your company featured on the front page, above the fold of the Sunday New York Times in an article alleging bribery of government officials is among every compliance officer’s worst nightmares. One can only image the long days (and nights) facing the in-house team at Wal-Mart Stores Inc. right now. But in any corporate corruption case, the real in-house challenges begin long before the press or regulators get involved. The first order of business is knowing how your company will respond to credible indications that inappropriate payments have been made by employees to advance a business purpose overseas.

At this point, the Times story about possible bribery at Wal-Mart de Mexico only presents allegations, and little will be known about their accuracy and context for many months.

But central to the Times report is the internal investigation conducted by Wal-Mart once its executives had information that there might be violations of U.S. and Mexican corruption laws taking place. In this instance, and with the information we currently have available, it seems as though the course of the investigation was far from ideal.

Which leads to the question that your company’s compliance team should be asking: How does an internal corruption investigation unfold in a perfect compliance world?

Counsel may hear rumors of inappropriate payments from a hotline, from nervous colleagues of the employee making the payments, from internal auditors, competitors, gloating government officials, and countless other potential sources. What they do next sends a message about how seriously the company takes these allegations and whether executives really want to know the details—or would prefer to be left in comfortable ignorance.

Allegations need to be handled promptly, seriously, and sensitively. This is the stage at which an employee, unhappy about an inadequate response, is most likely to consider reporting directly to the Securities and Exchange Commission and hoping to get a Dodd-Frank whistleblower bounty (10 to 30 percent of any fines and penalties ultimately assessed). Most employees want to do the right thing within the company, but many will look elsewhere quickly if they feel marginalized or rebuked—which of course can trigger other legal problems.

Until some initial questions have been asked, it’s impossible to assess the scope of the problem and determine the resources that will be needed for an investigation. In this process, in-house counsel will develop a strong sense of whether any misconduct has occurred and/or is ongoing. Ending any illegal payments should be a top priority at this point. Past conduct will take some time to disentangle, but this is the time for a crisp line in the sand. Arguments that an abrupt end to payments will lead to business disruption or lost revenue should carry no weight. If a company agent is implicated, check any relevant contract and—fingers crossed—determine whether it contains antibribery warranties and covenants. Exercise any right you may have to audit the agent’s books and records, and instruct your accounting team to put a hold on any outstanding payments to the agent until the facts are confirmed.

Instructions to all relevant employees to preserve documentation should be communicated as quickly as possible. Rumors spread fast within companies, and no one should have time to delete emails or text messages or destroy documents. Companies need to work closely with local employment counsel to understand their options with respect to employees implicated by the allegations. In many jurisdictions, immediate termination isn’t an option under local law. In those jurisdictions where it is, it may be unwise—there is little chance of cooperation from a witness who no longer hopes to hold on to his job. A plan for the employees involved should be developed well in advance of any interviews—this is not the time to be devising new policies.

If, as in the Wal-Mart de Mexico case, the allegations are focused on remote divisions of a company, counsel should get to the offices in question as quickly as prudently possible. Serious investigations cannot be conducted by phone; email has the additional disadvantage of creating more documentation to manage, and presents complex privacy issues when communications cross international borders. If a company wants to send the message that it’s serious about compliance, flying in the appropriate person or team from headquarters is key. Lawyers directly responsible for the business unit in question should be interviewed, but should have no oversight role in the investigation (this was a fundamental mistake made in the Wal-Mart investigation). This first-stage investigation can be done by in-house counsel if there is sufficient capacity, and most companies staff initial inquires internally. Based on this preliminary assessment, a decision usually can be made quite quickly as to what can be handled in-house and what should be delegated to outside counsel.

The communications team should be brought on-board immediately. The reputational damage from a bribery scandal can be as worrying as the legal implications. If news of the allegations leaks prior to completion of the investigation, the company should be prepared to respond in both the U.S. and the country where the payments were reported. Whatever else is ultimately learned about the Wal-Mart story, the way the news broke and Wal-Mart’s almost grudging response were not ideal.

What will follow this initial effort will depend on what the company confirms or uncovers. There are often months of interviews and mountains of documents to review. Some remedial measures can be implemented as the need for them is identified; others will require a more comprehensive rollout. Local law experts should be consulted about everything from data privacy and labor concerns to the domestic antibribery enforcement regimen. Decisions will have to be made about disciplinary action at all levels for varying degrees of culpability. Remedial training will almost certainly be necessary to clarify company policy and ensure that employees have an opportunity to ask specific questions.

The good news is: eventually, companies do emerge from such scandals. And, if they’ve handled them candidly and well, they may even enjoy a better reputation and more credibility as a result. But how the story ends for your company will largely depend on the commitment and preparation of your internal compliance officers well before the tale begins.

Alexandra Wrage is the president of TRACE, a nonprofit antibribery compliance organization offering practical tools and services to multinational companies. She also serves on the Independent Governance Committee of the Fédération Internationale de Football Association (FIFA), football’s governing body. Prior to founding TRACE, Ms. Wrage was international counsel at Northrop Grumman.