Updated

Dunkin’ Donuts is now testing mobile ordering and delivery service in select U.S. markets.

Yesterday, the coffee chain rolled out its ordering feature-- accessible through its smartphone app—for 124 locations in Portland, Maine which allows customers to order coffee drinks and food ahead of time. In Dallas, 19 cafes are now offering coffee and pastry delivery from Dunkin’ Donuts through third party service Door Dash. The company says online orders are usually delivered in 45 minutes or less.

In September, Dunkin’ competitor Starbucks expanded its mobile Order & Pay service nationwide, which currently allows customers to pay ahead and skip the line for over 7,400 U.S. locations. The chain is rolling out the service to coffee shops across the U.K. and Canada this fall.

"The morning space and the coffee space are incredibly crowded," Scott Hudler, vice president of global consumer engagement, told Bloomberg. "Speed is one of our brand differentiators."

Dunkin’ Donuts announced that it will soon expand its delivery service to locations in Atlanta, Chicago, Los Angeles and Washington.

The coffee chain is looking to boost profits after suffering its worst stock decline since going public in 2011 last month. Dunkin’ is facing even more competition in the morning as Taco Bell and McDonald’s expand their breakfast programs. The chain has also struggled with technology. Earlier this fall, the chain’s app crashed after a coffee giveaway promotion tied to the start of football season had too many users.

Still, the move to expand digital ordering signals an important trend in the way restaurants hope to engage and retain customers.

"This is how the next generation of consumers are going to engage with brands," said Hudler. "This is the future of the restaurant business."