In the bag

Meaning: Certain or very likely to be achieved or obtained.

Example: We thought we had the deal in the bag, but the client changed their mind.