Results 1 to 8 of 8

Thread: Adding Lead Capture Contact To Target List

  1. #1
    zmikko is offline Member
    Join Date
    Aug 2008
    Posts
    11

    Default Adding Lead Capture Contact To Target List

    What is the process to have a lead capture form/data automatically populate in a unique and specific target list e.g. "Target List From Website" ???

    Thanks Much,


    Community Edition

  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: Adding Lead Capture Contact To Target List

    Hi zmikko

    You can edit the WebToLeadCapture.php file and add the code
    PHP Code:
    $lead->load_relationship('prospect_lists');
    $lead->prospect_lists->add('prospect_list_id'); 
    Where 'prospect_list_id' is the id of the "Target List From Website"

    Just bellow the line

    PHP Code:
                    $lead->save(); 
    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  3. #3
    zmikko is offline Member
    Join Date
    Aug 2008
    Posts
    11

    Default Re: Adding Lead Capture Contact To Target List

    Thanks Andopes, you've answered a lot of my questions!

  4. #4
    cafevino is offline Senior Member
    Join Date
    Dec 2009
    Location
    Fort Collins, CO
    Posts
    31

    Default Re: Adding Lead Capture Contact To Target List

    I know this is an old thread but I've been looking for an answer to no avail. I'm using Sugar Community Version 5.5.0 (Build 6653). Can the prospect_list_id be a variable that is pulled from different web forms so that leads are assigned to different target lists based on where they came from? Or is that already what's going on here and I'm missing something? Is this code viable for my version?

  5. #5
    tomkerswill is offline Sugar Community Member
    Join Date
    Jul 2006
    Posts
    58

    Default Re: Adding Lead Capture Contact To Target List

    Did you find out whether this code is still valid for 5.5? I'd really like to be able to do the same thing.

    EDIT --- for 5.5, the instructions are very similar. Here's where I put my code

    $lead->load_relationship('campaigns');
    $lead->campaigns->add($camplog->id);
    //BEGIN NEW CODE
    $id_of_target_list="d68463a3-d15a-6970-aecf-4be28eba690a"; //Id of my target list
    $lead->load_relationship('prospect_lists');
    $lead->prospect_lists->add($id_of_target_list);
    //END NEW CODE
    if(!empty($GLOBALS['check_notify'])) {
    $lead->save($GLOBALS['check_notify']);
    }
    else {
    $lead->save(FALSE);
    }
    Last edited by tomkerswill; 2010-05-06 at 09:46 AM. Reason: Provide fix

  6. #6
    barrybert is offline Senior Member
    Join Date
    May 2010
    Posts
    75

    Default Re: Adding Lead Capture Contact To Target List

    Thanks Andopes, you've answered a lot of questions! you are genius..i must say..



  7. #7
    D A G's Avatar
    D A G is offline Senior Member
    Join Date
    Sep 2009
    Posts
    30

    Question Re: Adding Lead Capture Contact To Target List

    Hi zmikko

    You can edit the WebToLeadCapture.php file and add the code
    PHP Code:
    $lead->load_relationship('prospect_lists');
    $lead->prospect_lists->add('prospect_list_id');
    Where 'prospect_list_id' is the id of the "Target List From Website"

    Just bellow the line

    PHP Code:
    $lead->save();
    Cheers
    Hi andopes, i've done what you suggest, but now i'd like to create a new Web to Lead Form which links the leads into a NEW target list. Is there any possibility of doing this two times at the same time?

  8. #8
    dylanphelan is offline Junior Member
    Join Date
    Oct 2010
    Posts
    4

    Default Re: Adding Lead Capture Contact To Target List

    Hi

    Is it possible to add the leads to a specific target list based on what they filled in in the lead form?

    Also - is it possible to add names, emails etc to the contacts intead of to the leads via a form on your website.

    Am new to sugar, so not really sure how it is meant to work.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Email management - Improvements in future releases
    By manoj in forum Feature Requests
    Replies: 102
    Last Post: 2009-11-17, 06:43 AM
  2. Replies: 0
    Last Post: 2008-05-09, 03:36 AM
  3. Target List Add from Leads popup failure
    By johnswolter in forum Help
    Replies: 0
    Last Post: 2008-02-20, 08:40 PM
  4. [urgent] target list with all leads in the system
    By sshweta in forum Marketing/Campaign Management
    Replies: 5
    Last Post: 2006-09-29, 09:54 PM
  5. Replies: 0
    Last Post: 2006-08-23, 06:08 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
  •