I ran into this same issue. The problem is that the documentation is incorrect. In order to set the values into the customVariable fields in the database, you use the SET ENTERPRISE INFO function. On the general tab, you will see 12 fields that can be populated. PeripheralVariable1 maps to CustomVariable1 in the database and so on. I faced this same issue today, and found this solution with some help. I have tested it and it works.
The set session info method specified in the documentation does NOT work. Don't waste your time banging your head against the wall trying to get it forced. TAC agreed with me on this today and has opened an internal case to get all their docs that reference this fixed.