Learning how to say no

Long story short, I went to a store with my relatives. A pesky salesman at the front was trying to sell the company's solar panel system. I said "maybe next time." He said that I might as well since I was already there. I said we were in a hurry. He said, "What section are you going to? Do you have an appointment?"

I pointed to a relative I was with and said, "I don't know. It's up to him."

He continued pestering me and even put on an arrogant smile as if he was being amused.

The situation was infuriating to me because I generally try to be nice to these salespeople when I turn them down. I've even done the same for "bible study groups" who approached me and wanted me to join them. I don't straight-up say I'm not interested.

So I've learned my lesson. I absolutely have to be stern and direct about not being interested. Maybe they'll pester me even more, but at least I would have made it clear in the beginning.

I guess I struggle with this because I'm a people pleaser and I hate the idea of hurting people's feelings. I think I know what to do, but does anyone else relate and/or have any advice regarding this?