Improving productivity using automated approval process

Apart from automating the process workflows, Force.com also provides a system for automating the approval process. The difference between workflows and an approval process is that an approval process requires a manual decision between the flows. A typical approval process flow is as follows:

Improving productivity using automated approval process

Creating a multi-step approval process

An approval process can be of single step or multiple steps. At every approval stage we can add a set of actions. The following diagram illustrates a typical flow for a multi-stage approval process. At every stage we have a different set of users to approve the record to move it to another level.

Creating a multi-step approval process

Let us create a multi-step approval process.

Note

Before creating the approval process, first check if all the necessary items required for the approval process are in place. We will:

  • Define the approval process e-mail template
  • Determine who is submitting for approval to whom
  • Determine how many steps of approval are needed

The steps to create an Approval Process are as follows:

  1. Click on User Name | Setup | App Setup | Create | Workflow & Approvals | Approval Process.
  2. Select the object for which we need the Approval Process and click on User Standard Setup Wizard as shown in the following diagram:
    Creating a multi-step approval process
  3. Enter the unique name and process name and click on Next.
  4. Specify the entry criteria.

    Tip

    The entry criteria is similar to the entry criteria in the workflow. However, in an approval process it is optional.

  5. Select the field for Automated Approval Routing. We can assign the approval process dynamically to the manager of the submitter using this option.

    Tip

    If the approver is not the direct reporting manager to the submitter or if the user field is empty for the user, this option can be set blank and the approver can be selected based on the step. This process also applies to the multi-step approval process where every stage has a different approver.

  6. Select the Record Editability Properties. By default only system administrators can unlock a record for editing if it is submitted for approval. However, we can choose to also allow the currently assigned approver to edit the record.
  7. Select the E-mail Template and select the generic e-mail template to be sent out to all the approvers. We add use the merge fields to prepare the templates to make it look more personal.

    Note

    Please ensure the e-mail template that is selected is available for use.

  8. Select Fields to Display on Approval Page Layout. This is a quick way to view the record page where the approver will land on clicking the link through the e-mail. This page should contain all the critical information for decision making for the approver.
  9. Select the initial submitters for the approval process. This option helps in determining which users are authorized to submit a record for approval. Also in submission settings we can select Allow submitters to recall approval requests. This option allows users to change their mind and recall the approval request and click on Close.
  10. Upon clicking on Close there is a decision box if an approval step is to be added immediately. On selecting Yes the wizard for creating approval steps will pop up.

Creating approval steps

The approval process wizard helps us in creating an approval process. The next phase in an approval process are the steps, where we determine to what criteria should the approval process be routed and to whom. The record filtration in the different steps can be visualized in the following diagram:

Creating approval steps

Note that in step 4 of Creating a multi-step approval process, we did select the entry criteria; we again sub-filter them or let all records enter the approval step depending on the condition. For example, as shown in the preceding diagram the main entry criteria could be discounted by more than 40 percent. However, there are two different managers to approve the discount between 40 to 50 percent and discounts above 50 percent, hence we add the further conditions in the approval steps:

  1. Go to the Approval Process detail page. If continuing from the previous steps, then please skip the first two steps and proceed to the third step.
  2. Click on New Approval Step, which will open a wizard.
  3. Give the approval process a valid name and a valid step number and click on Next.
  4. Specify Step Criteria: If we wish to filter the records for different approval steps or let all the records enter in the step. If we filter the criteria also mention what to do with the remaining records, auto approve or reject.
  5. Select Approver: We have to select the approver for the record in this case. Apart from going to the manager for approval we can assign the record to a queue of users or we can also let the user choose the approver manually.

    Also we can directly specify the user or users who can approve the record. If the approval is assigned to multiple users (by selecting Automatically assign to approver(s))If we select the checkbox for the delegate to approve the record, the manager's delegate can also approve it. This is called the delegated approval process.

  6. This step gives us an option of jumping directly to add the approval or rejection action to the step. The actions are similar to those of workflow action and we will come to that in the next section. Go to the Approval Process detail page to see the work we did.

Approval actions

So far we have created an approval process and added an approval step to it. We can specify the default actions that can happen when the record is:

  • Submitted: By default Force.com adds a new type of action to this step which is record lock. However, we can modify this action and unlock the record. This happens when a record is submitted for approval, possible action would be a field update for Status from Open to Under Approval.
  • Approved: These actions are executed when the record is approved in a step and is still in the approval process. Possible actions can be updating the status to Approved by XYZ or Under XYZ approval.
  • Rejected: These actions are executed when the record is rejected in a step and is still assigned to someone else. Possible action can be an e-mail alert to the submitter it has being rejected.
  • Finally approved: As with the submitted action, final approval of the record is also set to lock. It is recommended that the record remains locked to prevent the user from editing the approved record. These actions are executed at the end of the approval process when the record is finally moved out of it. Possible action can be updating the Status to Approved and e-mail alert to the submitter confirming the approval.
  • Finally rejected: Force.com provides us with a default action of unlocking the record once it is finally rejected. We can change it to lock. These actions happen when the record is finally rejected with comments from the rejecter.
  • Recall action: Force.com provides us with a default action of unlocking the record once it is finally rejected. We cannot change it. If the submitter has a change of heart once the record is submitted for approval he can recall the record. This is possible only if we set that the submitter can recall the record.
    Approval actions

As shown in the preceding screenshot we can specify the action to any of the above steps. The actions are similar to workflow actions and we can also re-use the existing workflow actions in the approval process.

Once we finish the approval process and add action to it, we can check the approval process in a diagram by clicking on the View Diagram button. The next screenshot shows the diagram for the approval process. The process visualizer provides the read-only diagram for the approval process.

Approval actions

Parallel approval step

A parallel approval step has many approvers in a single step. The approval process can be assigned to more than one approver; in this case we have two scenarios:

  • All the approvers need to approve the record unanimously
  • A single person in the group can approve the record

A common scenario would be, if you need to get an approval for an amount of more than 10,000 for a project, it will go to the project manager as well as the finance manager for approval. Both approvals are required.

Parallel approval step

To create a parallel approval process, first create an approval process as mentioned above. Then perform the following steps to create the parallel approval step:

  1. Go to the Approval Process detail page. If continuing from the previous steps, then please skip the first two steps and proceed to the third step.
  2. Click on New Approval Step, it will open a wizard.
  3. Give the approval process a valid name and a valid step number and click on Next.
  4. Specify Step Criteria: If we wish to filter the records for different approval steps or let all the records enter in the step. If we filter the criteria also mention what to do with the remaining records, auto approve or reject.
  5. Select Approver: Select Automatically assign to approver(s) so we can directly assign the user or the related user.
  6. Now we can specify if we need unanimous approval from the user or a single approver is enough.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset