Set door lock to always lock when door is closed? Or idle?

I’m wondering if it’s possible to set my door lock to always lock when then door is closed, or if not to auto lock after a few minutes of inactivity? I am always forgetting to lock the door via the ADC app.

I have a Yale Pro (YRD156) lock and IQ 4 panel and a 5800 sensor on the door.

You can create a rule that will lock a single door after a specified delay from when a selected contact sensor is closed.

So for example, you can choose the Front Door sensor, when it is closed, to automatically lock a door lock after a chosen delay period.

Under Automation in Alarm.com select to create a new rule, and use the New Rules Builder option.