This is pretty straightforward to do with a variable.
First, you want to set a baseline. So in your StoryInit passage you could put "<<set $Happiness = 50>>".
Then, in your story you want something like this in three different passages (Passage1, Passage2, and Passage3):
Text part of the passage where the customer speaks.
You could <<nobr>><<link action1>>
<<set $Happiness -= 5>>
<<if $Happiness <= 0>>
<<goto BadEnding>>
<<elseif $Happiness >= 100>>
<<goto GoodEnding>>
<<elseif random(1, 2) === 1>>
<<goto Passage2>>
<<else>>
<<goto Passage3>>
<</if>>
<</link>>, <<link action2>>
<<set $Happiness += 5>>
<<if $Happiness <= 0>>
<<goto BadEnding>>
<<elseif $Happiness >= 100>>
<<goto GoodEnding>>
<<elseif random(1, 2) === 1>>
<<goto Passage2>>
<<else>>
<<goto Passage3>>
<</if>>
<</link>>, or <<link action3>>
<<if random(1, 2) === 1>>
<<goto Passage2>>
<<else>>
<<goto Passage3>>
<</if>>
<</link>>.<</nobr>>
Just change the text at the top for the customer's comment, the descriptions of the player's possible actions, and the passage numbers in the code so you don't go to the passage you're already in, and that should do the trick.
Also, read through the SugarCube documentation if you have any questions on the above code.
So, that's one really simple way to do it. With the code I've given you above, it shouldn't be too hard to make it into a more complicated method if you wanted to.