Workflows enable us to set up rules that are evaluated and the corresponding action is executed based on the type of change in record. Few common cases in which workflows are used are:
1. Create a new task on an event
2. Update a field
3. For email alerts
4. For outbound messages
Example of workflow to update the mailing city:
Process Builder is more advanced than the workflows. The major difference between workflows and process builder is the number of operations or actions they are used for performing. Process builder is used in several more complex cases like:
1. Update any related record
2. Send an email
3. Call Apex methods
4. Call a flow
5. Posting to chatter
If you want to update a process created with process builder there is no way to do it. You need to clone the existing process and update it. Due to if-else criteria of process builder, a process that will need many workflows can be built with a single process.
Example of a process created with a process builder for updating records in case address changes:
Flows, on the other hand, is an integrated app in Salesforce that can be used to perform various operations such as execute logic, collect data from users, call apex classes and interact with Salesforce database independent of the data change events. To create flows you need cloud flow designer in salesforce. The main difference between flows and workflows is flows are user-triggered application and workflows are event-triggered. Workflows execute their actions behind the scenes while flows can display information on the screen. In workflows, actions are associated with a particular object and its related objects which is not the case with flows since they can create, update, lookup and delete records for multiple objects.
Many different types of apps can be created with flow elements at a very rapid pace.
The business process can be anything like:
1. Filling out a survey
2. Filling out a form
3. Working on a script
The basic example of flow is shown below:
Below is an example of a flow for creating a survey for collecting customer feedback. Every survey follows a flowchart.
In this example, the survey starts with the customer greeting screen. This screen will display the greeting message and will ask the user permission to proceed further. Settings and selection of screen can be done from the left panel in user interface shown in the figure. After that, you can add decision from a logic panel on left if the decision is no and you want to end the survey than you can add ‘thank you customer screen’.
If the decision is yes then go further and make the new screen for customer survey and add your data by how you want this survey to be done and in the end, after completion of the survey you can end the survey:
Workflows and approval process and process builder:
1. What is workflow rule and Workflow actions?
Many of the tasks you normally assign, the emails you regularly send, and other record updates are part of your organization's standard processes. Instead of doing this work manually, you can configure workflow to do it automatically.
Workflow automates the following types of actions based on your organization's processes:
- Tasks—Assign a new task to a user, role, or record owner.
- Email Alerts—Send an email to one or more recipients you specify.
- Field Updates—Update the value of a field on a record.
- Outbound Messages—Send a secure, configurable API message (in XML format) to a designated listener.
Before adding new action you need to deactivate workflow rule and do the changes and then again activate it.
2. A workflow already exists on object. Now user want to add time dependent workflow action to it but not able to get an option to select time dependent action. What might be issue?
Evualation criteria is set to “created, and every time it’s edited”
3. What is queue?
A queue can hold a predefined set of objects and consists of a set of users. Any of the queue members can pick up tasks assigned to the queue. Users or Queues can be owners of records.
While adding queue members to queue, you can add users, public group, partner users, specify role of users etc.
4. What are approval process?
Salesforce supports wizard based easy to configure approval process. After an object is selected, the wizard guides the user through a step-by-step setup. Approval process is triggered when a user clicks on the "Submit for approval" button.
The approval process consists of the following steps -
- Process definition
- Initial submission actions
- Step definitions
- Final Rejection actions
- Final Approval actions
Final Recall actionsIn workflow rule,action is triggered when a record meets an evaluation criteria. Workflow rules definition does not impact existing records. Workflow rule gets applied to new record creation or edits.
5. Is it possible to create parallel approval process (ability for multiple user to approve or reject a record)?
Yes. Parallel approval process allows specifying (upto 25) multiple approvers. The approver setting could be set to unanimous, or first action. In unanimous parallel approval process, all approvers must approve a request, before it is considered as approved.
6. Difference between workflow rule and approval process?
Workflow Approval
They are activated when a record is saved. Approval process are triggered by explicitly clicking the "Submit for Approval" button.
Workflow consists of single step and different action Approval process consists of multiple steps. Also different action is taken based upon whether the record is approved or rejected.
7. Is it possible to start approval process after records is created in salesforce without clicking on submit for approval button?
Yes. Process builder or apex trigger can be used to initiate approval process when record is created.
8. How we can achieve dynamic approval process like approve of position record should be user defined in hiring manager field of position?
It is possible through apex triggers because in standard approval process, you need to define approver while creating approval process.
9. Is it possible to skip steps in approval process?
Yes.
In processes that have steps that are optional depending on criteria, use the skip step feature.
To skip steps, use filter criteria or formula, then choose what should happen to records that do not meet the criteria. The options are:
- Approve Record (approves the request and performs all final approval actions).
- Go to Next Step (skips this step and goes to the next step).
10. Can we implement multilevel approval process in salesforce?
Yes. Define different steps in approval process.
11. Can we update parent record with workflow field update?
Yes, only if relationship is master detail. If it is look-up relationship, then it is not possible.
1. What is process builder?
The Process Builder is a workflow tool that helps you easily automate your business processes by providing a powerful and user-friendly graphical representation of your process as you build it. The Process Builder’s simple and powerful design allows you to:
- Create your processes using a convenient layout with point-and-click efficiency.
- Create your whole process in one place rather than using multiple workflow rules.
- Create processes by collaborating with different teams in your business.
- Stop using Apex code to automate simple tasks.
Automated processes in the Process Builder are based on records and consist of:
- Criteria that determine when to execute action groups.
- Immediate and scheduled actions to execute when those criteria are met.
Any change that causes a record to match the criteria can automatically trigger the action group.
You can use the more powerful and flexible Process Builder to perform the same actions as workflow. The process builder doesn’t support outbound messages, but you can easily create one yourself with Apex. With the Process Builder, you can:
- Create a record
- Update any related record—not just the record or its parent
- Use a quick action to create a record, update a record, or log a call
- Launch a flow—you can’t schedule this action with workflow
- Send an email
- Post to Chatter
- Submit for approval
- Call apex metheod
2. What should be the condition we need to specify in process builder to specify schedule actions?
Below are 2 conditions:
- Only when record is created
- When record is created or edited and while define criteria select the checkbox for below setting
- Do you want to execute the actions only when specified changes are made to the record?
3. Is it possible to edit the process once it is activated?
No, You need to clone and while cloning you can create new process or create new version.
4. How to troubleshoot the errors if any issue comes in process builder?
Use the error messages that appear in the Process Builder and the emails you receive when a process fails to help solve problems that arise when you’re working with processes. When all else fails, look at the Apex debug logs for your processes.
- Identifying Errors in the Process Builder
The API names for criteria nodes and actions are created in the background. When you create or update processes, you might see error messages that reference those names to help you identify specifically where the problem occurred.
- Errors Received after a Process Starts Evaluating a Record
When a user performs an action that triggers a process (such as creating a record) and that process fails, the user sees a page with this error: “Workflow Action Failed to Trigger Flow.” In addition, the administrator who created the process receives an email with more details.
- Using Debug Logs to Troubleshoot Processes
Use debug logs to find detailed information about your running processes after they finish running. For example, if a process doesn’t seem to trigger when a record meets the process’s criteria, or if you want to understand the sequence of processes being executed.
5. What user permission is required to create edit and view process?
“Manage Force.com Flow” AND “View All Data” in profile.
-----------------------------------------------------------------------
Many of the tasks you normally assign, the emails you regularly send, and other record updates are part of your organization's standard processes. Instead of doing this work manually, you can configure workflow to do it automatically.
Workflow automates the following types of actions based on your organization's processes:
- Tasks—Assign a new task to a user, role, or record owner.
- Email Alerts—Send an email to one or more recipients you specify.
- Field Updates—Update the value of a field on a record.
- Outbound Messages—Send a secure, configurable API message (in XML format) to a designated listener.
2. A workflow already exists on object. Now user want to add time dependent workflow action to it but not able to get an option to select time dependent action. What might be issue?
Evualation criteria is set to “created, and every time it’s edited”
3. What is queue?
A queue can hold a predefined set of objects and consists of a set of users. Any of the queue members can pick up tasks assigned to the queue. Users or Queues can be owners of records.
While adding queue members to queue, you can add users, public group, partner users, specify role of users etc.
4. What are approval process?
Salesforce supports wizard based easy to configure approval process. After an object is selected, the wizard guides the user through a step-by-step setup. Approval process is triggered when a user clicks on the "Submit for approval" button.
The approval process consists of the following steps -
- Process definition
- Initial submission actions
- Step definitions
- Final Rejection actions
- Final Approval actions
5. Is it possible to create parallel approval process (ability for multiple user to approve or reject a record)?
Yes. Parallel approval process allows specifying (upto 25) multiple approvers. The approver setting could be set to unanimous, or first action. In unanimous parallel approval process, all approvers must approve a request, before it is considered as approved.
6. Difference between workflow rule and approval process?
Workflow | Approval |
They are activated when a record is saved. | Approval process are triggered by explicitly clicking the "Submit for Approval" button. |
Workflow consists of single step and different action | Approval process consists of multiple steps. Also different action is taken based upon whether the record is approved or rejected. |
7. Is it possible to start approval process after records is created in salesforce without clicking on submit for approval button?
Yes. Process builder or apex trigger can be used to initiate approval process when record is created.
8. How we can achieve dynamic approval process like approve of position record should be user defined in hiring manager field of position?
It is possible through apex triggers because in standard approval process, you need to define approver while creating approval process.
9. Is it possible to skip steps in approval process?
Yes.
In processes that have steps that are optional depending on criteria, use the skip step feature.
To skip steps, use filter criteria or formula, then choose what should happen to records that do not meet the criteria. The options are:
- Approve Record (approves the request and performs all final approval actions).
- Go to Next Step (skips this step and goes to the next step).
10. Can we implement multilevel approval process in salesforce?
Yes. Define different steps in approval process.
11. Can we update parent record with workflow field update?
Yes, only if relationship is master detail. If it is look-up relationship, then it is not possible.
1. What is process builder?
The Process Builder is a workflow tool that helps you easily automate your business processes by providing a powerful and user-friendly graphical representation of your process as you build it. The Process Builder’s simple and powerful design allows you to:
- Create your processes using a convenient layout with point-and-click efficiency.
- Create your whole process in one place rather than using multiple workflow rules.
- Create processes by collaborating with different teams in your business.
- Stop using Apex code to automate simple tasks.
- Criteria that determine when to execute action groups.
- Immediate and scheduled actions to execute when those criteria are met.
You can use the more powerful and flexible Process Builder to perform the same actions as workflow. The process builder doesn’t support outbound messages, but you can easily create one yourself with Apex. With the Process Builder, you can:
- Create a record
- Update any related record—not just the record or its parent
- Use a quick action to create a record, update a record, or log a call
- Launch a flow—you can’t schedule this action with workflow
- Send an email
- Post to Chatter
- Submit for approval
- Call apex metheod
Below are 2 conditions:
- Only when record is created
- When record is created or edited and while define criteria select the checkbox for below setting
- Do you want to execute the actions only when specified changes are made to the record?
No, You need to clone and while cloning you can create new process or create new version.
4. How to troubleshoot the errors if any issue comes in process builder?
Use the error messages that appear in the Process Builder and the emails you receive when a process fails to help solve problems that arise when you’re working with processes. When all else fails, look at the Apex debug logs for your processes.
- Identifying Errors in the Process Builder
- Errors Received after a Process Starts Evaluating a Record
- Using Debug Logs to Troubleshoot Processes
“Manage Force.com Flow” AND “View All Data” in profile.
-----------------------------------------------------------------------
How does Time-Based Workflow impact my existing records?
Workflow rules are not triggered retroactively. If you create a rule now, the rules are not applied to previously created records.
- Example: When you create an Opportunity reminder rule, it doesn't run against existing Opportunities. The new rule only applies to records created or updated after the rule is activated.
- Example: When you create an Opportunity reminder rule, it doesn't 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: Email Alerts, Field Updates, Tasks and Outbound Messages.
Can I configure multiple actions to occur at different points in time for the same rule?
Yes, you can create a timeline of actions by configuring multiple time triggers and defining actions for each one.
- Example: Consider a rule for all high value opportunities (value > $500K, probability > 70%). The immediate actions could include sending an email alerts 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.
- Example: Consider a rule for all high value opportunities (value > $500K, probability > 70%). The immediate actions could include sending an email alerts 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?
Yes, it's not possible to configure a time-dependent workflow action that's set to evaluate criteria "Every time a record is created or edited."
Can I see which time-dependent actions are pending executions?
Yes, all pending actions to be triggered on a future date appear in the Workflow Queue.
System Administrators can view and manage the queue from:
- Improved Setup Under Interface (Enabled): Go to Setup | Monitor | Time-Based Workflow
- Improved Setup Under Interface (Disabled): Go to Setup | Administration Setup | Monitoring | Time-Based Workflow
- Improved Setup Under Interface (Enabled): Go to Setup | Monitor | Time-Based Workflow
- Improved Setup Under Interface (Disabled): Go to Setup | Administration Setup | Monitoring | Time-Based Workflow
Will the pending actions in the queue ALWAYS trigger?
No. Time-dependent actions remain in the Workflow Queue until processed or the rule criteria for the Workflow Rule are 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.
- 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 7 days before the Opportunity close date. If a record matching 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.
- 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 7 days before the Opportunity close date. If a record matching 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, if the record is updated and you set the evaluation criteria to be "When a record is created, and anytime it's edited to subsequently meet criteria" (The record should not have previously meet the entry criteria).
- 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, and anytime it's edited to subsequently meet criteria" (Assuming the record did not previously meet the criteria), Salesforce re-evaluates the time triggers and adds the appropriate actions to the Workflow Queue.
- 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, and anytime it's edited to subsequently meet criteria" (Assuming the record did not previously meet the criteria), Salesforce re-evaluates 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 the time triggers only once. If the record that fired the rule changes and no longer meets 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 trigger all the actions associated with the rule every time.
- Example: Consider two rules that are identical, except the evaluation criteria of Rule 1 is "On create only" and Rule 2 is "When a record is created, and anytime it's edited to subsequently meet 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. If you then update the record so it meets the rule criteria again, Salesforce only executes the actions associated with Rule 2.
- Example: Consider two rules that are identical, except the evaluation criteria of Rule 1 is "On create only" and Rule 2 is "When a record is created, and anytime it's edited to subsequently meet 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. If you then update the record so it meets the rule criteria again, Salesforce only executes the actions associated with Rule 2.
What happens if I update the value of a 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.
- Example: If a Workflow Rule alerts the Opportunity owner 7 days before the Opportunity Close Date and the close date is set to Feb 20, 2018, Salesforce sends the alert on Feb 13, 2018. If you update the Close Date to Feb 10, 2018 and the current date is Feb 2, 2018 (or before), Salesforce reschedules the alert for Feb 3, 2018. The evaluation date of pending actions is ALWAYS reevaluated and updated (if necessary) irrespective of the rule criteria. If the rule is evaluated to false, it won't matter as the actions are removed from the queue.
- Example: If a Workflow Rule alerts the Opportunity owner 7 days before the Opportunity Close Date and the close date is set to Feb 20, 2018, Salesforce sends the alert on Feb 13, 2018. If you update the Close Date to Feb 10, 2018 and the current date is Feb 2, 2018 (or before), Salesforce reschedules the alert for Feb 3, 2018. The evaluation date of pending actions is ALWAYS reevaluated and updated (if necessary) irrespective of the rule criteria. If the rule is evaluated to false, it won't matter as the actions are removed from the queue.
What happens if I 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 Workflows to be triggered, you will not be able to convert a Lead. That said, you can remove the pending actions under Setup and the conversion will go through.
----------------------------------------------------------------------
What is the AppExchange?
AppExchange is a Website Owned and Operated by salesforce.com which enables Partners and Customers to Download & Install Custom Apps and Components as per the need.
Jump Start Wizard vs. Standard Wizard ?
The Jump Start wizard creates a one-step approval process for you in just a few minutes
The Standard Wizard is useful for complex approval processes.
Jump Start Wizard
• The jump start wizard is useful for simple approval processes with a single step.
• Use the jump start wizard if you want to create an approval process quickly by allowing Salesforce to automatically choose some default options for you.
Standard Wizard
• The standard wizard is useful for complex approval processes.
• Use it when you want to fine tune the steps in your approval process.
• The standard wizard consists of a setup wizard that allows you to define your process and another setup wizard that allows you to define each step in the process.
Parallel Approval Routing ?
Parallel Approval Routing is sending approval requests to multiple approvers in a single step Wait for approval from all the approvers or wait for approval from any one
Configure an approval step to request approval from any combination of multiple users and related users.
Configure 25 parallel approvers at each step.
----------------------------------------------------------------------
----------------------------------------------------------------------
What is the AppExchange?
AppExchange is a Website Owned and Operated by salesforce.com which enables Partners and Customers to Download & Install Custom Apps and Components as per the need.
Jump Start Wizard vs. Standard Wizard ?
The Jump Start wizard creates a one-step approval process for you in just a few minutes
The Standard Wizard is useful for complex approval processes.
Jump Start Wizard
• The jump start wizard is useful for simple approval processes with a single step.
• Use the jump start wizard if you want to create an approval process quickly by allowing Salesforce to automatically choose some default options for you.
Standard Wizard
• The standard wizard is useful for complex approval processes.
• Use it when you want to fine tune the steps in your approval process.
• The standard wizard consists of a setup wizard that allows you to define your process and another setup wizard that allows you to define each step in the process.
Parallel Approval Routing ?
Parallel Approval Routing is sending approval requests to multiple approvers in a single step Wait for approval from all the approvers or wait for approval from any one
Configure an approval step to request approval from any combination of multiple users and related users.
Configure 25 parallel approvers at each step.
----------------------------------------------------------------------
Salesforce: Serial and Parallel Approval
Approval process has been introduced in Salesforce platform sometimes back. But when someone ask you, if Salesforce support Parallel and Serial approval process?
The answer is YES, although Salesforce do not implicitly said it is parallel or serial approval process.
The good thing is, this functionality available out of the box. So you do not need to write any code. Just with point and click configuration, you can build this process within hours.
Parallel Approval
Parallel Approval means you are sending multiple approvals out in one step of the approval process. Any approver able to approve without need to wait for other approvers to approve.
The approver can be specific users, a queue or related user in the record.
How to configure this in Salesforce?
When you reach Approval Steps - Select Assigned Approver, choose Automatically assign to approver(s)
In sample above, when user submit for approval, it will go to a user 'Maria Ann' and also go to 'Finance Queue' at the same time. Maria do not need to wait a user from Finance queue to approve, and the same for user in Finance queue can approve without have to wait Maria approval.
You also can specify whether only the first approval is needed or ALL approval need to approve, when all approved, it will move to the next step of approval process. It is configured in above screen at When multiple approvers are selected. When you select "Require unanimous approval from all selected approvers." the record is only approved if all of the approvers approve the request. The approval request is rejected if any of the approvers reject the request.
Note: approval assigned to a queue, it does not mean ALL users in the queue have to approve, when one of the user in queue approve, it is considered as Approve from the queue.
Here is a screenshot once user submit for approval, it will go to both user and queue for this sample.
This when Linda from Finance has approved
Serial Approval
Serial Approval means after a user approve, it will move to the next user to approve. Most use case for this when next approval is needed when it hit certain criteria, example:
1. When discount given < 10%, only Sales Manager need to approve, but
2. When discount given >= 10%, after Sales Manager approved, it also need to be approved by Sales Director. So, Sales Director only need to approve when it has been approved by Sales Manager.
How to configure this in Salesforce?
When you reach Approval Steps, you need to create multiple steps. Each steps may have different criteria. See screenshot below for the details.
When user submit for approval, he will only see the immediate approver only:
When Linda approve, because discount for this opportunity is more than 10%, it will go to the next approver
You can click View Diagram button in Approval Process to display the flow, you also can click each item to show the properties.
Last one, you also can combine both parallel and serial approval in an approval process. Example: after Sales Manager approve, it will go to Sales Director approval and also Ops Director approval, both user need to approve, so we select Require UNANIMOUS approval from all selected approvers.
----------------------------------------------------------------------
The answer is YES, although Salesforce do not implicitly said it is parallel or serial approval process.
The good thing is, this functionality available out of the box. So you do not need to write any code. Just with point and click configuration, you can build this process within hours.
Parallel Approval
Parallel Approval means you are sending multiple approvals out in one step of the approval process. Any approver able to approve without need to wait for other approvers to approve.
The approver can be specific users, a queue or related user in the record.
How to configure this in Salesforce?
When you reach Approval Steps - Select Assigned Approver, choose Automatically assign to approver(s)
In sample above, when user submit for approval, it will go to a user 'Maria Ann' and also go to 'Finance Queue' at the same time. Maria do not need to wait a user from Finance queue to approve, and the same for user in Finance queue can approve without have to wait Maria approval.
You also can specify whether only the first approval is needed or ALL approval need to approve, when all approved, it will move to the next step of approval process. It is configured in above screen at When multiple approvers are selected. When you select "Require unanimous approval from all selected approvers." the record is only approved if all of the approvers approve the request. The approval request is rejected if any of the approvers reject the request.
Note: approval assigned to a queue, it does not mean ALL users in the queue have to approve, when one of the user in queue approve, it is considered as Approve from the queue.
Here is a screenshot once user submit for approval, it will go to both user and queue for this sample.
This when Linda from Finance has approved
Serial Approval
Serial Approval means after a user approve, it will move to the next user to approve. Most use case for this when next approval is needed when it hit certain criteria, example:
1. When discount given < 10%, only Sales Manager need to approve, but
2. When discount given >= 10%, after Sales Manager approved, it also need to be approved by Sales Director. So, Sales Director only need to approve when it has been approved by Sales Manager.
How to configure this in Salesforce?
When you reach Approval Steps, you need to create multiple steps. Each steps may have different criteria. See screenshot below for the details.
When user submit for approval, he will only see the immediate approver only:
When Linda approve, because discount for this opportunity is more than 10%, it will go to the next approver
You can click View Diagram button in Approval Process to display the flow, you also can click each item to show the properties.
Last one, you also can combine both parallel and serial approval in an approval process. Example: after Sales Manager approve, it will go to Sales Director approval and also Ops Director approval, both user need to approve, so we select Require UNANIMOUS approval from all selected approvers.
Interview Questions on Workflows and Approval Process In salesforce
2. What are the different kinds of evaluation criteria’s (events)?
3. In which object workflows are stored?
4. What is the difference between Created and everytime edited to meet the criteria and Created and edited to subsequently meet the criteria?
While creating the record criteria meets so that workflow will fire and while editing the record again criteria meets workflow won't fire (meeting the criteria to meeting the criteria)
5.What are the types of rule criteria’s?
6. What is immediate workflow action?
7. What is time dependent workflow action?
8. For which event we can't create time dependent workflow action?
9. What are the different kinds of workflow actions?
10. What are the types of email templates?
12. How can you monitor future actions of time based workflow?
13. There is a timebased workflow which will update one of the fields if the criteria meet. User submits the record with valid criteria, workflow triggered so that the field update is queued in the 'time based flow' queue which will fire after one day. If the user modifies the record which is submitted before the scheduled date, after modification, a record criterion is not meeting. Whether the field will be updated or not in schedule date?
14. For the same scenario explained in the above question what happens when we deactivate or modify the criteria of the workflow to different criteria? Whether the field will be updated or not in schedule date?
15. Scenario: There are two workflow rules on the same object say namely wf1 and wf2. If wf1 fires then a field will be updated on the same object, if the field updated and due to this wf2 criteria meets then what will happen, wf2 will fire or not?
16. What is recursive workflow rule? How to avoid recursive workflow rules?
Incase, in other workflow rules also if we enable Re-evaluate Workflow Rules after Field Change checkbox in the Field Update recursive workflow rules will come in some scenarios.
We can take two steps to avoid recursive workflow rules -
For the workflow Evaluation Criteria if you choose created, and any time it’s edited to subsequently meet criteria option, we can avoid recursive workflow rules.
17. What is Approval Process?
18. Scenario: After activating the approval process, I want to add one more step. Is it possible?
19.In which object all Approval process are stored?
----------------------------------------------------------------------
Multiple approvers for Approval process in Salesforce
2. Select the object to create approval process.
3. Click "Create New Approval Process" button and click "Use Standard Setup Wizard" link.
4. Enter a name and description for your new approval process.
5. Click "Next" button.
6. Specify Entry Criteria.
7. Click "Next" button.
8. Specify Approver Field and Record Editability Properties.
9. Click "Next" button.
10. Select Notification Templates.
11. Click "Next" button.
12. Select Fields to Display on Approval Page Layout.
13. Click "Next" button.
14. Specify Initial Submitters.
15. Click "Save" button.
16. Select "No, I'll do this later, take me to the approval process detail page to review what I've just created".
17. Click "Go" button.
18. Click "New Approval Step' button.
19. Enter Name and Description.
20. Click "Next" button.
21. Specify Step Criteria.
22. Click "Next" button.
23. Select "Automatically assign to approver(s)".
24. Select the "Queue" or "User" or "Related User".
25. When multiple approvers are selected, select anyone of the following
a. Approve or reject based on the FIRST response.
b. Require UNANIMOUS approval from all selected approvers.
26. Click "Add Row" link to add multiple approvers.
27. Click "Save" button.
28. Click "Activate" button to activate your approval process.
29. Go to the Object's page layout and add Submit for Approval button and Approval History related list.
30. Add "Submit for Approval" button.
31. Add "Approval History" related list.
Limitations of the workflow
The workflow feature is only available in Enterprise, Unlimited, Performance, and Developer editions. For the Professional Edition, you can enable this feature after paying an extra amount. As Salesforce is based on a multitenant architecture, it imposes a few limitations on the workflow:
• For each workflow rule, you can have the following:
- 10 time triggers
- 40 immediate actions
- 40 time-dependent actions per time trigger
• For both immediate and time-dependent actions in one workflow rule,
there can be no more than:
- 10 email alerts
- 10 tasks
- 10 field updates
- 10 outbound messages
• The workflow time trigger per hour limit for different editions are as follows:
- Professional Edition: 250
- Enterprise Edition: 500
- Developer Edition: 50
- Unlimited and Professional Edition: 1,000
• The workflow e-mail limit per day is as follows:
- 1,000 per Salesforce standard license
- 200,000 per organization
Note: Once an organization's daily e-mail limit of 200,000 exceeds, Salesforce will send a warning e-mail to the default workflow user and discard all the e-mails. Salesforce does not try to resend them later.
-----------------------------------------------------------------
- 10 time triggers
- 40 immediate actions
- 40 time-dependent actions per time trigger
- 10 email alerts
- 10 tasks
- 10 field updates
- 10 outbound messages
- Professional Edition: 250
- Enterprise Edition: 500
- Developer Edition: 50
- Unlimited and Professional Edition: 1,000
- 1,000 per Salesforce standard license
- 200,000 per organization
Call an Apex Method from a Process builder:
- Create a record
- Update any related record
- Quick action
- Launch a flow
- Send an email
- Post to Chatter
- Submit a record for approval
- Process Builder doesn’t support outbound messages
- Process Builder doesn’t allow us to delete a record
Solution for the above business requirement
public class DeleteUnacceptedQuotes
{
@InvocableMethod
public static void QuoteDelete(List<Id> OpportunityIds)
{
List<Quote> Quotes =[select id from quote
where Opportunity.id in :OpportunityIds
and Status != 'Accepted'];
delete Quotes;
}
}
2. To create a new process from scratch, click on the New Button available on Process management page. A popup will appear where you have to enter the Name (Use Delete Unaccepted Quotes as name), API Nameand Description as shown in the below screenshot
It’s time to test this feature
Salesforce Time-Dependent Workflow and Entry Criteria
Actions for Time-Dependent Workflow is exactly the same with Immediate Workflow, and you can share the same actions between Time-Dependent Workflow with Immediate Workflow, depend on your business needs, even to combine Time-Dependent and Immediate workflow in the same workflow rule.
One thing you need to note when create Time-Dependent Workflow is the Evaluation Criteria, make sure it is set to created or created, and any time it’s edited to subsequently meet criteria only. Created, and every time it’s edited will NOT allow you to have Time-Dependent Actions.
I get a request from my user to change a running Time-Dependent Workflow from 7 days before Birthdate to 14 days before Birthdate. Here is the step:
1. Screenshot existing Time-Dependent Workflow with the actions (for backup purpose)
2. Deactivate the workflow
3. Remove all existing actions in that Time-Dependent Workflow
4. Edit Time-Dependent Workflow and you will be able to modify the day to 7 days
5. Add back all existing actions for that Time-Dependent Workflow
6. Activate the workflow back
Few items to note:
1. All existing data will be NOT trigger again for Time-Dependent workflow, because it already met the entry criteria earlier. So, if your Entry Criteria is 'Evaluate the rule when a record is created, and any time it’s edited to subsequently meet criteria', you need to make the record to 'meet' the criteria again:
- Update the record NOT to meet the criteria, then update it back to meet the criteria.
- Example: if we are using Rule Criteria "Birthdate NOT EQUAL TO null", we need to make it to null first (make sure to backup first), then populate the original Birthdate back, so it will meet the criteria again.
2. Monitoring, you can monitor record queue to be triggered for Time-Based Workflow from Setup - Administration Setup - Monitoring - Time-Based Workflow. You can select some criteria to monitor the queue or just leave all to --None-- and hit Search button.
Cross-Object Workflow in Salesforce.com
With Spring '12 Release, cross-object field updates in workflow rules and approval processes now support standard objects. Both custom-to-standard and limited standard-to-standard relationships are supported.
This feature only available in Enterprise and Unlimited edition.
Only Master-Detail relationship support using cross-object workflow, so cross-object will not work in Lookup relationship.
Here is a sample case for using Cross-Object workflow.
Master object: Customer__c
Child object: Order__c
Company would like to know how much and when latest order for each customer, but date use to determine is payment date, not order date, and payment date will be blank when customer have not make payment.
So, here we go:
1. Create a workflow in Order which will run on create and every time edit
Rule criteria:
NOT ISNULL( Payment_Date__c ) &&
( Payment_Date__c >= Customer__r.Payment_Date_hidden__c ||
ISNULL( Customer__r.Payment_Date_hidden__c ))
Explanation:
- if payment date is blank, stop workflow
- if payment date in order is newer than stored payment date in customer, proceed workflow OR
- if stored payment date in customer is blank
2. Create field update in Order
a. Update Payment Date in Customer
Select object = Order
Field to Update = Customer, the select field Payment Date
Formula Value = Payment_Date__c from Order
b. Update Amount in Customer
Select object = Order
Field to Update = Customer, the select field Amount
Formula Value = Amount__c from Order
This feature only available in Enterprise and Unlimited edition.
Only Master-Detail relationship support using cross-object workflow, so cross-object will not work in Lookup relationship.
Here is a sample case for using Cross-Object workflow.
Master object: Customer__c
Child object: Order__c
Company would like to know how much and when latest order for each customer, but date use to determine is payment date, not order date, and payment date will be blank when customer have not make payment.
So, here we go:
1. Create a workflow in Order which will run on create and every time edit
Rule criteria:
NOT ISNULL( Payment_Date__c ) &&
( Payment_Date__c >= Customer__r.Payment_Date_hidden__c ||
ISNULL( Customer__r.Payment_Date_hidden__c ))
Explanation:
- if payment date is blank, stop workflow
- if payment date in order is newer than stored payment date in customer, proceed workflow OR
- if stored payment date in customer is blank
2. Create field update in Order
a. Update Payment Date in Customer
Select object = Order
Field to Update = Customer, the select field Payment Date
Formula Value = Payment_Date__c from Order
b. Update Amount in Customer
Select object = Order
Field to Update = Customer, the select field Amount
No comments:
Post a Comment