Thursday 2 October 2014

Time Trigger in workflows

             Time based workflow

v  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.


v  What editions support time-based workflow?

Time-based workflow is available in EE, UE and DE editions.




v  What units of time are supported?

Currently only days and hours are supported.




v  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.




v  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.





v  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.




v  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.




v  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.




v  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."




v  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.




v  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.





v  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.




v  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."





v  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.





v  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.




v  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.

No comments:

Post a Comment

Complete Salesforce CPQ training Free videos

Salesforcestart:: We are excited to announce that our YouTube channel, Salesforcestart, is your one-stop-shop for all things Salesforce CPQ!...