General Development
Sign In  ·  Help
Jump to Page:   1 · 2 · 3  |  Next Page
  Reply   Reply  

Default Template and Email From Address
Options    Options  
JayBNA
Regular Contributor
Posts: 16


JayBNA

Message 1 of 22

Viewed 33,965 times


Does anyone know of a way to automatically select a default email template and email from address for a case?  Our users are still have to do a lot of clicks and sometimes forget to use the email-to-case address.

Thanks in advance, Jay
Solved!
Go to the Solution
Go to Solution
07-10-2008 06:03 AM

All Users' Tags:

 
  Reply   Reply  

Re: Default Template and Email From Address   [ Edited ]
Options    Options  
werewolf
Super Contributor
Posts: 3273


werewolf

Message 2 of 22

Viewed 33,917 times


Watch the Service & Support blog on Successforce for an in-depth treatment of customizing the Email page -- it'll probably be posted next week.  Here's a relevant excerpt:

So let's say you have a template that you usually use for Cases which contains some pleasantries and then a merge field that adds in the text of any related Solutions.  If you've not used Email Templates much before, by the way, have a look at the sample template entitled "SUPPORT: Case Response with Solution (SAMPLE)" --  it does just what I've described here.

Anyway, what you'll want to do is make a custom button that preselects this template.  It's quite simple really.

The first thing you'll need to do is get the ID of the template you want to use.  This can be found by finding the template via Setup->Communication Templates->Email Templates.  Click on it and look in the URL -- you'll see an ID up there that looks like 00X30000000rNM0 (which may be followed by a ? with some other parameters -- ignore that stuff, just take the 15-character ID that starts with 00X).  Copy that ID into Notepad or someplace where you can get to it later.

Now go to Case and create a Custom Button -- let's call it Email Solution.  Set its Behavior to Execute Javascript and its Display Type to Detail Page Button.

In the Javascript area add this line of code, replacing the <your template here> with the ID of the template you saved earlier:

location.replace('/email/author/emailauthor.jsp?retURL=/{!Case.Id}&p3_lkid={!Case.Id}&rtype=003&p2_lkid={!Case.ContactId}&template_id=<your template here>');




Message Edited by werewolf on 07-11-2008 09:42 AM
07-11-2008 09:41 AM
 
  Reply   Reply  

Re: Default Template and Email From Address
Options    Options  
JayBNA
Regular Contributor
Posts: 16


JayBNA

Message 3 of 22

Viewed 33,829 times


Outstanding!  Now if it would only default to the correct reply address...

Thanks again, Jay
07-14-2008 01:06 PM
 
  Reply   Reply  

Re: Default Template and Email From Address
Options    Options  
werewolf
Super Contributor
Posts: 3273


werewolf

Message 4 of 22

Viewed 33,820 times


Try adding &p26=name@address.com to the URL.  Provided that email address is a valid selection in the list, it will be defaulted.
07-14-2008 03:33 PM
 
  Reply   Reply  

Re: Default Template and Email From Address
Options    Options  
JayBNA
Regular Contributor
Posts: 16


JayBNA

Message 5 of 22

Viewed 33,818 times


Works like a champ.  This will save many a click.

Thank, Jay
07-14-2008 03:41 PM
 
  Reply   Reply  

Re: Default Template and Email From Address
Options    Options  
werewolf
Super Contributor
Posts: 3273


werewolf

Message 6 of 22

Viewed 33,769 times


Here's the full blog post (I post these things on Wednesdays):

http://blogs.salesforce.com/support/2008/07/the-quick-email.html
07-16-2008 02:33 PM
 
  Reply   Reply  

Re: Default Template and Email From Address
Options    Options  
Austin JRB
Regular Contributor
Posts: 10


Austin JRB

Message 7 of 22

Viewed 33,637 times


This works very well except I have a situation where we are using "Person Accounts" .  How do I get the email address from a Person Account into the 'TO' field on the Case?

Thanks,

JRB


 

JRB
07-23-2008 07:00 AM

All Users' Tags:

 
  Reply   Reply  

Re: Default Template and Email From Address
Options    Options  
werewolf
Super Contributor
Posts: 3273


werewolf

Message 8 of 22

Viewed 33,628 times


For person accounts, where I used {!Case.ContactId} in the blog entry, use {!Case.AccountId} instead.  That will populate the To field with the person account, and if that person account has a valid email address then it will work.
07-23-2008 08:34 AM
 
  Reply   Reply  

Re: Default Template and Email From Address   [ Edited ]
Options    Options  
finalist
Regular Contributor
Posts: 92


finalist

Message 9 of 22

Viewed 30,491 times


I am trying to do the very same thing, but from an Opportunity rather than a Case.  I have it working for a specific Opportunity, but of course I want to make sure that it works across the board for all Opportunities.  What I'd like to know is what the particular IDs refer to.
 
Code:
finishedLocation = ('/email/author/emailauthor.jsp—retURL=
     /{!Opportunity.Id}&p3_lkid={!Opportunity.Id}
    &rtype=003&p2_lkid=0017000000SC8BY
    &template_id=00X70000000tw5Q');

 Here I am hard-coding the value for p2_lkid; in your example above it is the Contact ID or the Account ID (for a Person account), but there isn't a corresponding ID necessarily for an Opportunity.  I'd leave it out if possible, and force the user to make a selection, but leaving it blank isn't a valid choice.  That particular ID is what I gathered from the address when I selected Activities/Send Email from the Opportunity; the Opp IDs I was able to locate, but I don't know where the ID ending SC8BY (line 3) came from, so I don't know what to substitute there -- I thought it might be my user id, but no ...
 
Can the p2_lkid be bypassed?


Message Edited by finalist on 08-26-2008 06:39 PM
08-26-2008 06:25 PM
 
  Reply   Reply  

Re: Default Template and Email From Address
Options    Options  
werewolf
Super Contributor
Posts: 3273


werewolf

Message 10 of 22

Viewed 30,488 times


p3_lkid is the Related To field (which can be an Opportunity,a Case, etc.).  p2_lkid is the Contact or Lead field.  rtype tells it what is going to be in p2 – if it's a contact it'll be 003, if it's a lead it'll be 00Q. 

I would note that you have an extra space after{!Opportunity.Id} which might be breaking your URL.
08-26-2008 06:40 PM
 
Jump to Page:   1 · 2 · 3  |  Next Page