It could be any one of the electrical connections talked about above.
The alternator keeps the battery charged; but not to just have battery power to start the truck, the battery is a power reservoir.
The energy, in the reservoir, is called for whenever the alternator can not keep up with the electrical demands.
The output form the alternator is high when the engine rpms are up, when the engine ides, the alternator output falls off; and, if the current demands are high )blowers, lights, speakers) the battery must provide the current the alternator can not provide.
So, you might have a weak battery.
One other possibility, the idle rpms maybe falling below the "normal" idle rpms. If the idle is falling below the normal, of about 625 rpm, the throttle body may need cleaning.