Workers -- at least in many fields -- have the upper hand today. Job openings hit a record 6.9 million in July, according to Bureau of Labor Statistics data, and there are now more job openings than workers to fill them.

That's a situation that's only going to get worse for employers as seasonal hiring picks up. There's a labor shortage that's either here or coming, and that puts the employee in a good situation.

The news, however, is not all bad for employers. Even though many workers have options should they choose to leave, 82% have a high sense of loyalty to their current employer, according to a West Monroe survey of 2,000 full-time workers in the United States.

People working at desk in an office

Whether you work in an office or someplace else, the job market has likely improved. Image source: Getty Images.

Loyalty only goes so far

While employees do feel loyalty, there are limits. Almost half (45%) of those surveyed said they had applied for another job after a bad day at work. Perhaps most damning was that 59% of respondents said they would leave for a more appealing offer from a new company, even if they weren't initially looking to leave.

"Even the most loyal employees can harbor a wandering eye if they feel like other companies can provide them better support or career growth opportunities," wrote West Monroe's Michael Hughes. "This trend isn't great news for employers, because it's a huge drain on productivity and profitability for firms to invest in employees only to have them leave shortly thereafter."

It's not that workers are looking to leave -- roughly half plan on staying with their current employer for another five years or more, and more than 25% said it would take a 20% raise to get them to leave. Despite that, companies need to be wary -- for the right offer, people will leave.

What keeps employees happy?

In an employee-friendly job market, companies need to be aggressive when it comes to retention. Voluntary turnover -- people leaving on their own rather than being laid off or fired -- will cost companies more than $600 billion in 2018 according to Work Institute's 2018 Retention Report. The study also showed that each lost employee costs a company roughly 33% of the employee's base pay to replace.

Employees generally stay longer at larger companies, partly because they offer a clear career path. That's something that smaller businesses have to address directly and creatively in order to avoid losing workers who are happy but see no advancement ahead of them.

In addition, companies can evaluate the factors that keep workers at companies. Nearly half of respondents (45%) said the top reason they stay with their current employer was vacation or paid-time-off benefits. Health coverage was cited by 34% as their reason for staying, while 29% cited "work flexibility".

It's a two-way street

Companies clearly need to take steps to make sure employees are happy. That means talking with workers at all levels about their concerns and making sure people feel they have career paths ahead of them. In addition, managers and owners should address benefits and consider adding the perks that their employees most want. This could mean anything from adding vacation time to bumping up pay or allowing more flexible work hours.

As an employee, you don't have to wait for your company to come to you. If you're loyal and generally like your job, it's reasonable to address reasons as to why you might leave directly with your boss.

If both sides work together to address the situation, more people can stay at companies they are generally loyal to, but under improved conditions. That's good for the employer and the employee.