• Joe_Ipsen
  • NEWBIE
  • 75 Points
  • Member since 2009

  • Chatter
    Feed
  • 3
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 32
    Replies
I have set up a web-to-lead form in which I am collecting several email addresses at once. What I would like to do is set up an auto response rule to one of the other email addresses that is stored in a custom field. Is there a workaround to setting up an auto response to reply to the custom email field I specify -- i.e. setting up a workflow rule or something like this? I would like to avoid having to store the email I want the auto response to go in the main Email field associated with the lead record and I definitely want to stay away from having to send an email manually each time this form is filled out.
 
Any helpful suggestions or just a blatant "no, this cannot be accomplished?"
 
Thx!
 

The Known Issue:

 

If the Case description field contains <script> and </script> all special characters are escaped (even the characters outside the tags).

For example:

<script type="text/javascript" src="http://www.google.com/jsapi"></script>
google.load("earth", "1", {"other_params":"client=gme-noaa&sensor=false&channel=NMFS.SWFSC.PRD.ShipResearchSurveys"});

changes to:

&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.google.com/jsapi"></script>;
google.load(&quot;earth&quot;, &quot;1&quot;, {&quot;other_params&quot;:&quot;client=gme-noaa&amp;sensor=false&amp;channel=NMFS.SWFSC.PRD.ShipResearchSurveys&quot;});

The same behaviour is not observed when entering the same text into a Case Comment.

 

The Workaround:

 

Create a workflow rule on Cases which triggers every time the case is created or edited. Add a Field Update to this rule to update the Description field with syntax like:

SUBSTITUTE (
SUBSTITUTE (
SUBSTITUTE (
SUBSTITUTE(Description , '&amp;' , '&') ,
'&lt;', '<' ),
'&gt;','>' ),
'&quot;','"' )

Ever built a system to monitor whether cases are being successfully created from web forms?  If so, how?

I am curious if anyone has built any systems that would monitor whether email was being successfully delivered from Salesforce.

We have a lookup field on the Case object that references an Opportunity. As part of our workflow, the Support Rep populates this Opportunity field when they create the case. 

We would like the opposite end of this relationship to display the Case number and subject on the Opportunity. 

I currently have the Cases Related List displayed on the Opportunity object, but we see other Cases that are not related through a Lookup field in this list so I am wondering if this Related List is showing other relationships? 

 



Some other questions I have from other attempts I have tried to represent this information on the Opportunity: 

1) I tried adding a text formula on the Opportunity that would show the Case Number and/or Subject. I did not see these choices on the Choose Field window, so I am guessing these are not available. Even if they were, this would not be ideal as they would be straight text and could not be clicked to take the user to the Case object. 

2) I tried to add a lookup field on the Opportunity that points towards the Case hoping that the relationship created by the Lookup field on the case would populate this field. It did not link the case.

I am attempting to build a Custom Date field "Deployment Date" on the Asset object that is editable, but starts with the default value of another date field "Support Start Date" + 30 days.  This field is also on the Asset object.

 

That's it.  Pretty darn simple, and yet, the field is not populated with anything not even when I open a new record. 

 

This should be a fairly simple issue, but I can't find any explanation for why it is not working in the documentation.  Here's the most direct documentation I was able to find.

 

https://na4.salesforce.com/help/doc/user_ed.jsp?loc=help

To augment Web2Case's matching* in SFDC, I am attempting to build a relationship between the domain name within the submitted email address to the Asset and/or Account.

