A formality is an established procedure or set of specific behaviors and utterances, conceptually similar to a ritual although typically secular and less involved.
Formality can be thought of as an organized process or series of prescribed actions and expressions, akin to a ritual but generally secular and simpler in nature.