Kick off a workflow when someone views a Campaign email

John Mertic —  December 2, 2013 — 2 Comments

Here’s a question someone tried to stump one of our SEs with this week; how could a customer trigger a workflow if the Lead “views” a campaign email? It’s actually quite possible, but requires a code change to do this via Workflow.

For the code change, add the snippet below to a new file named campaignlog_workflow_enable.php in the custom/Extension/application/Ext/Include/ directory…

$moduleList[] = 'CampaignLog';

After doing a Quick Rebuild and Repair, you can now go and create a new workflow as shown below, with the target module as ‘Campaign Log‘ and the condition as ‘Activity type equals Viewed Message‘.


Thanks to Harald Kuske for this solution!

John Mertic


John Mertic manages the strategic ISV alliances program for SugarCRM, having several years of techincal experience bringing solutions to market with several SugarCRM technology partners. A frequent conference speaker and an avid writer, he has been published in php|architect, IBM Developerworks, and in the Apple Developer Connection, and is the author of the book 'The Definitive Guide to SugarCRM: Better Business Applications' and the book 'Building on SugarCRM: Creating Applications the Easy Way'. He is also president of the OpenSocial foundation, guiding them in solving interoperability issues for enterprise application providers worldwide.

2 responses to Kick off a workflow when someone views a Campaign email


    Does this still work in v7x?


    Should be part of core by now? 😉

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s