function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SebaLSSebaLS 

Opportunities & Products

Hi! 

 

I want to create a workflow using the Products section (located in the object "Opportunities"). 

(This is the section "Products").

 

I need to create a rule that, everytime I add a new product, an email is sent to X person.

 

But the problem here is that the fields in the product section does not appear when I try to create the rule. I believe that they are not regular fields.

 

Can anybody help me with this?

 

Thanks in advance!

phiberoptikphiberoptik
Who is X person? Is this a User, a Contact Role on the Opportunity, or who?
JFraileJFraile
Hi.

I understand you can not see the fileds you need when creating the rule criteria. What is the rule criteria you'd like to apply?
SebaLSSebaLS
Hi phiberoptik! Yes, it's a user. But also could be a person that doesn't have a salesforce ID.
SebaLSSebaLS
Hi JFraile!

The rule I want to create is: if "x" product is added to the opportunity, an email is sent to "x" person notifying about this.

Why I want to do this rule? Because when we sell a product, several actions must be taken. i.e. if "x" product is sold, "x" person must make a report.

PS: Sorry for my poor english.
phiberoptikphiberoptik
Where would this person be referenced? On the Product or Opportunity, or where?

If it was a person outside of a Salesforce.com User, you would have to reference an email address field on the record the workflow rule is firing from. If it was a User, then you need to create a lookup field to the User object and put that user in it. That field would then be an available Recipient for the Email Alert.
JFraileJFraile

Hi.

 

One thing I didnt notice is that in your product related list image, there are three rows with the data columns in blank, to solve this you could go to the opportunity page layout edition wizard and look for the products related list, click on the product related list properties button (llave inglesa) and check the columns to display.

 

Back to the email alert, I understand you want to send an email to one person (internal/external) everytime a product is added to an opportunity. And that person depends on the product, it is, new A product-->mail to person X, new B product--> mail to person Y. There are several options to achieve this, some of them are:

1.- Code a before insert trigger on opportunityLineItem, the more complex and flexible solution

2.- Create a workflow rule for each product,  create an email alert pointing to the person (one email alert per work flow rule). Flexible but not very scalable.

3.- Create a workflow rule with an Immediate Workflow Action to populate a custom email field which will be used as recipient for a Time-Dependent Workflow Action that will send the email (with an 1Hrs delay since creation). To make it work, you`ll need a custom email field in each product with the person's email you want to use. Then another custom email field in the opportunity product that will be the target of the Immediate Workflow Action.

 

Hope it helps

(suerte :)

 

Jeff MayJeff May

When you add a Product to an Opportunity, you are actually creating an OpportunityLineItem (which you will see as "Opportunity Product" in the create Workflow object list.  The Email Alert you create can be sent to any Person on the record, or to other SFDC Users and/or email addresses.