Building Custom Modules with Sugar 5.0 TECHNICAL WHITE PAPER
In t r o d u c t io n Historically, customizing a CRM system was a time-intensive, expensive exercise that often resulted in failure. Programmers were often required to have extensive knowledge of the CRM application proprietary tool-sets, database schema and programming language. This complexity often led programmers to abandon deep customization and focus on tweaking existing CRM modules to fit a use-case not intended for the application. All too often, the application was too rigid to handle the changes and failed to produce a useful piece of functionality. SugarCRM s most recent release, Sugar 5.0, is taking a different approach to the challenge of customization. Sugar s Module Builder functionality allows programmers to create custom modules without writing code and to create relationships between new and existing CRM modules. To illustrate how to use Module Builder, this article with show how to create and deploy a custom module. In this example, a custom module to track media inquiries will be created to track public relations requests within a CRM system. This use case is an often requested enhancement for CRM systems that applies across industries. 1
I. Creating New Modules Module Builder functionality is managed within the Developer Tools section of Sugar s administration console. Module Builder is part of the Developer Tools section of Sugar Administration. Upon selecting Module Builder, the user has the option of creating a New Package. Packages are collection of custom fields, objects and modules that can be published within the application instance or shared across instances of Sugar. Once the user selects a New Package, the user names and describes the type of Custom Module to be created. In this case, the package will be names Media Tracking to explain its purpose. Once the new package is created and saved, the user is presented with a screen to create a Custom Module. Upon selecting the New Module icon, a screen appears showing four different object templates. The user begins by creating and naming the new Custom Module Package. 2
II. Understanding Object Templates Three of the four object templates contain pre-built CRM functionality for key CRM use cases. These objects are Company, Issue and Person. As their title denotes, each of these templates contain fields and application logic to describe entities similar to Accounts, Cases and Contacts, respectively. Thus, a person wanting to create a Custom Module to track a type of account would select the Company template. For someone who would like to track human interactions would select People. For the media tracking use case, the user will use the object template Issue because inbound media requests have similarities to an incoming support case. In both examples, there is an inquiry, a recipient of the issue, assignment of the issue and resolution. The final object template is named Basic which is the least defined. This allows the administrator to create their own custom fields to define the object. Object templates allow users to create custom modules based on common use cases, such as company, issue and person. 3
III. Editing Object Templates Upon naming and selecting the Custom Module template named Person, the user can further customize the template by changing the fields and layout of the application and creating relationships between this new module and existing standard or custom modules. Changing fields within the Custom Module is performed within the familiar Sugar Studio view where fields can be changed or replaced through a drag-and-drop user interface. The layout editor can be used to change the appearance of custom modules, including the EditView, DetailView and ListView. This edit functionality allows user to construct a module that meets the specific data requirements of the Custom Module. Custom Modules fields and layouts can be edits using a drag-and-drop user interface. 4
IV. Building Relationships Once the fields and layout of the Custom Module have been defined, the user can define relationships between this new module and existing CRM data by clicking on View Relationships. The Add Relationship button allows the user to associate the new module to existing module. In the case of the Media Tracker, the user can associate the Custom Module with the existing, standard Contacts module. By creating this relationship, end-users will see the Contact (Journalist) associated with each Issue Media Inquiry. Module Builder allows users to create relationships between Custom Modules and existing CRM modules. 5
V. Publishing and Uploading Packages Once the user has created the appropriate fields, layout and relationships for the Custom Modules, this new CRM functionality can be deployed. Selecting the Publish generates a zip file with the Custom Module definitions. Publishing Packages creates a zip file for the new Custom Module. Once the new package has been published the administrator can commit the package to the Sugar Instance by visiting Module Loader within the Sugar Administration console. The user uploads the files and commits the new functionality to the live application instance. 6
Module Loader allows users to install third-party extensions and packages to the live Sugar instance. 7
VI. Using the New Module Once the new module has been uploaded via the module loader, the new Custom Module appears within the live CRM instance. In this case, the user has created a new module named Media which uses the object template Issue to track incoming media inquiries. This new module is associated with the standard Contacts modules to show which journalist has expressed interest. In the example below, a journalist has requested a product briefing. On one page, users can see the nature of the inquiry, the journalist who requested the briefing, who the inquiry was assigned to, status and description. The new Custom Module Media shows incoming media inquiries and associates them with contacts so the company can better track incoming media requests. 8
VII. Upgrade-Safe, Sharable Modules All Custom Modules are upgrade-safe so administrators need not worry about losing data or having to recreate functionality. Custom Modules are easily removed from the application instance if they do not meet requirements. Sugar s modular architecture allows for the sharing and sales of Custom Module packages on SugarForge.org (www.sugarforge,org) or for sale at SugarExchange.com (www.sugarexchange.com). This custom module functionality will be generally available in mid-october with the release of Sugar 5.0. Beta versions of the functionality are available at www.sugarforge.org/content/downloads 9
SugarCRM, Inc. 10050 North Wolfe Road SW2-130 Cupertino, CA 95014 T: 408.454.6900 F: 408.873.2872 www.sugarcrm.com SugarCRM and the SugarCRM logo are registered trademarks of SugarCRM, Inc. in the United States, the European Union and other countries. All other trademarks are the properties of their respective companies. 04-07-034