Note whether the door catches when gently closed, only after being pushed firmly, or only while lifted at the handle. Also note scraping, uneven gaps or a change following weather stripping, painting or hinge work. These observations help the technician identify conditions to inspect without treating the symptom as proof of a particular fault.
Do not keep slamming the door to make it latch. Added force can damage parts and does not explain why engagement is inconsistent. A door that stays shut only under pressure may still have an unresolved alignment or mechanism problem.
If the door cannot be secured, explain that when arranging service. If someone is in danger because an exit cannot be used, contact the appropriate emergency service. The hardware appointment should not delay assistance for a safety situation.