Ask Search:
Colin SamsonColin Samson 

Send an email using workflow to non-salesforce users


I have partner accounts and partner users. When we assign opportunities to partner users, we simply change ownership. However, we often need to assign opportunities to contacts who are not on Salesforce as partner users. They do exist as contacts under the partner account though.

On my opportunity layout, I have a lookup contact field (where we select the NON-Partner user). This tells us who we assigned the opportunity to, and which partner account.
What I would like to do is send an email with opportunity details to that person.
Tom FoxTom Fox
Very easy.  In your workflow "Send Email" Config screen, there is a dropdown labeled "Search:" next to "Recipient Type".  You should have an option in there for "Related Contact".  Once you select that, you will see your custom lookup field appear in the "Available Receipients" list.  Move it over to the "Selected Recipients" and you will be all set.
Colin SamsonColin Samson

Thanks thecrmninja.


I have already done that, but I have two more questions:


1)     how do I use that field in the email template (I want to say “Hi Related Contact First Name

2)     what do I include in the workflow to ensure that the person is NOT a partner user?

Tom FoxTom Fox
Good questions.

To include the first name, you will need a Text formula field that has "Custom_Lookup__r.FirstName" in it (when creating the lookup field, use the field insertion boxes to make sure you get the correct field).  Then, use that Formula Field in your merge.

For the second question...  It sounds like you only use the custom lookup field for non-partners.  If that is the case, then you make a workflow criteria of CustomLookup Not Equal To "" (where "" is blank).

If you want to be more stringent in validating that the Contact in the lookup is a non-partner, there are several approaches.  Of course, all of the following approaches will require you to have some value on the Contact Object that specifies that a given Contact is a "Non-partner" (this can be record type or a custom field on the Contact object).

Option 1 = you could use lookup filters on your opportunity lookup to the Contact to make sure it only locates Contacts that are designated as non-partners.  To get to the lookup filter, you would go to the custom lookup field on the Opportunity, go to its edit screen and scroll down and you will see an area you can expand.

Option 2 = Create a cross-object formula field on the Opportunity that brings over a value from your Contact that defines whether or not the contact in that lookup is a Non-Partner.  This is not the best option as the value in that formula can change without the Opportunity being edited (and  thus, would not trigger the workflow).

Option 3 = In your workflow, you can switch the Rule Criteria dropdown from "Criteria Are Met" to "Formula Evaluates to True".  This will allow you to derive values from the related Contact for determining when to trigger your workflow (hence, you will be able to look at the Contact and make sure it is a non-partner user).  If you use this option, please be aware that you will need to set the "Evaluate Rule" portion of the "Evaluation Criteria" section to to "Every time a record is created or edited".
Colin SamsonColin Samson
Thanks again crmninja.

I'm ok with all you've said and implemented the best solution for us.
I have another question now.

How I do include the contact details of the contact associated with that opportunity (in contact roles). I need to supply these details to the non-sf person on the email template.
Tom FoxTom Fox
Is it the always the Contact set as "primary" in Contact Roles?
Michael LoustalotMichael Loustalot
crmninja!  I am a crmwannabe.  I am involved in a non-profit called the Scottsdale Charros and I am working to set up SFDC to manage our selling efforts.  This posting string is similar to what I am trying to do.  Forgive me butting in here as I don't know the correct protocol..  But here it goes.

I only have 10 user licenses, but we have over 40 Charros.  We use SFDC to manage all of our opportunities and  we have a custom field in the opportunity called Charro Contact. and that is a look up field to the Contacts for the Account Scottsdale Charros.  For those Charro Account Contacts we have email addresses.  Each Opportunity has a Charro Contact field filled in with the Charro Contact, what I am trying to do is to have the Charro Contact receive a CC email of the Visualforce email template we've set up to deliver the Opportunity details to the Opportunity Contact.  I poked around in the visualforce email template, but didn't have any success.  That's when I came across this posting.

I've followed your instructions in setting up the email, but I am trying to set up the workflow rule.  I don't know if to use "criteria met" or "formula evaluates to true".  I am thinking the trigger should be when the email is sent to the Opportunity Contact but I don't know how to define that....

Thanks for your response...
Tom FoxTom Fox
The workflow rule will depend on what 'event' you want to have trigger the email.  

What needs to happen in the Opportunity for this email to be sent?