Sally didn’t want to open the email. She knew it would come eventually, but it filled her with dread anyway. After months of working from home, it was clear her time was up. No, she wasn’t getting fired. She was getting called back to the office.

While many companies are still hoping to keep employees home until early next year or later, scores of organizations in finance, retail, technology, real estate, and other sectors have recently stepped up efforts to reopen offices and bring staff back. But in the process, many have struggled to decide who returns and who remains remote—relying on a complex and ever-changing calculus of business priorities, team needs, personal preferences, and legal ramifications.

To date, it isn’t known how many employees are being asked back. In one recent Korn Ferry survey, more than one-fifth of professionals said they were going to be back in the office after Labor Day, while another 31% said it was possible. Some financial firms have cited higher figures on how many they have returned. Either way, while trying to balance sensitive issues, business leaders know few workers want to be back first. “The business need is the largest constraint employers face in determining what is feasible,” says Joseph McCabe, vice chairman of Korn Ferry’s Global Human Resources Center of Expertise.

Driving revenue may be a priority, for instance, but given social-distancing requirements, would the sales or marketing team benefit more from the brainstorming and ideation that comes with physical proximity? What if, however, out of safety, health, or childcare concerns, not everyone on the marketing team can or wants to come back? And what legal liability does an organization have if it keeps the client-facing senior partners, who happen to be all men, remote, while their administrative staff, most of whom are women, need to return to the office to interface with IT, finance, and other support staff?

Indeed, gripped by fear of a deadly pandemic and now fully comfortable working at home for months, employees at all ranks are openly questioning plans to return to an office environment—plans that CEOs and other leaders see as a critical step for returning to normal operations. Ronald Porter, a senior client partner in Korn Ferry’s Global Human Resources Center of Expertise, says leaders need a framework to sort out issues and resolve accusations of unfairness in deciding who they want to bring back. “Where things get tricky is when exceptions are made,” says Porter. “Conflicts could certainly arise.”

From a legal perspective, Porter says organizations have protection, provided the decision is based on the nature of the role rather than the person occupying it. Put another way, employees in similar roles should be treated similarly. Still, despite the fact that organizations have wide latitude to require people to work from a certain office as a condition of employment, some are turning to technology in an attempt to eliminate bias, solicit sentiment on who is and isn’t willing to return, and keep tabs on workers’ health.

The return movement comes at a time when at least some health experts worry that a second surge of COVID cases will emerge as the colder season returns in many parts of the United States. Already, experts say, a few firms that reopened quickly ended up sending some workers back home after an employee tested positive.

For his part, Mark Royal, a Korn Ferry senior director focused on employee engagement, says creating a feedback loop is critical to learning and understanding employee experiences so leaders can make adjustments before additional employees return. Think of it as akin to the onboarding process, except with a focus on health and safety. Moreover, Royal says, it’s important that leaders create a recognition and reward system for those in the first wave of returnees.

“Returning employees, especially those in the returning vanguard, need to feel comfortable,” he says. “That’s not going to be an easy task for leaders.”

Sign Up for our 'This Week in Leadership' email