using Product name in a filter in an account workflow rule Options
I have a workflow rule in the Account object .
if Accountstatus='new'
then this rule triggers an email template to the customer.
Now I would like to include the product name in the workflow.
which includes if(product name='xxx') then send the more specific template.(with the product name included on it).
I believe this cannot be accomplished with a workflow rule as Account can have multiple opportunities and each opportunity is tied to several products.
In this case you need to skip workflow and go for trigger. Again, If an Account is associated with 10 products then are you going to send 1 email with 10 Product information?
I am not looking to send 1 email with all product info ... just one email with most of the Account info on it and only product name that i might include.
For the given scenario you cannot use Workflow. As you said, Account can have multiple opportunities and each opportunity is tied to several products.
But you can achieve the same functionality by following the below steps:
1. Create a workflow in Opportunity Product
Run this rule if the following : Formula evaluates to true
-----------------------------------------------------------------------------------------------------
Opportunity.Account.Account_Status__C='New' && Product2.Name ='xyz'
----------------------------------------------------------------------------------------------------
2. Create a Email alert and select the template based on the Product name.
Let me know if you have any queries.
Madhan Raja M
But as we write this workflow rule in the opportunity product this triggers only in the opportunity product edit save right.
But the email should trigger only when the account status is changed.
In this case you need to skip workflow and go for trigger. Again, If an Account is associated with 10 products then are you going to send 1 email with 10 Product information?
I am not looking to send 1 email with all product info ... just one email with most of the Account info on it and only product name that i might include.
How about having a look up of product in the account?
How many product lookup will you create in Account? Its not a feasible solution.
Instead, try this out:
1. Create a 'Product Name' text field in Account
2. Create a trigger that should do the following:
a. Fetch all the Opportunity that are associated with Account
b. Fetch all the Product that are associated with Opportunity
c. Fetch all the Product name and update it in the Account's 'Product Name' text field.
3. Include 'Product Name' in your email.
Madhan Raja M