I'm trying to send an email notification every time an opportunity reaches 9 months old and is Closed/Lost.

Could you please help me?

  • 3
    did you read the doc on time-based workflows? what have you tried so far? – cropredy Feb 4 '15 at 22:28
  • I would suggest a scheduled report instead - just my two cents ... – user735 Feb 4 '15 at 23:02

Try this link and apply the workflow on Opportunity and apply the conditions.


|improve this answer|||||

Your best bet is time based workflows- attached below is the link to the knowledge article.

You could create a time based workflow off of created date


Hmm, I was able to access, but here it is posted in text

Time-Based Workflow FAQ

Knowledge Article Number: 000005245

Description Time-Based Workflow F.A.Q.

Resolution In salesforce you can define rules that trigger time-dependent actions, executing relative to any date or date/time field on the object as specified in a time trigger.

For example, use time-based workflow to generate critical date reminders that remind the opportunity owners when a large opportunity (amount greater than $1M USD) is fourteen days away from the intended close date. Use the same rule to notify the executive sponsor and change the ownership of the opportunity if the close date is just 10 days away.

This document answers the most frequently asked questions regarding time-based workflow.

Can I have time based workflow on custom objects? Yes, you can create time-based workflow rules on custom objects and any object currently supported by workflow.

What editions support time-based workflow? Time-based workflow is available in EE, UE and DE editions.

What units of time are supported? Currently only days and hours are supported.

Can I have my time-based workflow action count only business days? Currently within standard functionality time-based workflow actions are based on over all days and cannot exclude weekends.

How does time-based workflow impact my existing records? Workflow rules are not fired retroactively. In other words, if you create a rule now, the rules are not applied to previously created records. The same holds true for time-based workflow rules.

For example, when you create an opportunity reminder rule, it does not run against existing opportunities. The new rule only applies to records created or updated after the rule is activated.

What workflow actions can I use with time-based workflow? All existing actions will be available for a time-based workflow rule: email alerts, field updates, tasks and outbound messages. Note that you will still not be able to create an email alert for a workflow rule on activities.

How do I create a time-based workflow? The time-based workflow feature leverages the existing workflow engine. The actions for a workflow are now grouped into two sections: immediate actions and time-dependent actions. The basic rule configuration is the same, but for time-based rules, you configure time-triggers in the time-dependent actions section. Each time trigger can execute one or more workflow actions.

Can I configure multiple actions to occur at different points in time for the same rule? Yes, you can create a time line of actions by configuring multiple time triggers and defining actions for each one.

For example, consider a rule for all high value opportunities (value > $500K, probability > 70%). The immediate actions could include sending an email alert to the account team stating that a new high value opportunity has been created. The time-dependent actions could include the following: 10 days before the opportunity, close date, assign a task to the opportunity owner to follow up with the customer. 7 days before opportunity close date, change the owner of the opportunity to VP Sales, and send an email alert to the new owner.

Are there any restrictions for time-based workflow? You cannot configure time-dependent actions for workflow rules for which the evaluation criteria is set to "Every time a record is created or edited."

Can I see which time-dependent actions are pending execution? Yes, all pending actions to be fired on a future date appear in the Workflow queue. System administrators can view and manage this queue through a new page in the Setup by navigating to Administration Setup -> Monitoring -> Monitor the Workflow Queue.

Will the pending actions in the queue ALWAYS fire? No. Time-dependent actions remain in the workflow queue until processed or the rule criteria for the workflow rule is evaluated as false. If a record no longer matches the rule criteria when the rule is evaluated, Salesforce removes the time-dependent actions queued for that record.

For example, an opportunity workflow rule may specify: A criteria set to "Opportunity: Status not equals to Closed Won, Closed Lost." An associated time-dependent action with a time trigger set to seven days before the opportunity close date. If a record that matches the criteria is created on July 1st and the Close Date is set to July 30th, the time-dependent action is scheduled for July 23rd. However, if the opportunity is set to "Closed Won" or "Closed Lost" before July 23rd, the time-dependent action is automatically removed from the queue.

Can the pending actions for a record be queued again? Yes, time-dependent actions can automatically be queued again if the record is updated and you set the evaluation criteria to be "When a record is created, or when a record is edited and did not previously meet the entry criteria." Using the previous example, if the opportunity status is changed from Closed Lost to Prospecting and the workflow rule evaluation criteria is set to "When a record is created, or when a record is edited and did not previously meet the entry criteria," Salesforce reevaluates the time triggers and adds the appropriate actions to the workflow queue.

What if the evaluation criteria is set to "Only when a record is created" In this case, the workflow rule evaluates its time triggers only once. If the record that fired the rule changes to no longer meet the evaluation criteria, the pending actions are removed from the queue and the rule is never reapplied to the record. All pending actions are evaluated only for as long as the rule criteria is true. While Salesforce evaluates the rule every time the record is updated, it does not necessarily fire all the actions associated with the rule every time.

For example, consider two rules that are identical except the evaluation criteria of rule 1 is "On create only" and the evaluation criteria of rule 2 is set to "did not previously meet the rule criteria." If you create a record that matches both rules, Salesforce executes the immediate actions and queues the time-dependent actions of both rules. If you then update the record and it no longer meets the rule criteria, Salesforce removes the pending actions for both rules. Now, if you update the record so it once again meets the rule criteria, Salesforce only executes the actions associated with rule 2, which has an evaluation criteria set to "did not previously meet the rule criteria."

What happens if I update the value of a date field used in a time trigger? If you update the date field used in a time trigger, Salesforce recalculates the time trigger as long as the time trigger has not yet fired and the recalculation does not reschedule the time trigger to a date in the past.

For example, if a workflow rule alerts the opportunity owner seven days before the opportunity close date and the close date is set to 2/20/2008, Salesforce sends the alert on 2/13/2008. If you update the close date to 2/10/2008 and the current date is 2/2/2008 or before, Salesforce reschedules the alert for 2/3/2008. The evaluation date of pending actions is ALWAYS reevaluated and updated if necessary irrespective of the rule criteria. Of course, if the rule is evaluated to false, it does not matter as the actions are removed from the queue.

What happens if I delete a record that has pending actions? If you delete a record that has pending actions, the pending actions are deleted from the workflow queue and cannot be restored, even if you undelete the record.

Why do I get an error "pending workflow" when trying to convert a lead? If there are any pending approval processes or workflow to be triggered, you will not be able to convert a lead.

This is documented in the Help under "Time-Dependent Action and Time Trigger Considerations" section in help. You can go to the "Monitor the Workfow Queue" section of the set up and remove the pending actions and the conversion should go through.

|improve this answer|||||
  • Could you please update the link of the article? Unfortunately is no longer available. Thank you! – Robert Feb 5 '15 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.