The retrofit is already coded , I would say it's plug and play but if you don't have experience with the retrofit it will require a little work , but over all not too difficult.

Here's what you get :

Coded NBT Headunit
IDrive Controller
Wireless Android Auto/Apple Car play module
Emulator module
Wiring Harness.
I'll provide after sale installion support , again it's not difficult just annoying at times
Wiring Diagram and installation instructions for the E39.

What you need to get:
BMW NBT screen ( easily found on eBay and cheap)
BMW display cable


There are various options for screen mounting and IDrive Controller options. The best would be from Speedhaven.com but I don't know if it's still in business.

https://www.ebay.com/itm/256925576372