How to create thresholds and receive notifications