I suspect it would be the case that there is only one necessary and sufficient condition: After you are dead, the people who are still alive and who knew you (or know about you) believe that you must be in heaven. This would be the case for any and every religion or denomination that subscribes to a belief in heaven.
The particular actions, habits and/or personality traits that people consider to be criterial for deciding whether you (the dead person they knew) are now in heaven will of course vary from one culture/sect to another, and even from one person to another within a given culture or sect: it depends on whether you've killed enough of the right people, whether you've been prosperous enough, whether you've been generous / kind / responsible / punctual, what you ate or whether you had what folks considered to be proper hygiene, grooming and dress.
Whatever... but if there is a consensus among the people you leave behind, and they all don't think you're in heaven, you simply can't be there. No way.
{AbE} I'm no expert on this, but I think there may be some creeds that have a concept of "eternal afterlife" yet don't really posit more than one place to go. For subscribers to that sort of concept (surely there are some), all you have to do is die, and everybody gets the same deal. But I understand that the question for this thread is not addressed to such folks, because it implies a presupposed alternative, "... as opposed to
not going to heaven."
Edited by Otto Tellick, : (added last paragraph)
autotelic adj. (of an entity or event) having within itself the purpose of its existence or happening.