trigger domainMatch on Case (before insert) { for (Case c : Trigger.new) { String WebEmail = c.SuppliedEmail; System.debug('WebEmail = ' + WebEmail); // Find where the @ sign occurs Integer index = WebEmail.indexOf('@', 0); System.debug('index = ' + index); // Extract all text after the @ sign String emailDomain = WebEmail.substring(index+1); System.debug('emailDomain = ' + emailDomain); // When the Contact has not been matched, search through Account & Asset for the Domain if ((c.Contact == null) && (index != -1)) { if ([SELECT a.Name from Account a WHERE a.Name = :emailDomain] != null) { c.Account = [SELECT a.id from Account a WHERE a.Name = :emailDomain]; update c.Account; System.debug('c.Account = ' + c.Account); } if ([SELECT a.Name from Account a WHERE a.Name = :emailDomain] != null) { c.Asset = [SELECT a.id from Asset a WHERE a.Name = :emailDomain]; update c.Asset; System.debug('c.Asset = ' + c.Asset); } } } }

 

From looking at the debug logs (below) I have extracted the domain name from the email address and am able to find the appropriate ID in SFDC, but the lookup field on the Case record does not appear to be linked to the Asset or Account. 

 

How can I link the case to the Account and/or Asset?

 *** Beginning domainMatch on Case trigger event BeforeInsert for null

20090902190439.204:Trigger.domainMatch: line 14, column 5: SelectLoop:LIST:SOBJECT:Case
20090902190439.204:Trigger.domainMatch: line 17, column 5: WebEmail = nosuchuser@domain.com
20090902190439.204:Trigger.domainMatch: line 22, column 5: index = 10
20090902190439.204:Trigger.domainMatch: line 26, column 5: emailDomain = domain.com
20090902190439.204:Trigger.domainMatch: line 30, column 17: SOQL query with 1 row finished in 44 ms
20090902190439.204:Trigger.domainMatch: line 31, column 29: SOQL query with 1 row finished in 21 ms
20090902190439.204:Trigger.domainMatch: line 32, column 17: Update: SOBJECT:Account
20090902190439.204:Trigger.domainMatch: line 32, column 17:     DML Operation executed in 110 ms
20090902190439.204:Trigger.domainMatch: line 33, column 17: c.Account = Account:{Id=0016000000MKEMVAA5}
20090902190439.204:Trigger.domainMatch: line 35, column 17: SOQL query with 1 row finished in 30 ms
20090902190439.204:Trigger.domainMatch: line 36, column 27: SOQL query with 1 row finished in 44 ms
20090902190439.204:Trigger.domainMatch: line 37, column 17: Update: SOBJECT:Asset
20090902190439.204:Trigger.domainMatch: line 37, column 17:     DML Operation executed in 75 ms
20090902190439.204:Trigger.domainMatch: line 38, column 17: c.Asset = Asset:{Id=02i60000004B2vBAAS}

Cumulative resource usage:

Resource usage for namespace: (default)
Number of SOQL queries: 4 out of 20
Number of query rows: 4 out of 1000
Number of SOSL queries: 0 out of 0
Number of DML statements: 2 out of 20
Number of DML rows: 2 out of 100
Number of script statements: 14 out of 10200
Maximum heap size: 0 out of 200000
Number of callouts: 0 out of 10
Number of Email Invocations: 0 out of 10
Number of fields describes: 0 out of 10
Number of record type describes: 0 out of 10
Number of child relationships describes: 0 out of 10
Number of picklist describes: 0 out of 10
Number of future calls: 0 out of 10
Number of find similar calls: 0 out of 0
Number of System.runAs() invocations: 0 out of 0

Total email recipients queued to be sent : 0

*** Ending domainMatch on Case trigger event BeforeInsert for null

 

BTW, I know that I need to build better bulk processing into this code . . . that's the next challenge.

 

==================================

* By default, Web2Case only compares the complete email address to the Email address within Contact records.  If anyone else at that company submits a case and they do not have a Contact record with their email address, their case is not associated with that Account nor Asset.

I have a particular set of emails coming into SFDC that are being converted into cases, but the system that generates these is using noreply@domain.com as the From: address and the actual customer's email is included in the Reply-to:.  Because of this, all of the cases have a Web Email address of noreply@domain.com and the actual email address is only accessible by viewing the headers of the Message object.

 

From a support perspective, this is very labor intensive as they have to extract the address from the Message object and update the field in the case.  How can we automate this?

 

After looking at the fields available to Workflow and Field Updates on the Message Object, I did not find a way to pull this information out and insert it onto the case in the Web Email address.  

 

If this is possible using workflow or even a simple trigger I would like to hear your suggestions as this seems much more attainable than the option I have considered:

 

- rebuilding On-demand Email-to-Case using an Apex Email service.

- writing an Apex Email Service to accept these messages and swap the two addresses with the hope that it could then hand the message off to On-demand Email-to-Case.

In our organisation there is one user who has a problem concerning the lookup-windows. Everytime she clicks on the lookup-icon, the new lookup-window appears for 1 second and then disappears again.  So it's impossible to make a choice from the lookup list. Since all our other users are not experiencing any problems, I guess it has something to do with the internet options of this specific user.

 

Anyone got a clue which internet setting could block the lookup-window from opening?

 

Thanks in advance.

I am curious if anyone has built any systems that would monitor whether email was being successfully delivered from Salesforce.

We have a lookup field on the Case object that references an Opportunity. As part of our workflow, the Support Rep populates this Opportunity field when they create the case. 

We would like the opposite end of this relationship to display the Case number and subject on the Opportunity. 

I currently have the Cases Related List displayed on the Opportunity object, but we see other Cases that are not related through a Lookup field in this list so I am wondering if this Related List is showing other relationships? 

 



Some other questions I have from other attempts I have tried to represent this information on the Opportunity: 

1) I tried adding a text formula on the Opportunity that would show the Case Number and/or Subject. I did not see these choices on the Choose Field window, so I am guessing these are not available. Even if they were, this would not be ideal as they would be straight text and could not be clicked to take the user to the Case object. 

2) I tried to add a lookup field on the Opportunity that points towards the Case hoping that the relationship created by the Lookup field on the case would populate this field. It did not link the case.

