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

Thread: How can I customize "Assigned to" into a case that was automatically created?

  1. #1
    domenico1983 is offline Senior Member
    Join Date
    Jun 2008
    Posts
    108

    Default How can I customize "Assigned to" into a case that was automatically created?

    I am using the release 5.1. I have used the feature of the automatic creation of a case from Inbound Email. I have two users with two different roles: administrator with all privileges and simple user with some restriction, in particular the simple user can read only the own cases. But I have a problem because when an email is received it is automatically transformed in case and for default it is "Assigned to" administrator. How could I modify this feature? I want to assign to simple user the cases created from the emails directed to simple user!

  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: How can I customize "Assigned to" into a case that was automatically created?

    Hi Domenico

    Can you explain the work flow for create a new case based on Inbound Email?
    How do you know for which user the case must be assigned to?
    What is the source code for creating a new case from Inbound Email?
    After these answers I hope I can help you.

    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
    domenico1983 is offline Senior Member
    Join Date
    Jun 2008
    Posts
    108

    Default Re: How can I customize "Assigned to" into a case that was automatically created?

    I have used the feature of the release 5.1. I have created an account email for administrator and during the creation I have setted "create case" as "possible action". So when an email is sent to this account it is immediatly converted into a new case. I have replied this operation for the account of a simple user. But all the case created are "Assigned to" administrator for default..I want to assign to the administrator the case created from the emails that are sent to the account of administrator and to simple user the case created from the emails that are sent to the simple user.

  4. #4
    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: How can I customize "Assigned to" into a case that was automatically created?

    Hi Domenico

    I browsed on the Inbound Email Create Case script and I believe you need to define an "Assign To Group Folder" and "Distribution Method" set to "Least-Busy" to assign the case to the email assigned user.

    Let me know if it works.

    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.

  5. #5
    domenico1983 is offline Senior Member
    Join Date
    Jun 2008
    Posts
    108

    Default Re: How can I customize "Assigned to" into a case that was automatically created?

    I have tried in this way but it doesn't work.

  6. #6
    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: How can I customize "Assigned to" into a case that was automatically created?

    Hi Domenico

    Ask kuske. He is one of the most expert on SugarCRM Emails feature.
    I just toke a look at the code and guided you. Kuske probably has the skills you are looking for.

    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.

  7. #7
    domenico1983 is offline Senior Member
    Join Date
    Jun 2008
    Posts
    108

    Default Re: How can I customize "Assigned to" into a case that was automatically created?

    I have sent a private message to kuske with the indication of this post. I hope to solve the problem because it is a crucial step for my work! Thank you a lot for the help andopes!
    Domenico

  8. #8
    kuske's Avatar
    kuske is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    2,597

    Default Re: How can I customize "Assigned to" into a case that was automatically created?

    Tz tz tz André.... (that costs a beer)

    It is very simple, alle already existing cases are routed to the case owner.

    New cases are created in module /modules/InboundEmail/InboundEmail.php in function handleCreateCase($email,$userid)

    If you want to assign all new cases to a predefined Userid you cann add a line after the function header like this:

    PHP Code:
    function handleCreateCase($email$userId) {
    global 
    $current_user$mod_strings$current_language;
    //neu Line:
    $userid='846b2689-69d8-e65e-1fe7-4857a95f8466'
    // 
    $mod_strings return_module_language($current_language"Emails"); 
    The function handleCreateCase itself is called from the scheduler module /modules/Scheduler/_AddJobsHere.php where the userid is determined by certain load-sharing algorithms. Instead of changing InboundEmail.php you could even change the call from

    PHP Code:
    $ieX->handleCreateCase($ieX->email$userId); 
    to
    PHP Code:
    $userId='846b2689-69d8-e65e-1fe7-4857a95f8466'
    $ieX->handleCreateCase($ieX->email$userId); 
    '846b2689-69d8-e65e-1fe7-4857a95f8466' is only an example, I am really sure you have no such userid in your system yet.
    Harald Kuske
    Pre-Sales Engineer Central Europe

    SUGARCRM Deutschland GmbH
    Erika-Mann-Str. 53, 80636 Munich, Germany
    Email: hkuske@sugarcrm.com
    Home: http://www.sugarcrm.com


  9. #9
    domenico1983 is offline Senior Member
    Join Date
    Jun 2008
    Posts
    108

    Default Re: How can I customize "Assigned to" into a case that was automatically created?

    I have seen the response..but it doesn't properly solve the problem. I don't want to absign the case to a static $userid, instead I want that the new case created from the Inbound Email is assigned to the user who have the account.

    Thank you in advance,

    Domenico

  10. #10
    kuske's Avatar
    kuske is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    2,597

    Default Re: How can I customize "Assigned to" into a case that was automatically created?

    During the case generation you do not have the possibility to decide from which account the case came in any way.
    It is possible that a new Contact at the Account sends you a case, a contact you do not have in your Sugar database.

    For these emails which have already known email-senders you can set the userid in InboundEmail.php after (~ line 2775)

    PHP Code:
         $acct->retrieve($c->account_id); 
    there you can add a statement:

    PHP Code:
         $acct->retrieve($c->account_id);
    $c->assigned_user_id $acct->assigned_user_id
    Harald Kuske
    Pre-Sales Engineer Central Europe

    SUGARCRM Deutschland GmbH
    Erika-Mann-Str. 53, 80636 Munich, Germany
    Email: hkuske@sugarcrm.com
    Home: http://www.sugarcrm.com


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. Replies: 15
    Last Post: 2010-04-01, 04:04 PM
  2. Case account_name blank if created through soap
    By eggsurplus in forum Developer Help
    Replies: 1
    Last Post: 2008-01-25, 08:17 PM
  3. Send email to Contact when a Case is created
    By MichaelRLevy in forum Help
    Replies: 1
    Last Post: 2007-09-27, 10:13 PM
  4. Replies: 0
    Last Post: 2006-06-20, 11:25 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
  •