Results 1 to 3 of 3

Thread: How can I create a campaign from my leads?

  1. #1
    zmao is offline Junior Member
    Join Date
    Sep 2007
    Posts
    4

    Question How can I create a campaign from my leads?

    Hi,
    I have more than 50000 contact list. I add the filter of industry and location in the leads and contact information. Now I want to create a campaign focus on one industry and one location. How can I realize this goal? I tried to create a search form in the target. But it can't work with leads.
    Any advice will be appreciated.
    Thanks

  2. #2
    kbrill's Avatar
    kbrill is offline SugarCRM PS Engineer
    Join Date
    Jul 2004
    Location
    St Louis, MO
    Posts
    3,183

    Default Re: How can I create a campaign from my leads?

    I am not sure you can do anything like this automatically in the OS product, in the PRO and ENT products you can base a campaign on a report but of course this is not in the OS product.

    The only way you could do this in the OS product would be to add the leads/contacts manually to a target list for the campaign, or write a script that did it for you. I think you might be able to do it with a single SQL script that used the SELECT INTO command but it would take a little research to know for sure.
    Kenneth Brill - Help Forum Moderator

    I do not respond to 'Private Messages'. Please email me directly instead

    When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
    Help us Help You

  3. #3
    michaelest is offline Sugar Community Member
    Join Date
    Apr 2007
    Posts
    37

    Default Re: How can I create a campaign from my leads?

    I just finished doing this... creating a campaign from my leads (Actually, adding Leads to a Target List then using the list in a campaign).

    It'll take some customization work on two LEAD files,
    a) popupdefs.php (in the /modules/leads/metadata directory)
    b) Popup_picker.html (in the /modules/leads directory)

    I. In the Popup_picker.html file, you'll need to open it in a text editor and do the following:
    a. Find the code that starts the search form
    Code:
    <form action="index.php" method="post" name="popup_query_form" id="popup_query_form">
    b. in the html code that follows, use common sense in copying a replacing the existing code and changing the copied code to reflect your custom data fields. I just took a whole row of existing code and copied it below the original so as not to disrupt the table. Here's a visual...

    Find this:
    Code:
    <tr>
    <td width="20%" class="dataLabel">{MOD.LBL_LEAD_SOURCE}</td>
    <td width="30%" class="dataField"><select name="lead_source">{LEAD_SOURCE_OPTIONS}</select></td>
    <td width="20%" class="dataLabel">{MOD.LBL_STATUS}</td>
    <td width="30%" class="dataField"><select name="status">{STATUS_OPTIONS}</select></td>
    <td class="dataLabel">&nbsp;</td>
    </tr>
    and change it into this (*NOTE: Change the INDUSTRY_C and LOCATION_C field names in the following example to whatever your custom field names are)
    Code:
    <tr>
    <td width="20%" class="dataLabel">{MOD.LBL_LEAD_SOURCE}</td>
    <td width="30%" class="dataField"><select name="lead_source">{LEAD_SOURCE_OPTIONS}</select></td>
    <td width="20%" class="dataLabel">{MOD.LBL_STATUS}</td>
    <td width="30%" class="dataField"><select name="status">{STATUS_OPTIONS}</select></td>
    <td class="dataLabel">&nbsp;</td>
    </tr>
    <tr>
    <td width="20%" class="dataLabel">{MOD.INDUSTRY_C}</td>
    <td width="30%" class="dataField"><input type="text" size="10" name="industry_c" class="dataField" value="{INDUSTRY_C}" /></td>
    <td width="20%" class="dataLabel">{MOD.LOCATION_C}</td>
    <td width="30%" class="dataField"><input type="text" size="10" name="location_c" class="dataField" value="{LOCATION_C}" /></td>
    <td class="dataLabel">&nbsp;</td>
    </tr>
    c. Finally, find this code:
    Code:
    <!-- BEGIN: row -->
    <tr height="20" 
    	onmouseover="setPointer(this, '{LEAD.ID}', 'over', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');"
    	onmouseout="setPointer(this, '{LEAD.ID}', 'out', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');"
    	onmousedown="setPointer(this, '{LEAD.ID}', 'click', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');">
    <td class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}" valign='top'>{PREROW}</td>
    <td scope="row" valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}" ><{TAG_TYPE} href="#" class="listViewTdLinkS1" onclick="send_back('Leads','{LEAD.ID}');">{LEAD.FULL_NAME}</{TAG_TYPE}></td>
    <td valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">{LEAD.ACCOUNT_NAME}</td>
    </tr>
    and change it to this...
    Code:
    <!-- BEGIN: row -->
    <tr height="20" 
    	onmouseover="setPointer(this, '{LEAD.ID}', 'over', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');"
    	onmouseout="setPointer(this, '{LEAD.ID}', 'out', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');"
    	onmousedown="setPointer(this, '{LEAD.ID}', 'click', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');">
    <td class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}" valign='top'>{PREROW}</td>
    <td scope="row" valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}" ><{TAG_TYPE} href="#" class="listViewTdLinkS1" onclick="send_back('Leads','{LEAD.ID}');">{LEAD.FULL_NAME}</{TAG_TYPE}></td>
    <td valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">{LEAD.ACCOUNT_NAME}</td>
    <td valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">{LEAD.INDUSTRY_C}</td>
    <td valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">{LEAD.LOCATION_C}</td>
    </tr>
    d. save and upload to the appropriate directory.

    II. Change the popupdefs.php file so that it includes your new fields
    a. Where the original code is...
    Code:
    'whereClauses' => 
    							array('first_name' => 'leads.first_name', 
    									'last_name' => 'leads.last_name',
    									'lead_source' => 'leads.lead_source',
    									'status' => 'leads.status'),
    
    						'selectDoms' =>
    add your custom fields so that it resembles this...(remember to change the industry_c and location_c references to match your actual field names)
    Code:
    'whereClauses' => 
    							array('first_name' => 'leads.first_name', 
    									'last_name' => 'leads.last_name',
    									'lead_source' => 'leads.lead_source',
    									'status' => 'leads.status',
    									'industry_c' => 'leads_cstm.industry_c',
    									'location_c' => 'leads_cstm.location_c'),
    						'selectDoms' =>
    b. Still in the popupdefs.php file, add your custom field names to the 'Search Inputs' area. So, where it looks like this...
    Code:
    'searchInputs' =>
    							array('first_name', 'last_name', 'lead_source', 'status')
    add your custom field names so it resembles this...
    Code:
    'searchInputs' =>
    							array('first_name', 'last_name', 'lead_source', 'status', 'industry_c', 'location_c')
    c. Save the file and upload it to the appropriate directory on your server.

    Next time you go to add Leads to a Target List which is to be used in a campaign, you will have two new Text Areas in which to enter either Industry or Location strings on which to search on. You can filter them in the popup to make adding them to a campaign easier.

    *Note: You may want to temporarily increase your Maximum List items if you have a lot of leads to add. I up mine to anywhere between 200 and 500 when I need to add a lot of leads to a campaign. Don't forget to turn the limit back down (because this affects all users and all list panels).

    Let me know if you have any questions/issues.

    Good luck.

    - MichaelEst

    By the way, if you want to add a "Sort" capability to the lead list, open up the Popup_picker.html file and change the code as follows...
    Find this code (this controls the List fields, which by default are only Lead Name and Account Name)...
    Code:
    <tr height="20">
    <td scope="col" class="listViewThS1" NOWRAP>{CHECKALL}</td>
    <td scope="col" width="50%" class="listViewThS1" nowrap="nowrap">&nbsp;<a href="{ORDER_BY}last_name" class="listViewThLinkS1">{MOD.LBL_CONTACT_NAME}{arrow_start}{last_name_arrow}{arrow_end}</a></td>
    <td scope="col" width="50%" class="listViewThS1" nowrap="nowrap">&nbsp;{MOD.LBL_ACCOUNT_NAME}</td>
    </tr>
    and change it to this...
    Code:
    <tr height="20">
    <td scope="col" class="listViewThS1" NOWRAP>{CHECKALL}</td>
    <td scope="col" width="25%" class="listViewThS1" nowrap="nowrap">&nbsp;<a href="{ORDER_BY}last_name" class="listViewThLinkS1">{MOD.LBL_CONTACT_NAME}{arrow_start}{last_name_arrow}{arrow_end}</a></td>
    <td scope="col" width="25%" class="listViewThS1" nowrap="nowrap">&nbsp;{MOD.LBL_ACCOUNT_NAME}</td>
    <td scope="col" width="25%" class="listViewThS1" nowrap="nowrap">&nbsp;<a href="{ORDER_BY}industry_c" class="listViewThLinkS1">{MOD.industry_c}{arrow_start}{industry_c_arrow}{arrow_end}</a></td>
    <td scope="col" width="25%" class="listViewThS1" nowrap="nowrap">&nbsp;<a href="{ORDER_BY}location_c" class="listViewThLinkS1">{MOD.location_c}{arrow_start}{location_c_arrow}{arrow_end}</a></td>
    </tr>
    Remember to change the industry_c and location_c fields to match your custom field names.

    But beware, if you do have a large quantity of leads and you use the sort on the new/add'l fields, it has the impact of slowing Sugar down to a barely a crawl. It's best to sort them only AFTER you've already filtered them using the new search code outlined at the beginning of this post.
    Last edited by michaelest; 2007-09-22 at 04:09 PM.
    michaelest
    sugarCRM OS 4.5.1e (build 1049)
    PHP Version 5.2.3
    Apache 2.2.4
    FreeBSD 6.2-RELEASE #0:

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. SugarSuite 4.0 - New Campaign management
    By manoj in forum Feature Requests
    Replies: 2
    Last Post: 2007-11-23, 10:13 PM
  2. Non-email campaign management
    By tomv in forum Feature Requests
    Replies: 0
    Last Post: 2006-06-05, 06:13 PM
  3. 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
  4. Create Leads on a Campaign
    By wagnerbl in forum Help
    Replies: 0
    Last Post: 2006-01-04, 10:11 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
  •