I am attempting to build a Custom Date field "Deployment Date" on the Asset object that is editable, but starts with the default value of another date field "Support Start Date" + 30 days.  This field is also on the Asset object.

 

That's it.  Pretty darn simple, and yet, the field is not populated with anything not even when I open a new record. 

 

This should be a fairly simple issue, but I can't find any explanation for why it is not working in the documentation.  Here's the most direct documentation I was able to find.

 

https://na4.salesforce.com/help/doc/user_ed.jsp?loc=help

To augment Web2Case's matching* in SFDC, I am attempting to build a relationship between the domain name within the submitted email address to the Asset and/or Account.

trigger domainMatch on Case (before insert) { for (Case c : Trigger.new) { String WebEmail = c.SuppliedEmail; System.debug('WebEmail = ' + WebEmail); // Find where the @ sign occurs Integer index = WebEmail.indexOf('@', 0); System.debug('index = ' + index); // Extract all text after the @ sign String emailDomain = WebEmail.substring(index+1); System.debug('emailDomain = ' + emailDomain); // When the Contact has not been matched, search through Account & Asset for the Domain if ((c.Contact == null) && (index != -1)) { if ([SELECT a.Name from Account a WHERE a.Name = :emailDomain] != null) { c.Account = [SELECT a.id from Account a WHERE a.Name = :emailDomain]; update c.Account; System.debug('c.Account = ' + c.Account); } if ([SELECT a.Name from Account a WHERE a.Name = :emailDomain] != null) { c.Asset = [SELECT a.id from Asset a WHERE a.Name = :emailDomain]; update c.Asset; System.debug('c.Asset = ' + c.Asset); } } } }

 

From looking at the debug logs (below) I have extracted the domain name from the email address and am able to find the appropriate ID in SFDC, but the lookup field on the Case record does not appear to be linked to the Asset or Account. 

 

How can I link the case to the Account and/or Asset?

 *** Beginning domainMatch on Case trigger event BeforeInsert for null

20090902190439.204:Trigger.domainMatch: line 14, column 5: SelectLoop:LIST:SOBJECT:Case
20090902190439.204:Trigger.domainMatch: line 17, column 5: WebEmail = nosuchuser@domain.com
20090902190439.204:Trigger.domainMatch: line 22, column 5: index = 10
20090902190439.204:Trigger.domainMatch: line 26, column 5: emailDomain = domain.com
20090902190439.204:Trigger.domainMatch: line 30, column 17: SOQL query with 1 row finished in 44 ms
20090902190439.204:Trigger.domainMatch: line 31, column 29: SOQL query with 1 row finished in 21 ms
20090902190439.204:Trigger.domainMatch: line 32, column 17: Update: SOBJECT:Account
20090902190439.204:Trigger.domainMatch: line 32, column 17:     DML Operation executed in 110 ms
20090902190439.204:Trigger.domainMatch: line 33, column 17: c.Account = Account:{Id=0016000000MKEMVAA5}
20090902190439.204:Trigger.domainMatch: line 35, column 17: SOQL query with 1 row finished in 30 ms
20090902190439.204:Trigger.domainMatch: line 36, column 27: SOQL query with 1 row finished in 44 ms
20090902190439.204:Trigger.domainMatch: line 37, column 17: Update: SOBJECT:Asset
20090902190439.204:Trigger.domainMatch: line 37, column 17:     DML Operation executed in 75 ms
20090902190439.204:Trigger.domainMatch: line 38, column 17: c.Asset = Asset:{Id=02i60000004B2vBAAS}

Cumulative resource usage:

Resource usage for namespace: (default)
Number of SOQL queries: 4 out of 20
Number of query rows: 4 out of 1000
Number of SOSL queries: 0 out of 0
Number of DML statements: 2 out of 20
Number of DML rows: 2 out of 100
Number of script statements: 14 out of 10200
Maximum heap size: 0 out of 200000
Number of callouts: 0 out of 10
Number of Email Invocations: 0 out of 10
Number of fields describes: 0 out of 10
Number of record type describes: 0 out of 10
Number of child relationships describes: 0 out of 10
Number of picklist describes: 0 out of 10
Number of future calls: 0 out of 10
Number of find similar calls: 0 out of 0
Number of System.runAs() invocations: 0 out of 0

Total email recipients queued to be sent : 0

*** Ending domainMatch on Case trigger event BeforeInsert for null

 

BTW, I know that I need to build better bulk processing into this code . . . that's the next challenge.

 

==================================

* By default, Web2Case only compares the complete email address to the Email address within Contact records.  If anyone else at that company submits a case and they do not have a Contact record with their email address, their case is not associated with that Account nor Asset.

Hi,

 

I wrote few workflow rules to send email alerts. I'm looking for some logs where I can confirm if the mails has been send. Is it available anywhere in salesforce?

 

Please help!

 

 

Hi

 

I am migrating cases and related email messages from one salesforce organization to another.

 

I am using data loader. When i am extracting the email messages from source organization, i am getting field truncation problems with TEXTBODY and HTMLBODY fields of the email message object. So when i am importing i am not getting these two fields loading properly. Any solution is appreciable.

 

We need to implement a simple case tracking system using Salesforce. The cases are updated by non-Salesforce users. There are several routes to accomplish this, however, in every case there is an important piece of the puzzle is missing.



In Setup - Case - Email-to-Case there is a column called "Email Services Address." You can send email to Salesforce using computer-assigned e-mail address in that column. So, instead of using the Email-to-Case agent to poll your own email accounts, you can send them directly to Salesforce now. This used in every scenario below.



For proper automation, there are to things to consider: routing and tracking



  1. Route the messages “from” Salesforce to the user will reply “to” Salesforce

  2. Track the case email and responses



When sending a new email from a case, Salesforce inserts a string that looks like [ ref:00DSDITt.500ShQ5G:ref ] in the subject and body. You can't see this, but this is the Case.Thread_Id value. It may not be documented but you can use this value in e-mail templates to provide tracking for responses. You can use this feature when sending emails other ways (from work flow for example. Just include the Case.Thread_Id in the e-mail template.



With the presents of the Thread_Id, all of the sudden, responses with this ID sent to email-to-case will get filed properly. You may have to look for the response though. Open the case, move down to activity history, click on the email, read the top where it says “Click here to view the associated Email Message”. With some basic training anyone can make this work.



Auto-Response (least complicated)

  1. Create an email template contain {!Case.Thread_Id}. In this case, is not added by default.

  2. Create a setup – case – auto-response rule setting the “from” with the Salesforce email address assigned in the email-to-case above. Assign the template you created above.

This almost solves both problems (routing and tracking). The problem is in the very beginning of the routing. The auto-response rule does not allow you to set the “To.” Only the user that created the case gets the email. There is no way to deliver the email to the intended recipients. The Case Support Settings are generic and will not solve the problem either. You can't simply forward the email either because the recipient will reply sending the message back to you and not the case.



Work-Flow (more steps)

In setup – create – work flow, setup the rule and email alert to send to an additional (up to 5) email address. Here you can use the Sandbox to put your own e-mail there. Again, use the e-mail template with the {!Case.Thread_Id} in it. Now the “To” can be set (forget about using CC until this is fixed except now “From” is a problem. The From is the case creator or even worse a no-reply address from Salesforce (see case support setting). This breaks the loop and email-to-case will not receive any replies.

Work flows are flexible, so Salesforce should add the ability to define CC and From fields here. That enhancement should give the biggest bang for the buck.

 

This is my post, it address the CC, BCC, and the From / Reply-To. Please comment and promote, but come back, I'm not through:

 

   http://ideas.salesforce.com/article/show/10092421 (new window)

APEX (even more steps)

The Sandbox allows the creation of a trigger. No need for external programs now to create and update the code ;-) ... This falls short in two way parts:

  1. You can only set reply-to, you can't set “from” .. Reply-to can be ignored by mail clients.

  2. Case.Thread_Id is not available

  3. Email templates tied to cases are not implemented

There is a nice editor now that allows you to create and update apex code without external programs. It is only available in the Sandbox. With this we can trigger and send an email in a new case trigger.

  1. You can set the reply-to but you can't set the from. It is still common that e-mail clients ignore the reply-to and sent the reply to the “from” address. This can break the loop at the worst possible time (when your not looking). I don't like this at all.

  2. Yes, we can set the TO – fantastic

  3. No, can not use a template with Case.Thread_Id because the required target object must be “Only Users, Contact or Lead allowed for targetObjectId”"

  4. Salesforce does not detect and replace the field in the message either:
    mail.setPlainTextBody('RxStrategies does not recognize this transaction. ' + '{!Case.Thread_Id}.');



Hello, I currently have an application that uses web2case and I'd want to move away from that to using email2case.  New in Spring 09 is using email to case on demand.  Can anyone give me advice on how to format the email?
Hi,
 
I have a support issue open with Salesforce for this one -- It has been escalated to level 2, but no progress has been made on their end for > 2 days.
 
The problem is critical, in that no user is able to receive email from Salesforce systems. This means that I cannot startup a new user, because they cannot receive the startup email to confirm their email address.
 
Where we think the problem started was when we moved our email from being hosted by Google Apps to an internal Exchange server instead. My 3rd party Systems Support company that monitors the Exchange server said the conversion is complete on their end, and that there are no Salesforce emails in queue -- so, we think that the problem is on Salesforce end in that our Salesforce application is not completely 'uninstalled' from Google Apps. From this perspective, I've performed all the de-implementation I can find possible to 'unhook' Salesforce from Google Apps (there is no uninstall functionality that I see, however via the Salesforce Application, so it may be something on the backend of Salesforce that is causing problem).
 
If anyone can offer any assistance on this matter, much appreciated, as half of my users are not able to be started due to this problem. I have tried to work with my Account Representative and Salesforce Support as much as I can, but no progress has been made for > 2 days now.
 
Thanks!
I need to setup a Time Trigger to run a workflow once a week, but don't see how to do this. Ideally every Monday at 2AM or it could be any time each Sunday. Can you help?
Hi,

Is there any way to know if an attachment is added in salesforce? I am creatin an application to process cases and its attchemnt created/updated in salesforce. We are using outbound messaging to know whenever a new case is created/updated but we cant create an outbound message when an attahcment is added to a case.

Can anyone suggest a way to let my application know when an attachment is added to the case.

Thanks
GM
  • January 29, 2008
  • Like
  • 0
I am interested in hearing from anyone who has set up email relaying. I would like to know how it's working for them, how easy/hard it was to set up and what have been the pros and cons for them.  We are considering doing this and are looking for some words of advice or warning. Thank you for sharing your experiences!
 
 
I found this hotkeys application on the Exchange but could not find a way to download it.  There was a test drive option but there was no install option.  Does anybody have any idea how I can access this application?
I have set up a web-to-lead form in which I am collecting several email addresses at once. What I would like to do is set up an auto response rule to one of the other email addresses that is stored in a custom field. Is there a workaround to setting up an auto response to reply to the custom email field I specify -- i.e. setting up a workflow rule or something like this? I would like to avoid having to store the email I want the auto response to go in the main Email field associated with the lead record and I definitely want to stay away from having to send an email manually each time this form is filled out.
 
Any helpful suggestions or just a blatant "no, this cannot be accomplished?"
 
Thx!