SPS Commerce Inc. said Wednesday it bought ToolBox Solutions, a Canadian data analytics firm, for about $23 million in cash and stock.

The deal gives SPS, a Minneapolis-based provider of data management products for retailers, a foothold in the market for convenience, drug and grocery stores.

ToolBox, based in Toronto, helps those smaller stores analyze their business at the point of sale. SPS Commerce chiefly helps midsize and large retailers keep track of inventory and products that are in warehouses or quickly available to them from suppliers.

In a statement, Archie Black, chief executive of SPS, said the information ToolBox collects when consumers buy something is useful to the firms that warehouse and deliver goods.

“Retailers and suppliers need rich insights into consumers’ purchase behavior, both in store and online,” Black said in a statement.

SPS Commerce paid $18.4 million in cash and $4.5 million in stock, or about 65,000 shares, for ToolBox Solutions. The total includes $1.1 million of stock that is subject to performance incentives.

SPS Commerce said it expects ToolBox will add $6 million of revenue in its current fiscal year and will reduce its earnings before taxes by about $800,000. The company said ToolBox should be a contributor to pretax earnings in 2017.

SPS, which will report fourth-quarter and full-year results for 2015 early next month, is expected to show revenue of around $160 million for last year.

The company’s stock was trading 2.8 percent lower at midday Wednesday.