Results 1 to 3 of 3

Thread: Sales channels module... seeking advice

  1. #1
    nhwebforge is offline Sugar Community Member
    Join Date
    Jan 2008
    Posts
    10

    Default Sales channels module... seeking advice

    Hi

    Our company sells indirectly to end clients through numerous "channels", i.e. resellers. However, as our product is complex in nature, we actually handle the pitch, proposal, defense, project management, deployment and support ourselves on behalf of the channel.

    Basically we would therefore have a "one to many" relationship from channels to accounts and then again from accounts to projects and so on.

    We've been looking at SugarCRM and we're pretty much decided that it's the way to go. But it currently doesn't have the extra level of account management we need.

    Channel - Account - Opportunity or Project, etc.

    We looked at adding a custom "channel" field to the accounts module but that's pretty limited and won't allow us to really manage the actual channel data.

    So, we've been playing with SugarCRM for a week now and we think the best way to handle this scenario is develop a module in the module builder based on the "accounts" module that will serve as our channel management module. The data we need to store per channel is basically the same as the accounts module.

    My question is how to link accounts to a channel. We also need to be able to link contacts directly to a channel too (and some to accounts, some to projects, and some to opportunities, as currently is possible).

    The administration manual, whilst very good is also very generic. It talks of "relate" fields and "flex relate" fields with no real explanation of what they do or how to implement them.

    I'm not looking for a step-by-step guide (that would be too much to ask), but just some pointers of how the actual relationship linking should be set up would be very appreciated and which modules require which types of fields would be great.

    With many thanks in advance

    NH

  2. #2
    dpatech is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    NC
    Posts
    287

    Default Re: Sales channels module... seeking advice

    What you need to do is add a many-to-many relationship along with the appropriate sub-panel definitions. Here is roughly what you need to do without going into too much detail. This should get you going in the right direction. This can be done in an upgrade-safe way, but unfortunately cannot be done via the Module Builder. Contact us directly if you need additional help.

    1. Build and deploy our Channels custom module

    2. Add a many-to-many relationship such as:

    PHP Code:
    $dictionary['accounts_channels'] = array ( 'table' => 'accounts_channels',
       
    'fields' => array
        (
           array(
    'name' =>'id''type' =>'varchar''len'=>'36'),
           array(
    'name' =>'account_id''type' =>'varchar''len'=>'36', ),
           array(
    'name' =>'channel_id''type' =>'varchar''len'=>'36', ),
           array(
    'name' => 'date_modified','type' => 'datetime'),
           array(
    'name' =>'deleted''type' =>'bool''len'=>'1''default'=>'0','required'=>true),
         ),
       
    'indices' => array
       (
           array(
    'name' =>'accounts_channels_pk''type' =>'primary''fields'=>array('id')),
           array(
    'name' => 'idx_account_channel''type'=>'alternate_key''fields'=>array('account_id','channel_id')),
       ),
      
    'relationships' => array (
     
    'accounts_channels' => array('lhs_module'=> 'Accounts''lhs_table'=> 'accounts''lhs_key' => 'id',
                 
    'rhs_module'=> 'Channels''rhs_table'=> 'channels''rhs_key' => 'id',
                 
    'relationship_type'=>'many-to-many',
                    
    'join_table'=> 'accounts_channels''join_key_lhs'=>'account_id''join_key_rhs'=>'channel_id')
          ) 
    )


    3. Add the Sub-Panel definitions for Accounts for Channels

    PHP Code:
    'channels' => array(
        
    'order' => 50,
        
    'sort_order' => 'desc',
        
    'module' => 'Channels',
        
    'subpanel_name' => 'default',
        
    'get_subpanel_data' => 'channels',
        
    'title_key' => 'Channels',
        
    'top_buttons' => array(
            array(
    'widget_class' => 'SubPanelTopButtonQuickCreate'),
            array(
    'widget_class' => 'SubPanelTopSelectButton')
        ),
    ), 
    4. Add a link field definition to Accounts vardefs.php

    PHP Code:
     'channels' =>
        array (
        
    'name' => 'channels',
        
    'type' => 'link',
        
    'relationship' => 'accounts_channels',
            
    'module'=>'Channels',
            
    'bean_name'=>'Channels',
        
    'source' => 'non-db',
        
    'vname' => 'Channels',
    ), 
    - Sugar Team
    dpa Technology LLC
    e-mail: dpaDeveloper@dpatechnology.com
    web: http://www.dpatechnology.com

  3. #3
    nhwebforge is offline Sugar Community Member
    Join Date
    Jan 2008
    Posts
    10

    Default Re: Sales channels module... seeking advice

    Thanks for the prompt reply.

    I must admit to being very new to Sugar and also very wary about playing with base files without much experience.

    So, which files should I be adding these code snippets to?

    Prefer to discuss here for the moment as I'm sure this might be of interest to others.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Module Builder
    By Olavo in forum Downloads
    Replies: 418
    Last Post: 2009-02-26, 06:36 AM
  2. New module? Budget & Real Sales
    By andy60 in forum Developer Help
    Replies: 0
    Last Post: 2007-08-18, 07:55 AM
  3. Replies: 1
    Last Post: 2006-09-11, 03:38 PM
  4. Daily Sales Reports
    By MidNiteRaver in forum Feature Requests
    Replies: 1
    Last Post: 2006-09-08, 11:17 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •