The year 2015 so far has been somewhat harsh on the world's biggest retailer, Wal-Mart Inc. (NYSE:WMT). In its second quarter, ended in July, the company reduced its annual earnings forecast range from $4.70-$5.05 to $4.40-$4.70 owing to wage hikes and e-commerce investments. But from the long-term perspective, these measures could help Wal-Mart survive in the fast-changing world of retail.

Image source: Walmart.com.

Wage hike: The pain
Last February, Wal-Mart announced an investment of $1 billion for wage increases and employee training in the U.S. The exercise is being executed in three stages. In the first two, covering 600,000 employees (carried out in April and July), wages were increased to $9 an hour at entry-level, and $13 an hour for managers of complex service-oriented departments. The third phase in February 2016 will see the minimum wage rise to $10 an hour, and $15 an hour for managers. New employees will be given six-month on-boarding and training programs.

Wal-Mart expects wages hike to dilute earnings by $0.24 per share for the fiscal year ending January 2016, up from a previously expected $0.20 per share.

Wage hike: The gain
Properly stocked shelves, clean stores, and helpful staff could go a longer way toward increasing sales than just low prices. Together with low prices, Wal-Mart is focusing on giving its customers a good in-store experience, and better-paid associates is a step toward that.

During the second quarter conference call, U.S. Wal-Mart president and CEO Greg Foran spoke of the various initiatives the company is undertaking to improve customer service -- ensuring more registers are open during peak shopping hours; providing customers a cleaner, better-maintained shopping environment; adding more items, mainly in grocery; driving faster replenishment times to the stores; and ensuring the product is available. 

Foran said they are replacing "decade-old processes with modern technology and new routines" so that associates can spend more time on the sales floor "rather than in the stockroom." For instance, store managers have been given mobile tablets to stay in touch with the business and at the same time help customers and associates.

Benefits from such measures can't be overstated. Retailers such as Kroger and Publix Super Market have seen their same-store sales grow at a healthy pace while Wal-Mart struggled with flattish numbers. Customer service is Kroger's and Publix's main strength.

E-commerce investments: The pain
Wal-Mart's increasing spending on e-commerce -- from $1 billion in 2014-15 to a planned investment of around $1.2 billion to $1.5 billion in fiscal year 2016. It's acquiring tech start-ups (15 so far), building fulfillment centers, expanding its Pangaea technology platform, and integrating click-meets-brick (omnichannel). The incremental e-commerce investments are estimated to hit EPS between $0.06 and $0.09 for the fiscal year. 

E-commerce investments: The gain
Wal-Mart's big-ticket investments in e-commerce are essential to tap into the burgeoning world of online shopping. Online shopping in the U.S. amounted to $307 billion in 2014 and could reach $349 billion in 2015, according to the Centre for Retail Research. 

Though Wal-Mart's e-commerce sales are growing at double-digit rates -- in the second quarter, global online revenue grew 16% -- the company still has a long way to go. In fiscal year 2014-15, e-commerce sales increased 22% to $12.2 billion, but they were just 2.5% of total sales of $486 billion. 

This is where all the investments play an important role. Wal-Mart's technology platform Pangaea analyzes customer, operator, and merchant data, and helps Wal-Mart improve customer experience and convert clicks into sales for walmart.com. Acquired start-ups, such as mobile app Stylr will enhance Wal-Mart's mobile platform; Adchemy will help in search, data analytics and marketing; and Yumprint will pitch in for grocery-related plans.

For a better tomorrow
Wal-Mart's thrust is in the right place even if it causes the company temporary harm. Keeping workers happy and in turn polishing customer service will protect its present position. Future growth will come from e-commerce, which is a new territory for Wal-Mart, but the company's trying to master it. So, being a little patient instead of being anxious wouldn't be a bad idea.

ICRA Online and Eshna Basu have no position in any stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.