Workflow: Welcome Email to New Lead, and Cascading/Timed Emails Afterwards

I need the proper workflow “formula” to send a new lead a welcome email. A continued “cascade” of emails would then follow (e.g. week #2 another email, week #3 another email). New leads are being added every day, so this workflow needs to be automatic and checking for new leads all the time.

Hi Jeffrey,

You can use the Workflow Module to give you this functionality but you would need to create separate workflows for each time period. Within your condition line you would compare ‘Date Created’ to be ‘Less Than or Equal To’ a ‘Date’ then use the formal Now - X Days. For the welcome email you can just use Now.

Remember if you are running workflows on ‘All Records’ it will run for every record in the Leads module. If you choose ‘New’ it will only run for new records from the creation of the workflow.

1 Like

So I still can’t get this to work properly.

I did a test using the “Task” function into a workflow. The idea being that if I create a task for myself, and assign a due date and time, that I would get an email sent with a reminder an hour before it was due. To validate that this works correctly, I added a custom date field called “workflow date-time stamp” to the “Task” module. If it runs correctly, then the custom field would get a date-time stamp an hour before it was due. I created a workflow with the following Conditions and Actions:

CONDITIONS
Module: Tasks
Field: Due Date
Operator: Less Than or Equal To
Type: Date
Value: Now -1 Hours

ACTIONS
Select Action: Modify Record
Record Type: Tasks
Field: Workflow Date-Time Stamp (custom field) with Date Now

So what do I have wrong in this workflow equation?

You probably want the Condition to be Due Date less than or equal to Now plus 1 Hours.

If you want a complete pre-made solution… what you’re seeking is called “Drip Marketing Campaigns”

Maybe one day, an upgraded/simplified Campaigns module will provide the essentials of drip marketing inside Suite…

Marketing automation service providers offer monthly subscription plans which perform Drip Marketing Campaigns. AWeber, Mailchimp, Infusionsoft, Pardot, Inbox25, Constant Contact.

You can buy prebuilt drip email marketing automation modules on SugarOutfitters for running drip email campaigns from SuiteCRM.

MyCRM Drip Email Campaigns module, Process Manager by SierraCRM, and SugarChimp module, with 30 day trials… !

Links provided for convenience… Not affiliated with any of the above companies…

https://www.sugaroutfitters.com/addons/drip-email-campaigns-module
https://www.sugaroutfitters.com/addons/drip-email-campaigns-module
https://www.sugaroutfitters.com/addons/process-manager-enterprise

I made that change to the “Condition: Due Date” and it still hasn’t worked. When I look at the workflow process audit is shows that this workflow hasn’t run for a couple months. I have the correct line in the crontab file so Schedulers will run (as they ran once before… thus the couple months ago showing in the process audit) and I’ve also did a flush of the cache by performing a “Admin > System > Repair > Quick Repair and Rebuild” in hopes that it would help to get this running as well.

Workflow sounds like one of the most powerful components in the SuiteCRM family… yet the logic doesn’t seem so logical. Is there some documentation somewhere with simple “recipes” on the settings, conditions, and actions to make this work? I’ve outlined my conditions and actions but this simple test to update a field with a time-stamp an hour before the due date still doesn’t work. Where do I go from here?

Jeffrey,

Here is the documentation on Advanced Open Workflow…
https://suitecrm.com/wiki/index.php/Userguides#Advanced_OpenWorkflow

Check out the AOW AOP forum for Workflow help… others maybe posted your question there, or know exactly how to do what you’re trying to do… timed drip emails…
https://suitecrm.com/forum/advanced-opensales-workflow-portal-support

First thing to fix is your Scheduler, which is based on a cron job. Without Scheduler running regularly, like every minute or two, none of your Workflows will run !!.

Thank you for the reply and links. I’ve been to those forums before and find that the AOW User Guide has some good information.

I’m still hoping for a simple answer to my question. I’ve posted my conditions and actions and the workflow isn’t working. What do I have wrong?

CONDITIONS
Module: Tasks
Field: Due Date
Operator: Less Than or Equal To
Type: Date
Value: Now -1 Hours

ACTIONS
Select Action: Modify Record
Record Type: Tasks
Field: Workflow Date-Time Stamp (custom field) with Date Now

Jeffrey,

First you absolutely MUST have Scheduler running your “Run AOW Workflow” job.

Click Admin Scheduler Run AOW Workflow,
Have a look there for the “Last Successful Run”
it should be 0-2 minutes before “right now”.
If not, you will have to fix that before proceeding.

I made a workflow matching your conditions (except I put “Send Email” for the Action because I didn’t want to make the “Workflow Date TIme Stamp” custom fields that you have.

Your intention is to perform an action when the Current Date and Time is 1 hour or less, before the Task Due Date and Time ?

I modified the math equation in the Conditions, to make it reflect this intention…

The workflow runs as it should… it transmitted me an email… when the current time is within one hour before the due date and time.

I’ve confirmed that Scheduler is running. I used my same Workflow but just changed the operator to “Less Than” and it ran right away; and placed a date-time stamp into my custom field with the same date-time of right then.

So I reset my due date in my Task for today at 5pm, and used the outlined Conditions you gave:

Module: Tasks
Field: Due Date
Operator: Less than or equal to
Type: Date
Value: Now +1 Hours.

And then saved my Workflow. I did all of this before 4pm… so that when 4pm came it would then save the current date-time stamp an hour before the due date and time (today at 5pm). Nothing happened. 4pm came and went and no stamp was saved.

Any ideas as to why this isn’t working?

Possibly because the AOW workflow engine is set by default to “remember” when it already ran a workflow action on an item,so it doesn’t run the same action again (and again… and again…) on that same item.
So you don’t get 60 emails in your inbox, one every minute, for the entire hour , when your workflow is supposed to send an email when you’re within an hour before a due date/time.

OK, so how do I clear the AOW Workflow to run again? Prior to updating both the Task and the Workflow, I did a flush of the cache by performing a “Admin > System > Repair > Quick Repair and Rebuild”.

It’s not related to rebuild / repair / fixing stuff that broke because of changes in the underlying code of the system, permissions, or menu layout etc.
AOW actually keeps an audit of all workflows that have fired on all records so that it doesn’t re-fire the same workflow action on the same record again and again.
You could make a new record, (since it’s new, AOW workflow has never fired any action on it for your condition), set the time 1 hour and a few minutes from now, and wait til it fires.

When looking at the “Schedulers > Run AOW WorkFlow” the Job Log says “Job Status = running” … shouldn’t this be saying “done” and then have today’s date and time-stamp increment every minute?

Right. Job status should say “done” and “execute time” and “date modified” the time it ran. There’d be a new record every minute or every five minutes, however often you have it set to run.
If not, then it’s likely not running, check your cron job is correct, and that your server is really running the suite cron job every minute.