Step 1: Find the syntactic role: subject, object, or noun after a preposition.
Step 2: Determine triptote/diptote status and whether a proper-name condition still applies.
Step 3: If it is a genitive diptote, check whether it has al- or is in iḍāfah.
Only then choose the visible case marking.