Results 1 to 4 of 4

Thread: Community Edition - Edit leads notification email

  1. #1
    Shairal is offline Member
    Join Date
    Apr 2009
    Posts
    6

    Default Community Edition - Edit leads notification email

    Is there a way to edit the outgoing email that is produced when a lead is entered? We would like to change the subject line, and add a few more fields to the body of the email to give the recipient a clear picture of the new lead.
    Thanks in advance for your assistance!

  2. #2
    zhunter is offline Member
    Join Date
    Jun 2009
    Posts
    5

    Default Re: Community Edition - Edit leads notification email

    It's pretty easy...

    You need to edit the following file in your SugarCRM installation to change the email notificaiton messages (not just lead messages).

    /include/langugages/en_us.notify_template.html

    Here is an excerpt from the file that you will need to edit to match your requirements.

    <!-- BEGIN: Lead_Subject -->
    SugarCRM Lead - {LEAD_NAME}
    <!-- END: Lead_Subject -->
    <!-- BEGIN: Lead -->
    {ASSIGNER} has assigned a Lead to {ASSIGNED_USER}.

    Name: {LEAD_NAME}
    Lead Source: {LEAD_SOURCE}
    Status: {LEAD_STATUS}
    Description: {LEAD_DESCRIPTION}

    You may review this Lead at:
    <{URL}>
    <!-- END: Lead -->

    The varibles used in your file are passed in by the calling page /modules/leads/lead.php in the set_notification_body function.

    function set_notification_body($xtpl, $lead)
    {
    global $app_list_strings;
    global $locale;

    $xtpl->assign("LEAD_NAME", $locale->getLocaleFormattedName($lead->first_name, $lead->last_name, $lead->salutation));
    $xtpl->assign("LEAD_SOURCE", (isset($lead->lead_source) ? $app_list_strings['lead_source_dom'][$lead->lead_source] : ""));
    $xtpl->assign("LEAD_STATUS", (isset($lead->status)? $app_list_strings['lead_status_dom'][$lead->status]:""));
    $xtpl->assign("LEAD_DESCRIPTION", $lead->description);

    return $xtpl;
    }

    Just look at the var in the Lead.php and Person.php, to find what you can access via the $lead property in the function.

    Good Luck,

    Zach Hunter

  3. #3
    jbeauchamp is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Gilbert, AZ
    Posts
    39

    Default Re: Community Edition - Edit leads notification email

    Anyone know where <{URL}> comes from? Its not set in the set_notification_body function and in my instance the email sent is displaying an incorrect link to the Lead. The site_url seemed like a logical value to use to create this URL but that value is correct and the email link is not.

    ********
    So I found where the URL value comes from (data/SugarBean.php) and it does appear to use $sugar_config['site_url'] to create the URL. The site I'm working on has multiple instances and uses virtual hosts so I think my problem has something to do with that.
    ********

    SugarCE 5.2.0d

    Thanks,
    James
    Last edited by jbeauchamp; 2009-09-09 at 11:24 PM. Reason: Found part of the answer

  4. #4
    Dale Thomas is offline Sugar Community Member
    Join Date
    Oct 2006
    Posts
    38

    Default Re: Community Edition - Edit leads notification email

    On this subject.

    How do I add custom fields to the email lead notification?

    I have a custom field lead_comments_c

    So I added it to my file
    Name: {LEAD_NAME}
    Lead Source: {LEAD_SOURCE}
    Status: {LEAD_STATUS}
    Lead Comment: {lead_comments_c}

    But that is not seeming to work.

    Any ideas?

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 2009-05-11, 05:38 PM
  2. Replies: 1
    Last Post: 2008-11-10, 08:35 PM
  3. Replies: 0
    Last Post: 2008-11-10, 04:36 AM
  4. Howto upgrade from community edition 4.5.1e to professional edition 5.0.0e?
    By sondrup in forum Installation and Upgrade Help
    Replies: 4
    Last Post: 2008-10-22, 10:45 PM
  5. consult about email modul in Sugar Community Edition
    By mjcr777 in forum General Discussion
    Replies: 1
    Last Post: 2008-08-14, 05:51 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
  •