Some good advice in this thread already. Here's a rundown on my current process:
1. Check the Zoopedia for barrier class & height requirements, and the animal's space requirements.
2. Complete any terrain modifications & lay down my barrier, with the keeper gate.
3. Once the keeper gate is added, you now get a habitat menu when you click on the barrier. On the 2nd tab of that menu, you can now see exactly how big the enclosure is, so double check that against the animal's space requirements.
4. Send one animal into the enclosure.
5. Now that he's inside, give him a few seconds to run around and then pause the game. Click the heatmap on the bottom left corner while your animal is selected. On the 2nd option (looks like a shelter) make sure it's on "Traversible Terrain". The blue is where he can go. If any of the red icons appear, that's where he can escape. Use this to plug any gaps you might have.
6. While the game is still paused, animal is still selected, check the 2nd tab on him, where it shows the terrain paint levels he requires. Paint away until those requirements are met.
7. Again, game still paused, animal still selected, click on his foliage tab. Go to the Nature menu and filter those by his continent & biome requirements. Meet those requirements however you want. If this enclosure is right next to another one, this is a good time to check whether some of their foliage overlaps. You can do this by clicking on the barrier and checking the foliage menu from there. If you see any foliage in red, it's not right for the animals you have here. You can mouse over them to put a white outline around the foliage so you can adjust as needed.
8. Game is still paused. Plop down a shelter & bedding. Unpause the game for a few seconds while you go back to the heat maps and select the paw print, then "Shelter" from the drop down menu. This will show you what the animal is counting as shelter. Check that the shelter requirements are being met by clicking on the animal and checking in the 2nd tab. If you chose to use actual terrain as the shelter, you'll want to check this as part of #5, in case you need to do more terraforming.
9. Put down the animal's enrichment items, food, water, etc. I recommend that even if you have a river in your habitat, throw down one of those automated water pans anyway. This will at least eliminate the bug where animals can be swimming in a lake and die of dehydration.
10. Once everything is down, make sure you have your staff sorted out. I usually rename the habitat "Flamingo Enclosure", then either include it in another Work Zone, or create a new one and assign staff to it. By default, every barrier is set for the mechanic to only check on them annually. This is not enough, so click on the barrier, go to the far right tab, and change the mechanic to "Every 6 months". If you haven't researched the animal yet, assign a researcher to them now. Keep in mind that researchers have to enter the habitat every now & then to observe, so placing a research lab close to the animal you're researching does wonders.
11. Place down your education, your donation boxes, and make sure your guest path is in order. The "snap to barriers" option on the guest path works well if you want it snug against the barrier wall.
12. You can now unpause the game and finish decorating your enclosure. If you add things like rocks, trees, or anything that might effect the animal's traversible terrain and allow them to escape, then click on them and double check their traversible terrain again after placing. You'll need to have the game unpaused at least 5 seconds or so after placing the item for the traversible terrain to update.
EDIT: I forgot to add a very important step. I would usually do this right before I unpause the game, though it's not as critical, depending on the weather. Check the Zoopedia for the animal, and look at the Natural Habitat tab. Check the temperature range that the animal is comfortable in. Place appropriate coolers or heaters depending on their comfort range, and the temperature range of your zoo (which will be different depending on your zoo's biome). I like to give them about 4-5 degrees of wiggle room. So, for my temperature North American zoo, that gets snow about once a year, if I'm working on an Okapi exhibit that is comfortable in 8-40 degrees, I set heaters for 12 degrees. These heaters do not cost energy until the temperature falls below 12 degrees, so you're not spending money on them until the weather gets cold.