+ Start a Discussion
David BarlowDavid Barlow 

Process, workflow, flow? ack

I'm trying to setup a fairly? simple process? (I am stumped as to what I'm supposed to be using) on a lead, that using a trigger like a LeadStatus change will automatically send off an email template to that lead, and will create a task (phone call). Once that task has been completed, a second email will be automatically sent after a certain amount of time, followed by a second phone call task, rinse and repeat through one more cycle. 

I'm at a bit of a loss as to exactly what I'm supposed to be using. I've tried process and workflow and can get part of it done but can't seem to setup the whole process. Consider me a lost newbie. Any help learning how to fish would be great.
DixitDixit
For using Workflow you need one on the lead (when change the status send email and do a new task) then anotherone in the task (when is completed) you should save the date when the task was completed (add a custom field if there isn't one already to do that) and your WF rule should update that field with the date when it was completed (when change status and that field is blank) and that field will be useful to fire a time-based action in the Workflow rule.
David BarlowDavid Barlow
Thanks for that tip. Has let me setup the process how I wanted it to be. (or close enough). My one problem now is how do I stop the workflows based on tasks from firing if the status on the lead has changed. 

eg: The first email and phone task are sent and created (respectively) based upon changing lead status to a certain value. The second email is sent based upon the phone task being closed. What if the lead indicates in the email or phone call that they don't want to receive any future communication, the subsequent workflows are based upon tasks and dont seem to be able to reference the lead. Any tips?
DixitDixit
Do a 3rd WF rule if you need the lead to do something when "DoNotCall" is true (or do a custom contact status list for the lead)

to your 2nd WF fired with the task, add the validation that should fire only if the "Who" relation (a std field which is gonna be your lead in this case) is "DoNotCall" (or custom field) equals "False" and your "What" equals "lead", this should be in your time-based action. The time based action should only fire when all your criteria it's true, so adding things that may be false in that period of time, will stop your WF.
David BarlowDavid Barlow
Not sure if I'm getting that. 
So my first workflow kicks off on lead status change:
It sends an email, and creates a new task 'phone call #1'
2nd workflow kicks off when phone call #1 is closed, approx 5 days later it sends email #2 and creates task #2.

So what I'm not seeing is how to halt a task when a lead status is changed (would it be too much to ask for salesforce to be able to reference in a task a field in it's parent lead?).

I created a third workflow that if lead status is changed to something like 'do not contact' then the Phone call #1 status is changed to 'deferred', so it then shouldn't kick off the workflow that sends out email 2 and creates phone call #2. The problem I see now is what happens if the status is changed between #1 and #2 or #2 and #3, it doesn't let me reference those in a new WF. 
DixitDixit
Maybe you can try adding a custom field to "Activity" (task it's a type of activity) where you can place the new status with a WF Rule, so you can evaluate your time-triggered action with that field which will update every time you change the lead status.
David BarlowDavid Barlow
Feel free to treat me as a salesforce idiot. So I can create a custom field (activity) in task that gets its data from the lead status? 
DixitDixit
You can, but i'm seeing more from developer side than from admin side. 
I would do a Trigger or simply an scheduled class. 

For you as an admin i would use a custom field in the task, where i send to the employee asigned to the lead to follow up, an email reminding the 2nd and 3rd contact. So they can go in the task and check a checkbox and send the e-mail. So that, they can decide if they send the e-mail or not based in the Lead info (if they wanted to be contacted or not). 

If you want it totally automatic, i would use the first 2 options (trigger or scheduled class) and check for the lead and its tasks (scheduled) or change a field that would stop the WF rule (Trigger) 
David BarlowDavid Barlow
Perhaps I shouldnt be on the developer side. I simply don't see a way to access a field in the parent lead of the task from the task itself (which would seem to be simple coding on SF's part but they never seem to make things simple). I'll try on the other boards before I go back to trying customer service.