As Zorkaz said, the barter menu is tied to actors but what you can do is to create a dummy NPC whose sole purpose is to act as a vendor when your vending machine is activated.
1. Create a dummy vendor NPC and a vendor faction.
(I have the "essential" and "unique" boxes ticked here, but this is completely unnecessary.)
2. Create a dummy interior cell to house this dummy NPC vendor and the vendor chest.
The cell doesn't have to be functional. Just something to hold the NPC and the chest.
3. Create an activator to access this dummy vendor NPC.
The vendor NPC and the activator share the same name for consistency when bringing up the barter menu.
4. Attach a script to this activator.
This script example plays a sound FX, and then opens a barter menu with the dummy vendor NPC. I think I had to disable player control while the sound FX played so that the player won't move once it is activated.
Once this thing is activated in game, it will directly show the barter menu associated with the dummy NPC.
I hope this helps.
Edited by DiodeLadder, 07 September 2021 - 03:02 am.