A Walmart store is seen in Encinitas, California, April 13, 2016. Reuters

Walmart is embracing technology as it competes with Amazon. The company is reportedly developing a facial recognition system that identifies whether a customer is unhappy, according to a patent filed by Walmart.

The patent application published this year shows the retailer is developing a facial recognition system that identifies a customer’s dissatisfaction. The Wall Street Journal first reported the patent on Wednesday.

Read: Amazon Could Launch Stand-Alone Messaging App 'Anytime,' Here Are The Possible Features Included

"It is easier to retain existing customers than acquire new ones through advertising," Walmart explained in the patent filed in 2012. "Often, if customer service is inadequate, this fact will not appear in data available to management until many customers have been lost. With so much competition, a customer will often simply go elsewhere rather than take the time to make a complaints."

The system would include a camera directed towards a “point of sale (POS) queue of a store.” The video feed would be received by a computer system which would identify people in the footage. The system will be able to identify unhappy customers through biometric data and could generate a customer service action if a person is dissatisfied.

“A customer service action may include an alert transmitted to a representative of a merchant,” the patent said. “A customer service action may additionally or alternatively include a message transmitted for display to an on-call employee, the message instructing the on-call employee to come to the store.”

Read: iPhone 8 Facial Recognition Feature: Apple Patent Details Advanced Biometric Technology

Meanwhile, some Walmart locations are testing touch screens that allow customers to process returns, according to the Journal. Other touch screen displays the company is testing shows shoppers the difference between gadgets like Wi-Fi connected speakers and thermostats, which takes the responsibility of a sales associate.

"We don't need an associate to understand how that works, but the associate is there to service customers and check them out," Judith McKenna, Walmart's U.S. chief operating officer, told the Journal.

However, cashiers might be in less demand for checking out customers. Walmart is said to be replacing its cashiers with self-checkouts, which are becoming a larger share of total registers at stores, a source familiar with the strategy told the Journal. Positions at Walmart locations are now switching to support new services, like grocery pickup for online orders.

The company is also replacing employees with Cash360 machines that counts eight bills per second and 3,000 coins a minute. The machine uses software to predict how much cash will be needed that day and digitally deposits money at the bank, faster an armored car.

The Cash360 machine replaced employees who counted cash and tracked the accuracy of the store’s books for $13 an hour. Nearly all of Walmart's 4,700 U.S. locations now have a Cash360 machine, which means thousands of employees who did that job are no longer needed. Instead, those workers were switched to store jobs to boost customer service, while 500 left the company.