vtigerCRM-Spain

Autoemails extension and vtiger CRM 5.1

In the 5.1 version we now have a new workflow module which covers part of the functionality the autoemails does. Since users of the autoemails extension obviously want to upgrade, a comparison of both and a decision on which would be the most logical path to follow from now on was needed. I will try to do that in this article.

The goal of this article is to see the differences in functionality between both extension as email senders. The workflow module can do other things besides sending emails which makes it a very powerful extension and superior to the autoemails extension which only send emails. What I need to expose are those things that the autoemails extension does and that can't be done in the workflow module. Those are the things our current users will need to know when migrating.

DifferenceComments
workflow doesn't separate create and edit emailsWF has “first save” event, which is equivalent to AE “on create”. WF has “on every save” which is SIMILAR to “on edit”. The problem appears when you need to send one email on create and then other emails when edited. In this case, using WF, you will create one WF on the “first save” event and another on the “every save” event but you will get both emails on the first save, which was not what was intended. This is because “on every save” is not the same as “on edit”. When you create you are also saving.
workflow can’t send emails on delete eventthis feature is limited in the AE extension because once eliminated we can't be sure that the entity will exist and may not have access to the fields. AEs will be able to send a static email any time after the elimination
schedulingAE has a much more powerful scheduling scheme. Besides the higher granularity when defining the delay or reactive of an email, the capability of scheduling emails based on time event does not exist in WF extension. Things like sending out a weekly newsletter are not possible
mailingsAE has mailing capabilities. Combining the scheduling and the campaign condition on leads and contacts you can easily send mailings to all members of a campaign or to all contacts that fall into any segment you can define using conditions
NOTE: I don't recommend using AE as a mailing program (phplist is better) but it can send mailings
scheduled reportsWF can't send reports, basically because it can't schedule when to send them
email attachmentsAE supports attachments in the emails to be sent
support for CC and BCC
minor helpersAE has some helpers like, excluding the triggering user from email, sending email to group and some others which may be possible to accomplish with WF but aren't as visible or easy to activate
leads opt outAE adds a leads email opt out field which is honored by the extension

So the really big difference is the scheduling feature. If we added scheduling to the workflow module so that a whole workflow could be programmed to be launched at a given time, not only could we cover the functionality of the AE extension but, most surely we would give the workflow extension a whole new aspect that would benefit the vtiger CRM application and it's user base.

The current users of the autoemail extension must evaluate their needs. If they aren't using any of the features I have detected as not possible in vtiger CRM workflow then they just have to (manually) convert their current autoemails into workflows. If they are using them then we must proceed to the next step.

Necessary code changes to upgrade

Since the workflow module already has part of the functionality and any enhancement we do to this extension will only make it better in many ways I can't even imagine right now for everybody, this is what I would do to get autoemails extension functionality into vtiger CRM 5.1.

  • Modify Leads module
    • Add Lead email opt out option
  • Modify the workflow extension. I wouldn't think about creating a new extension like autoemails is.
    • Add new “when to run” events: schedule, delete, edit
    • Honor Lead opt out option when sending emails
    • Add new Campaign tag field to Contacts and Leads workflow conditions dropdown so that we can easily send emails to all contacts/leads of a campaign (mailings) by defining a workflow with a condition like “all contacts that gbelong to campaign X”
    • Add support for CC, BCC and attachments

I would leave out the minor helpers and scheduled reports.

With this we would cover the needs of most users and have a very good starting point to help others.

Workflow enhancements project

I decided to start coding these enhancements and opened a project on the vtiger forge for them.

I have already accomplished:

  • Modify Leads module
    • Add Lead email opt out option
  • Modify the workflow extension.
    • Add new “when to run” events: schedule, delete, edit
    • Honor Lead opt out option when sending emails This can be done better, the patch I have given is too restrictive.
    • Add new Campaign tag field to Contacts and Leads workflow conditions dropdown so that we can easily send emails to all contacts/leads of a campaign (mailings) by defining a workflow with a condition like “all contacts that gbelong to campaign X”
    • Add support for CC, BCC
    • Add support for attachments

I also have to add to the list:

  • Optimize schedule entity selection

Screenshots

Wishlist

  • Schedule on day of week, i.e. Tues Thurs and Sunday, e.g. we could send invoice reminders out on these days so that it doesn't bug the customer TOO much
    • NOTE: This can already be done, you have to repeat the workflow for each weekday
  • Add email body tag: $recordlink: which automatically generates a html link to the record on which the workflow is firing. This allows the receiver of the email to click on the notification to take action.
  • Add 5 minute and 15 minute intervals to the workflow schedule types. There will be some stuff, like exception based approvals, that need to go out asap. Also, easier to test in production if you only have to wait 5 minutes.

vtiger CRM SMS Workflow

On this forum thread, autoemails and SMS are related as it is a natural and logical relation nowadays. After seeing the workflow module I am inclined to recommend extending it to support sending SMS. I think the correct way to support SMS automatic messaging in the vtiger CRM application is to add a new task called “Send SMS” that would connect to whatever provider you have contracted service with and send SMS. Obviously this is new functionality that has to be totally programmed.

NOTE: vtiger team is programming this as an extension, so we should have it very soon