What we are trying to do is create an automated process that will send a templated email to users who haven't logged in for 30 consecutive days. This email is going to be a warning message letting them know that they haven't logged in for a month and are at risk of losing their account. I want to make sure that the only receive this email on the 30 day mark and not every day after 30 days that they still haven't logged in.
I've been trying to accomplish this via a time-based workflow but I am getting stuck. Here's what I've done so far.
- I've set me evaluation criteria to: created, and any time it's edited to subsequently meet criteria
- I've set my rule criteria to "Active" = True
- This is to make sure that we aren't emailing inactive users.
- I've set up a time-dependent workflow action for 30 days after "Last Login"
- I've selected an email template
- My recipient type is set to Email Field
- And my recipients are set to "Email Field: Email"
My thoughts here are that what should happen is that once a user has not logged in for 30 days, the workflow should pick them up and send out the email. I've tested this with a fake user set to my email address and the email never arrives. Any help would be greatly appreciated.
Thank you!
3 respostas
Yep, you're definitely going to have to edit every user at some point if you want this to apply to everyone, and as we've determined, you'll need to edit them in a way that makes the WFR criteria change from false to true.
Honestly, I might just make a new checkbox field on the user record called something like "Enable 30 day login warnings" which will make it a lot easier to administer. You can just check the box for any new user you create, and this will also allow you to easily enable it for all your existing users, and even exempt certain users if you don't want them to get warnings. This will also allow you to enable it for a small number of users first if you want to do a test pilot.
I'm not sure what your experience level is as a Salesforce admin, but if you have more than a handful of users, you can use the Data Loader to update the checkbox for all desired users at once after you have created the field and have your WFR working.