Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Campaign target lists by state

  1. #1
    sbantz is offline Sugar Community Member
    Join Date
    Sep 2007
    Posts
    52

    Default Campaign target lists by state

    SugarCRM CE 5.0.0.b

    Maybe I am not seeing it, but is there a way to create a target list that is populated by Contacts in a certain state? Say you want to send an e-mail campaign to all Contacts in New York. Is there a way to do that? When I create a target list, all I can do is select from Lead Source and other generic fields. Not by address.

    Is there a way to do this in CE?

  2. #2
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Campaign target lists by state

    Hi, sbantz.

    Exactly how are you trying to create or populate a prospect list? Which link or page are your following?

    There are different ways depending on your trying.

    Cheers


    --
    André Lopes
    Lâmpada Global Services
    Rua Bela Cintra, 299 conjunto. 51
    São Paulo, SP 01415-000
    tel1. 55 11 3237-3110
    e-mail: info@lampadaglobal.com

  3. #3
    sbantz is offline Sugar Community Member
    Join Date
    Sep 2007
    Posts
    52

    Default Re: Campaign target lists by state

    Well, basically my process is this:

    We want to send out an e-mail announcement to certain Contacts located in a small numbner of states.

    We go to Campaign.
    We create an e-mail template with the announcement.
    We create a Target List. and give it a name.
    I go to Target Lists and click on the target list I just created.
    This brings me to a screen where I can add Prospects, Contacts, Leads, or Users.
    I click on Select under Contacts. This brings up a lookup box where I can look up contacts by first name, last name, account, lead source, etc. The ability to look up by city, state or anything else is just not there.

    from the sounds of it, there must be another way.

  4. #4
    SugarDev.net is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    1,401

    Default Re: Campaign target lists by state

    Add state to the basic search panel in Studio?
    Developers go here
    Businesses go there (Dutch)

    Modules:
    SugarDev.net Developer Tools | Config | Dutch Language Pack
    "Nothing gets fixed unless there is a bug"

  5. #5
    dtokeefe's Avatar
    dtokeefe is offline Sugar Community Member
    Join Date
    Mar 2005
    Location
    Sao Paulo, Brasil
    Posts
    671

    Default Re: Campaign target lists by state

    sbantz,

    You can add the State field to the Contacts Popup that gets called by the select button in the Target List module. To add the field, modify /modules/Contacts/metadata/popupdefs.php.

    Cheers.

    David
    David O'Keefe
    Lampada Global Services
    SugarCRM Gold Partner
    USA: +1 908 998-2278
    BR: +55 11 3237-3110
    Skype: dtokeefe
    Email: equipe@lampadaglobal.com
    www.lampadaglobal.com

    Lampada Global delivers enterprise software and offshore programming services to customers around the world.

  6. #6
    sbantz is offline Sugar Community Member
    Join Date
    Sep 2007
    Posts
    52

    Default Re: Campaign target lists by state

    Is there a tutorial on how to do this? I have modified code before, but it was pretty much following instruction.

  7. #7
    Meyer is offline Sugar Community Member
    Join Date
    Oct 2006
    Location
    south africa
    Posts
    646

    Default Re: Campaign target lists by state

    is it possible to put in a search criteria from a different - custom module

  8. #8
    rousseau is offline Sugar Community Member
    Join Date
    Oct 2007
    Posts
    22

    Default Re: Campaign target lists by state

    I needed to search the Leads by geographic location and got it to work by the following:

    Found modules/Leads/metadata/popupdefs.php
    Which looked like this:

    Code:
    <?php
    if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
    /*********************************************************************************
     * SugarCRM is a customer relationship management program developed by
     * SugarCRM, Inc. Copyright (C) 2004 - 2008 SugarCRM Inc.
     * 
     * This program is free software; you can redistribute it and/or modify it under
     * the terms of the GNU General Public License version 3 as published by the
     * Free Software Foundation with the addition of the following permission added
     * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
     * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
     * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
     * 
     * This program is distributed in the hope that it will be useful, but WITHOUT
     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
     * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
     * details.
     * 
     * You should have received a copy of the GNU General Public License along with
     * this program; if not, see http://www.gnu.org/licenses or write to the Free
     * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
     * 02110-1301 USA.
     * 
     * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
     * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
     * 
     * The interactive user interfaces in modified source and object code versions
     * of this program must display Appropriate Legal Notices, as required under
     * Section 5 of the GNU General Public License version 3.
     * 
     * In accordance with Section 7(b) of the GNU General Public License version 3,
     * these Appropriate Legal Notices must retain the display of the "Powered by
     * SugarCRM" logo. If the display of the logo is not reasonably feasible for
     * technical reasons, the Appropriate Legal Notices must display the words
     * "Powered by SugarCRM".
     ********************************************************************************/
    
    $popupMeta = array('moduleMain' => 'Lead',
    						'varName' => 'LEAD',
    						'orderBy' => 'last_name, first_name',
    						'whereClauses' => 
    							array('first_name' => 'leads.first_name', 
    									'last_name' => 'leads.last_name',
    									'lead_source' => 'leads.lead_source',
    									'status' => 'leads.status'),
    						'selectDoms' =>
    							array('LEAD_SOURCE_OPTIONS' => 
    											array('dom' => 'lead_source_dom', 'searchInput' => 'lead_source'),
    									'STATUS_OPTIONS' => 
    											array('dom' => 'lead_status_dom', 'searchInput' => 'status')
    									),
    						'searchInputs' =>
    							array('first_name', 'last_name', 'lead_source', 'status'),
    						'listviewdefs' => array(
    											'NAME' => array(
    												'width' => '30',
    												'label' => 'LBL_LIST_NAME',
    										        'link' => true,
    										        'default' => true,
    										        'related_fields' => array('first_name', 'last_name', 'salutation')), 
    											'LEAD_SOURCE' => array(
    										        'width' => '10', 
    										        'label' => 'LBL_LEAD_SOURCE',
    										        'default' => true,),
    											'STATUS' => array(
    												'width' => '10', 
    												'label' => 'LBL_LIST_STATUS',
    										        'default' => true),
    										     'ASSIGNED_USER_NAME' => array(
    										        'width' => '10', 
    										        'label' => 'LBL_LIST_ASSIGNED_USER',
    										        'default' => true), 
    											),
    						'searchdefs'   => array(
    										 	'first_name',
    										 	'last_name', 
    											'lead_source', 
    											'status',
    											array('name' => 'assigned_user_id', 'type' => 'enum', 'label' => 'LBL_ASSIGNED_TO', 'function' => array('name' => 'get_user_array', 'params' => array(false))),
    										  )
    						);
    
    
    ?>
    I then made the following changes and did a quick repair and rebuild in the admin. It works nice now:

    Code:
    <?php
    if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
    /*********************************************************************************
     * SugarCRM is a customer relationship management program developed by
     * SugarCRM, Inc. Copyright (C) 2004 - 2008 SugarCRM Inc.
     * 
     * This program is free software; you can redistribute it and/or modify it under
     * the terms of the GNU General Public License version 3 as published by the
     * Free Software Foundation with the addition of the following permission added
     * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
     * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
     * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
     * 
     * This program is distributed in the hope that it will be useful, but WITHOUT
     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
     * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
     * details.
     * 
     * You should have received a copy of the GNU General Public License along with
     * this program; if not, see http://www.gnu.org/licenses or write to the Free
     * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
     * 02110-1301 USA.
     * 
     * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
     * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
     * 
     * The interactive user interfaces in modified source and object code versions
     * of this program must display Appropriate Legal Notices, as required under
     * Section 5 of the GNU General Public License version 3.
     * 
     * In accordance with Section 7(b) of the GNU General Public License version 3,
     * these Appropriate Legal Notices must retain the display of the "Powered by
     * SugarCRM" logo. If the display of the logo is not reasonably feasible for
     * technical reasons, the Appropriate Legal Notices must display the words
     * "Powered by SugarCRM".
     ********************************************************************************/
    
    $popupMeta = array('moduleMain' => 'Lead',
    						'varName' => 'LEAD',
    						'orderBy' => 'last_name, first_name',
    						'whereClauses' => 
    							array('first_name' => 'leads.first_name', 
    									'last_name' => 'leads.last_name',
    									'lead_source' => 'leads.lead_source',
    									'status' => 'leads.status',
                                                                            'primary_address_country' => 'leads.primary_address_country'),
    						'selectDoms' =>
    							array('LEAD_SOURCE_OPTIONS' => 
    											array('dom' => 'lead_source_dom', 'searchInput' => 'lead_source'),
    									'STATUS_OPTIONS' => 
    											array('dom' => 'lead_status_dom', 'searchInput' => 'status')
    									),
    						'searchInputs' =>
    							array('first_name', 'last_name', 'lead_source', 'status','primary_address_country'),
    						'listviewdefs' => array(
    											'NAME' => array(
    												'width' => '30',
    												'label' => 'LBL_LIST_NAME',
    										        'link' => true,
    										        'default' => true,
    										        'related_fields' => array('first_name', 'last_name', 'salutation')), 
    											'LEAD_SOURCE' => array(
    										        'width' => '10', 
    										        'label' => 'LBL_LEAD_SOURCE',
    										        'default' => true,),
    											'STATUS' => array(
    												'width' => '10', 
    												'label' => 'LBL_LIST_STATUS',
    										        'default' => true),
    										     'ASSIGNED_USER_NAME' => array(
    										        'width' => '10', 
    										        'label' => 'LBL_LIST_ASSIGNED_USER',
    										        'default' => true), 
    											),
    						'searchdefs'   => array(
    										 	'first_name',
    										 	'last_name', 
    											'lead_source', 
    											'status',
                                                                                            'primary_address_country',
    											array('name' => 'assigned_user_id', 'type' => 'enum', 'label' => 'LBL_ASSIGNED_TO', 'function' => array('name' => 'get_user_array', 'params' => array(false))),
    										  )
    						);
    
    
    ?>

    The only problem I'm having is that the list is too long for all my USA leads to display on one page. I tried to set the list length at over 4000 and it just wouldn't display anything. So I have it set at 800 leads to display at a time, but if I use the forward arrows it removes the USA location and gives me all the countries. :-(

    I don't see why this wouldn't work with any of the custom fields, but I haven't tried it out just yet. The only thing that would probably be different is the first of the 3 changes I made (in red) above would have the table as leads_cstm.[custom_item] instead of leads.primary_address_country.

    Hope this helps anyone else using 5.1.0a CE like myself to get the campaign target lists working how it really should.

  9. #9
    dgilroybs8 is offline Senior Member
    Join Date
    Dec 2008
    Location
    Bristol, UK
    Posts
    25

    Default Re: Campaign target lists by state

    Hiya,

    I've been trying to do this as well, to add "primary_address_postalcode" to the Leads search when building a Target List. Here's my modified code :-

    Code:
    <?php
    if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
    /*********************************************************************************
     * SugarCRM is a customer relationship management program developed by
     * SugarCRM, Inc. Copyright (C) 2004 - 2008 SugarCRM Inc.
     * 
     * This program is free software; you can redistribute it and/or modify it under
     * the terms of the GNU General Public License version 3 as published by the
     * Free Software Foundation with the addition of the following permission added
     * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
     * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
     * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
     * 
     * This program is distributed in the hope that it will be useful, but WITHOUT
     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
     * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
     * details.
     * 
     * You should have received a copy of the GNU General Public License along with
     * this program; if not, see http://www.gnu.org/licenses or write to the Free
     * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
     * 02110-1301 USA.
     * 
     * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
     * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
     * 
     * The interactive user interfaces in modified source and object code versions
     * of this program must display Appropriate Legal Notices, as required under
     * Section 5 of the GNU General Public License version 3.
     * 
     * In accordance with Section 7(b) of the GNU General Public License version 3,
     * these Appropriate Legal Notices must retain the display of the "Powered by
     * SugarCRM" logo. If the display of the logo is not reasonably feasible for
     * technical reasons, the Appropriate Legal Notices must display the words
     * "Powered by SugarCRM".
     ********************************************************************************/
    
    $popupMeta = array('moduleMain' => 'Lead',
    						'varName' => 'LEAD',
    						'orderBy' => 'last_name, first_name',
    						'whereClauses' => 
    							array('first_name' => 'leads.first_name', 
    									'last_name' => 'leads.last_name',
    									'lead_source' => 'leads.lead_source',
    									'status' => 'leads.status'
    									'primary_address_postalcode' => 'leads.primary_address_postalcode'),						'selectDoms' =>
    							array('LEAD_SOURCE_OPTIONS' => 
    											array('dom' => 'lead_source_dom', 'searchInput' => 'lead_source'),
    									'STATUS_OPTIONS' => 
    											array('dom' => 'lead_status_dom', 'searchInput' => 'status')
    									),
    						'searchInputs' =>
    							array('first_name', 'last_name', 'lead_source', 'status', 'primary_address_postalcode'),
    						'listviewdefs' => array(
    											'NAME' => array(
    												'width' => '30',
    												'label' => 'LBL_LIST_NAME',
    										        'link' => true,
    										        'default' => true,
    										        'related_fields' => array('first_name', 'last_name', 'salutation')), 
    
    											'LEAD_SOURCE' => array(
    										        'width' => '10', 
    										        'label' => 'LBL_LEAD_SOURCE',
    										        'default' => true,),
    											'STATUS' => array(
    												'width' => '10', 
    												'label' => 'LBL_LIST_STATUS',
    										        'default' => true),
    										     'ASSIGNED_USER_NAME' => array(
    										        'width' => '10', 
    										        'label' => 'LBL_LIST_ASSIGNED_USER',
    
    											),
    						'searchdefs'   => array(
    										 	'first_name',
    										 	'last_name', 
    											'postcode',
    											'lead_source', 
    											'status',
    											'primary_address_postalcode',
    											array('name' => 'assigned_user_id', 'type' => 'enum', 'label' => 'LBL_ASSIGNED_TO', 'function' => array('name' => 'get_user_array', 'params' => array(false))),
    										  )
    						);
    
    
    ?>
    I did the "Quick Rebuild & Rebuild" on the Leads module, but when I click on Select from a target list, I get a blank page, the source code of which looks like this :-

    Code:
    <link rel="stylesheet" type="text/css" media="all" href="themes/Sugar/calendar-win2k-cold-1.css?c=1"><script>var module_sugar_grp1 = 'Leads';</script><script>var action_sugar_grp1 = 'Popup';</script><script>jscal_today = 1230723494000; if(typeof app_strings == "undefined") app_strings = new Array();</script><script type="text/javascript" src="include/javascript/sugar_grp1_yui.js?c=1"></script><script type="text/javascript" src="include/javascript/sugar_grp1.js?c=1"></script><script type="text/javascript" src="jscalendar/lang/calendar-en.js?c=1"></script><script type="text/javascript">var asynchronous_key = "8246527c-920b-bf70-76b6-495b37f0c32c";SUGAR.themes.image_server="";</script><script type="text/javascript">
    	var time_reg_format = '([0-9]{1,2}):([0-9]{1,2})';
    	var date_reg_format = '([0-9]{1,2})/([0-9]{1,2})/([0-9]{4})';
    	var date_reg_positions = {'m': 1,'d': 2,'Y': 3};
    	var time_separator = ':';
    	var cal_date_format = '%m/%d/%Y';
    	var time_offset = 0;
    </script><script type="text/javascript" src="cache/jsLanguage/en_us.js?c=1&j=1"></script><script type="text/javascript" src="cache/jsLanguage/Leads/en_us.js?c=1&j=1"></script>
    Do I have to modify the popup_picker.html file as well to tell the new field to display on the page?

    Any help to a Sugar Newbie (me!!) gratefully received.

    Regs....David.
    OS = CentOS 5.2
    Apache = 2.2.3
    PHP = 5.1
    Perl = 5.8.8
    MySQL = 5.0
    Sugar CE = 5.1.0b (Build 4905)
    Firefox = 2.0.0.20

  10. #10
    dgilroybs8 is offline Senior Member
    Join Date
    Dec 2008
    Location
    Bristol, UK
    Posts
    25

    Default Re: Campaign target lists by state

    An update.

    I can now get the search working, searching on the Postalcode field, and I can get the heading in the search list at the bottom of the popup window, but there is no data in the fields. How do I get the data to display? I just cannot see how to do it.

    Regs....David.

    Code:
    <?php
    if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
    /*********************************************************************************
     * SugarCRM is a customer relationship management program developed by
     * SugarCRM, Inc. Copyright (C) 2004 - 2008 SugarCRM Inc.
     * 
     * This program is free software; you can redistribute it and/or modify it under
     * the terms of the GNU General Public License version 3 as published by the
     * Free Software Foundation with the addition of the following permission added
     * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
     * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
     * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
     * 
     * This program is distributed in the hope that it will be useful, but WITHOUT
     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
     * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
     * details.
     * 
     * You should have received a copy of the GNU General Public License along with
     * this program; if not, see http://www.gnu.org/licenses or write to the Free
     * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
     * 02110-1301 USA.
     * 
     * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
     * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
     * 
     * The interactive user interfaces in modified source and object code versions
     * of this program must display Appropriate Legal Notices, as required under
     * Section 5 of the GNU General Public License version 3.
     * 
     * In accordance with Section 7(b) of the GNU General Public License version 3,
     * these Appropriate Legal Notices must retain the display of the "Powered by
     * SugarCRM" logo. If the display of the logo is not reasonably feasible for
     * technical reasons, the Appropriate Legal Notices must display the words
     * "Powered by SugarCRM".
     ********************************************************************************/
    
    $popupMeta = array('moduleMain' => 'Lead',
    						'varName' => 'LEAD',
    						'orderBy' => 'last_name, first_name',
    						'whereClauses' => 
    							array('first_name' => 'leads.first_name', 
    									'last_name' => 'leads.last_name',
    									'lead_source' => 'leads.lead_source',
    									'status' => 'leads.status',
    									'primary_address_postalcode' => 'leads.primary_address_postalcode'),
    						'selectDoms' =>
    							array('LEAD_SOURCE_OPTIONS' => 
    											array('dom' => 'lead_source_dom', 'searchInput' => 'lead_source'),
    									'STATUS_OPTIONS' => 
    											array('dom' => 'lead_status_dom', 'searchInput' => 'status')
    									),
    						'searchInputs' =>
    							array('first_name', 'last_name', 'salutation', 'lead_source', 'status', 'primary_address_postalcode'),
    						'listviewdefs' => array(
    											'NAME' => array(
    												'width' => '30',
    												'label' => 'LBL_LIST_NAME',
    										        'link' => true,
    										        'default' => true,
    										        'related_fields' => array('first_name', 'last_name', 'salutation')), 
    											'POSTCODE' => array(
    										        'width' => '20', 
    										        'label' => 'LBL_PRIMARY_ADDRESS_POSTALCODE',
    										        'default' => true,),
    											'LEAD_SOURCE' => array(
    										        'width' => '10', 
    										        'label' => 'LBL_LEAD_SOURCE',
    										        'default' => true,),
    											'STATUS' => array(
    												'width' => '10', 
    												'label' => 'LBL_LIST_STATUS',
    										        'default' => true),
    										     'ASSIGNED_USER_NAME' => array(
    										        'width' => '10', 
    										        'label' => 'LBL_LIST_ASSIGNED_USER',
    										        'default' => true), 
    											),
    						'searchdefs'   => array(
    										 	'first_name',
    										 	'last_name', 
    											'lead_source', 
    											'status',
    											'primary_address_postalcode',
    											array('name' => 'assigned_user_id', 'type' => 'enum', 'label' => 'LBL_ASSIGNED_TO', 'function' => array('name' => 'get_user_array', 'params' => array(false))),
    										  )
    						);
    
    
    ?>
    OS = CentOS 5.2
    Apache = 2.2.3
    PHP = 5.1
    Perl = 5.8.8
    MySQL = 5.0
    Sugar CE = 5.1.0b (Build 4905)
    Firefox = 2.0.0.20

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. HOW-TO guide for Email Campaigns.
    By agupta in forum Marketing/Campaign Management
    Replies: 146
    Last Post: 2012-01-31, 03:08 PM
  2. SugarSuite 4.0 - New Campaign management
    By manoj in forum Feature Requests
    Replies: 2
    Last Post: 2007-11-23, 10:13 PM
  3. campaign Target lists
    By cbierwerth in forum Feature Requests
    Replies: 4
    Last Post: 2006-11-01, 01:39 PM
  4. Bug / Feature request campaign with 2 Target lists
    By hheckner in forum General Discussion
    Replies: 1
    Last Post: 2006-10-30, 08:04 PM
  5. Missing Functionalities in SugarCRM 4.0.0 OS Version for Campaign Management
    By ravindram in forum Marketing/Campaign Management
    Replies: 1
    Last Post: 2006-05-16, 10:26 AM

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
  •