In the book named “Hooked” , Nir Eyal makes a mention of Fogg’s Behavioral model that goes a long way in helping product manufacturers design habit forming products.
The formula is B = MATÂ where behavior of an user is a function of the following three parameters
B = behavior , M = motivation , A =ability of the purchase & T = trigger provided