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
sfdclearnsfdclearn 

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.

    But is there a way to address this?

 

Thanks in advance for help!

Madhan Raja MMadhan Raja M

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

sfdclearnsfdclearn

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.

 

Madhan Raja MMadhan Raja M

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?

sfdclearnsfdclearn

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.

sfdclearnsfdclearn

How about having a look up of product in the account?

Madhan Raja MMadhan Raja M

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