Stat Tracker

Monday, March 26, 2012

Simple Bulk Emails with Amazon Email Service and Force.com from Sean Devine

So last week we had our monthly Chicago Force.com Developer group meetup. This session had a very cool presentation by Sean Devine on a how to integrate Force.com with Amazon Email Services. This allows you to rapidly build custom bulk email processes in Force.com. And whats even cooler is that he has made the source publicly available to everyone on Git Hub. Check it out here: https://github.com/seandevine/apexamazonemail.

While Sean performed the deep dive of the code during his presentation, I found a nugget of code I thought was particularly interesting. Sean used the JSON class and its serialize / desalinize methods to get around some interesting limitations. He uses the JSON class to serialize some data in his apex class and then he stores this as serialized data as an Attachment on the record. Then when needed he serializes the data from the attachment and processes it.

This is pretty interesting. For this example he used this workaround to get around the character limit in String fields on the object. Very creative and flexible solution to a problem in SFDC. For example, instead of creating 10 long text fields in SFDC on a record, you could use this process and not consume any data.

All in all, a very interesting developer meetup and  some very interesting source code!