Pages

Wednesday, April 10, 2013

SugarCRM 101: Leads, Contacts, Accounts and Opportunities.

Have you ever wondered about the reasons why some modules exist within SugarCRM? The reason is not always obvious, especially to someone new to the sales/marketing world, and often prompts questions.

Perhaps no other area generates more questions than the Leads, Contacts, Accounts and Opportunities modules. To some, the data contained in some of those modules seems redundant, especially the first two as they both contain data about individuals. In other cases, their usage seems like overkill. Yet others are confused as to their need, due to semantics, for example, to some a Lead and a Contact are synonymous with each other. 

Lets try to unravel some of this confusion and answer some of these questions.

If we quickly analyze sales procedures at a variety of businesses, we discover some commonalities across many industries, regardless of the size of the business. Here is a summary:
  1. Someone, typically in marketing, is in charge of attracting potential buyers of your services/products. 
  2. A potential buyer responds and is screened/qualified, to determine their specific interest and purchasing power. 
  3. Lastly, a deal is worked and if won, the potential buyer becomes a paying customer.
That is a very simplistic look at a sales cycle, but it serves our purposes rather well. 

Modern CRM systems, such as SugarCRM, are designed with the above principles in mind. As a result, they include functionality aimed at helping users more clearly differentiate the type of customer information they are looking at to fit in within those various points listed above. More specifically, an application like SugarCRM clearly draws a line between a potential customer and a paying customer, as well as what deals are in the works. 

That, in short, is the reason why the various modules exist, but lets talk some more about their usage.

Wednesday, April 3, 2013

SugarCRM Customization: User Specific Dropdown Lists

Here is a scenario that has come up a couple of times in the last few weeks: 

While working with Opportunities, we wish to limit the choices available within the Sales Stage dropdown list, but based on the user that is currently accessing the record.

If you are wondering as to the reasons for such a request, consider a scenario where you wish to ensure that opportunities are not accidentally (or not so accidentally) moved to another sales stage by folks that do not have the authority to do so. Eliminating choices from the dropdown list would be the easiest way to ensure certain values are not selected. 

For the purposes of our example we will assume that we wish to eliminate Value Proposition as a choice from the Sales Stage dropdown list, but only for the user chris.

To do this, we first need a copy of the language file containing the dropdown list values. Using your text editor of choice, open the file en_us.lang.php, found in the /custom/include/language folder. If the file is not there, access Admin > Dropdown Editor, then select sales_stage_dom and click Save.

Once the file is open, you should see something similar to the following:

<?php
$GLOBALS['app_list_strings']['sales_stage_dom']=array (
  'Prospecting' => 'Prospecting',
  'Qualification' => 'Qualification',
  'Needs Analysis' => 'Needs Analysis',
  'Value Proposition' => 'Value Proposition',
  'Id. Decision Makers' => 'Id. Decision Makers',
  'Perception Analysis' => 'Perception Analysis',
  'Proposal/Price Quote' => 'Proposal/Price Quote',
  'Negotiation/Review' => 'Negotiation/Review',
  'Closed Won' => 'Closed Won',
  'Closed Lost' => 'Closed Lost',
); 

The bit of code above is the definition of the values displayed in the Sales Stage dropdown list. Next, we need to add our code that determines the current user and if it happens to be chris, instruct Sugar to remove the Value Proposition choice.

This is the code we will use, immediately following the code that defines the list:

//Retrieve user object for currently logged in user

global $current_user;

//Check if currently logged in user is indeed "chris"
if ($current_user->user_name == 'chris')
{
       //Remove choice for Value Proposition
unset($GLOBALS['app_list_strings']['sales_stage_dom']['Value Proposition']);
}

Save the file and you are ready to go! 

Update: Cédric Mourizard (@cedricmourizard), SugarCRM Engineer at Synolia (@synolia), was kind enough to share an observation about this topic via Twitter. In short, take care when limiting choices, as it could cause inadvertent data loss. For example, if a user that does not have access to the Value Proposition option edits an Opportunity whose sales stage is set to Value Proposition, saving that record would force the user to choose another value for the Sales Stage. This may or may not present a problem for your needs, but it is something to bear in mind.