"In the bag" means that you will definitely achieve or gain something positive. If you have something in the bag, you are generally happy about it.
“Obama has the election in the bag.”
= Obama will definitely win the upcoming presidential election.
“We’ve got close to half a million shares in the bag.”
= Our buy order for half a million shares on the stock exchange was successfully executed.
"Did you make the sale?"
"Yes, the money’s in the bag"
"How was the exam?"
"No problem. I’ve got a perfect score in the bag"
"How was the interview?"
"Easy, I’ve got the job in the bag"