Read our blog for the latest insights on sales and marketing Take Me There

Webinar: Use Sugar Data to Easily Generate Complex Documents Register

Webinar: Advanced Calendar Solution for Sugar Register

An Engineered Point of View: Creating Custom Document Builders in SugarCRM

by Lydia Teffera on March 26, 2014

4 minute read

In this blog series, W-Systems engineers share experiences and stories related to projects, assignments and anything else they enjoyed working on. We love what we do and thought we’d share it with you. In this interview, Ethan Kennedy talks about one of his most recent projects with SugarCRM.


Last week I had the chance to interview W-Systems’s newest Software Engineer, Ethan Kennedy. After discussing some of his most recent projects, I found one, in particular, to be extremely interesting because of the custom syntax he created within his client’s SugarCRM system.

Q: Can you explain the project you are currently working on or recently completed?
I recently wrapped up a project with a client where I created a custom document template builder within their SugarCRM system. The company had previously used another software to create documents from templates using data from their CRM, automatically filling in the templates (like ‘mail merge’). These templates included thank you letters and application forms. This other software was limited, however, in the depth of data it was able to pull into the document. Our client’s SugarCRM instance had several custom modules, all with meaningful relationships to one another: what you might call ‘rich data.’ So, they were still having to do a great deal of extra work to manually input more deeply related data into these documents. All in all, they needed an easier way to create numerous documents that could be automatically filled in with deeply nested data from their CRM. That’s where I came in!

Custom Document Builders in SugarCRM

Q: How did you come up with this specific solution?
Because of the project’s complexity, I sat down with W-Systems Engineer, Jeremiah Goyette and we brainstormed multiple ways to create a tool that could read custom syntax and generate a PDF from it. After brainstorming, we both settled on a syntax called Markdown. Markdown is basically a simplified version of HTML used for writing documents on the web. Markdown is well-documented, very easy to learn, and easy on the eyes. I then created an extension to Markdown, which allowed my client to reference their data within their Markdown, as well as perform simple loops (for every value in A, output B) and conditional output (if A equals B, then output C). I also added a quick helper menu, which acted as a plugin to help them easily choose and input specific fields and relationships, as well as helpful formatting and styling options. And as a cherry on top, I also created a detailed Document Builder Guide, with tips and tricks for managing their new solution.

Document Builder Guide

Q: What did you really like about this project?
I really enjoyed the challenge of creating logic that would make complex operations simple. By creating this simple syntax (a sort of Markdown extension) for our customer, I was able to simultaneously enhance and simplify their document creation process and streamline their efforts. This is the second post from Ethan’s three-part series. We look forward to learning more about his customer projects with Sugar and his progression with W-Systems! For more information about Ethan’s project or other customizations mentioned in this post, contact us today.

Subscribe to our newsletter

Select the topics that interest you:
Sign up and stay updated on new W-Systems content and announcements. Read our privacy policy.