How to trigger SMS based on a condition?