The fact that the previous battery terminal came off indicates that it was not properly tightened and secured. This can cause intermittent open connections; which will damage alternator diodes. Some replacement terminals require the insulation to be stripped from the end of the cable. All the insulation must be removed when this is done. If the installation of the replacement terminal was not properly done; or if the terminal bolt was not tightened to the point where the terminal cannot be moved by hand; or if there was an auxiliary ground wire on the original terminal, and the replacement terminal did not have this wire on it; or if the battery was not physically secured in the vehicle; it could cause electrical damage to the alternator.
If the battery is ever disconnected while the motor is running; it will instantly blow the alternator diodes.
If none of the above applies; but the alternator was purchased at a discount parts store; it often will be defective right out of the box. The problem here is that if you return it; the replacement is also likely to be defective. A lifetime warrany is pretty useless if it requires repeated alternator replacements and ongoing diagnostic hassles because the replacement parts are junk.
The only reliable way to avoid this trap (which people regularly write in here about) is to only buy replacement alternators and starters at a NAPA Auto Parts store. They are the only local source for properly remanufactured and thoroughly tested alternators and starters.