NOTE: what follows assumes you have a typical "dumb" key that is inserted in the ignition to start the car and NOT a smart key with push to start.
Short answer, yes two things must be programmed which have nothing to do with the metal portion of the key.
1: Programming of the car to recognize the fob unit (portion of the key with the buttons on it) for locking/unlocking the doors.
2: Programming the car to recognize the RFID chip that is also in the fob portion allowing the car to start.
The metal portion of the key then needs to be cut to physically operate the ignition cylinder lock and door/tailgate/glove box locks if you need to.
Watch this YouTube video from Tom's Key. It explains a lot.
https://www.youtube.com/watch?v=frn3ORUE3Kc
I am currently waiting on the delivery of Tom's Key programmer to program 2 fobs I purchased off of Amazon for $30. When I bought my T4R 2 weeks ago it only came with 1 buttonless key that has an RFID chip in it and that is all. I have to use the key in the door to unlock it. I had a spare key cut to be able to unlock the doors if me or my wife locks the key inside but it will not start the car.
The stealership pricing is absolutely ridiculous. My local stealership wants $260 per key and $175 to program them. They will not program any aftermarket keys obtained elsewhere, only genuine Toyota keys. They claim that they have not had success with aftermarket keys.
Your dealership telling you they have a key in stock that will work in your car only means they have a blank that needs to be programmed and cut.