Customer has desires which aren't fixable by off-the-shelf solutions OR customer is convinced it isn't fixable by an off-the-shelf solution. Customer is billed for work done either by x * hours or a fixed fee determined upfront (which contains x * hours with a margin for error in giving the estimate of hours upfront). Rinse and repeat.