Results 1 to 9 of 9

Thread: Automated email reminder on selection

  1. #1
    Monkeyman is offline Senior Member
    Join Date
    May 2009
    Posts
    55

    Default Automated email reminder on selection

    I am quite new to Sugar and need some help.
    I need to make an automated email remider to the client when I change the state of the sale.

    For example, I have 3 states of the sale (order): "Completed", "Packing" and "Received".
    • "Received" is default and no reminder is being sent.
    • When I change it to "Packing", an email with "Your order is being processed" is being sent.
    • When I change to "Completed" an email "You order has been shipped. You tracking number is: X" is being sent.

    In last option I would like to write down a tracking number in the corresponding field and it should automatically being added into message body.

    How can I do that and is it even possible?

    P.S.: I can do some JS/PHP scripting if needed. Not much, but simple one is OK.

  2. #2
    Monkeyman is offline Senior Member
    Join Date
    May 2009
    Posts
    55

    Default Re: Automated email reminder on selection

    So is there a solution to this? Is it even possible to send a reminders to account's email when a certain field value of opportunity is changed?

    I think simple mail() function with message templait would suffice, but I don't know where to put it. A simple check-and-send on Save is OK.

  3. #3
    Join Date
    Feb 2007
    Location
    San Jose, CA
    Posts
    1,169

    Default Re: Automated email reminder on selection

    This feature is part of the Workflows functionality (Sugar Pro/Enterprise).
    Susie Williams

  4. #4
    Monkeyman is offline Senior Member
    Join Date
    May 2009
    Posts
    55

    Default Re: Automated email reminder on selection

    Quote Originally Posted by susiewilliams View Post
    This feature is part of the Workflows functionality (Sugar Pro/Enterprise).
    Thank you, but I am going to stay with free version. So I hope to hear the answer on my question from someone.

  5. #5
    Monkeyman is offline Senior Member
    Join Date
    May 2009
    Posts
    55

    Default Re: Automated email reminder on selection

    I've made a logic hook for Opportunities module which mails a reminder, but I need a little help with customizing message. But I have no idea how to add an email address of the account to $mailer->AddAddress() since it's from Accounts module.

    Can anybody help?

  6. #6
    monicaDC is offline Sugar Community Member
    Join Date
    Feb 2009
    Posts
    175

    Default Re: Automated email reminder on selection

    Hi! You can try using this module to trigger the event: http://www.sugarforge.org/projects/processmanager. It works like workflow and will allow you to send the email template.

  7. #7
    Monkeyman is offline Senior Member
    Join Date
    May 2009
    Posts
    55

    Default Re: Automated email reminder on selection

    Thanx a lot for a useful link, but still I would love to understand how can I retrieve the certain value from other module in logic hook. In my case I need to retrieve an email address from Accounts to use in logic hook for Opportunities.

    Probably something like this $bean -> $Accounts -> email.

  8. #8
    Monkeyman is offline Senior Member
    Join Date
    May 2009
    Posts
    55

    Default Re: Automated email reminder on selection

    OK, I found the way to retrieve email for given opportunity, but it's too complex, I think:

    Code:
    			
    $db = DBManagerFactory::getInstance();
    
    $query_id = "SELECT account_id FROM accounts_opportunities WHERE opportunity_id = '".$bean->id."'";
    $result = $db->query($query_id, true, 'Error selecting opportunity ID');
    $row=$db->fetchByAssoc($result); 
    $account_id = $row['account_id'];
    
    $query_ebean = "SELECT email_address_id FROM email_addr_bean_rel WHERE bean_id = '".$account_id."'";
    $result = $db->query($query_ebean, true, 'Error selecting bean ID');
    $row=$db->fetchByAssoc($result); 
    $ebean = $row['email_address_id'];
    
    $query_email = "SELECT email_address FROM email_addresses WHERE id = '".$ebean."'";
    $result = $db->query($query_email, true, 'Error selecting email');
    $row=$db->fetchByAssoc($result); 
    $email = $row['email_address'];
    Is there a more simple way to retrieve email?

  9. #9
    petruzzo is offline Sugar Community Member
    Join Date
    Feb 2010
    Posts
    15

    Default Re: Automated email reminder on selection

    I'm also looking to do something almost identical to this. Except not with tracking numbers.

    Have you figured out how to pull it off?

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. automated email linking
    By jbarrio in forum Help
    Replies: 6
    Last Post: 2009-06-23, 10:40 AM
  2. Replies: 3
    Last Post: 2008-06-25, 09:48 PM
  3. reminder email
    By vlade in forum Italiano
    Replies: 3
    Last Post: 2008-04-22, 08:29 PM
  4. Automated Email -> Case
    By Andigator in forum Help
    Replies: 2
    Last Post: 2007-11-15, 03:40 PM
  5. Automated Email Reply System
    By SkillsActiveMH in forum Help
    Replies: 1
    Last Post: 2007-07-19, 07:53 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
  •