In the previous chapter, we looked at data analytics where we covered reports and dashboards.
In this chapter, we will cover in detail how, with the use of the workflow rules and approval process features within the Salesforce CRM application, you can automate and streamline the key business processes for your organization.
This chapter will focus on how you can configure actions for workflow rules and approval processes to automate, improve quality, and generate high value processes within your organization.
Topics covered are:
The workflow rules and approval process features within the Salesforce CRM application allow you to automate and streamline the key business processes for your organization.
Workflows rules can be used to capture key business processes and events to generate automated actions. They allow you to configure various types of actions to fire based on the field or fields of the record meeting pre-defined conditions. In essence, a workflow rule sets workflow actions into motion when its pre-defined conditions are met. You can configure workflow actions to execute immediately whenever a record meets the conditions specified in the workflow rule, or you can set time-dependent features that execute the workflow actions on a specific day.
Approval processes are a structured set of steps used to facilitate formal sign-off on data records. They can range from simple, single steps to complex, sophisticated routing to provide automated processing which your organization can use to approve records in Salesforce CRM. Along with the steps that must be taken, the approval process also specifies who must approve these steps. Approval steps can either be specified for all records included in the process, or restricted to records that have certain attributes. Approval processes also specify the actions that are to be taken when a record is first submitted, approved, rejected, or recalled.
Workflow rules and approval processes provide benefits such as improving the quality and consistency of data, increasing data integrity, improving efficiency and productivity, lowering costs, and reducing risks.
Workflow and approval processes allow you to automate the following types of actions: e-mail alerts, tasks, field updates, and outbound messages.
E-mail alerts can be sent to one or more recipients. For example, e-mail alert actions can be used to automatically send an account owner an e-mail whenever updates are made to one of their accounts by another user.
Tasks can be assigned to users or record owners. For example, task actions can be used to automatically assign follow-up tasks to a marketing executive whenever a new lead is entered in the system.
Field updates can be used to modify the value of a field on a record. For example, a field update action can be used to automatically update an opportunity next step field when it reaches a certain sales stage.
Outbound messages can be used to send a secure configurable API message (in XML format) to a designated listener. For example, outbound messages can be used to automatically invoke a new account creation process. This could be, say, whenever a new account is entered in the Salesforce CRM application by triggering an outbound API message to an external financial system.
Workflow rules in Salesforce CRM can be combined to help manage an entire process. For example, when a lead is entered through your website, using Web to lead (covered later), workflow rules can be used to automatically send a responding e-mail to the lead contact and also to someone within your organization. Here, a workflow rule can be set to create a task for one of your salespersons to telephone the lead contact along with a reminder e-mail alert to be sent after a specified number of days after the lead record has been entered.
If the salesperson changes the lead status, then a date field could be updated automatically with the date that the lead was contacted.
Up until now, we have looked at the similarity of workflow rules and approval processes. However, there are some key differences. Workflow rules consist of a single step and a single action, whereas approval processes consist of multiple steps and different actions that can be taken based upon whether the record is approved or rejected. Workflow rules trigger automatically and the rules when triggered are not visible to the user. Approval processes, on the other hand, contain multiple steps each requiring a specific "I approve or reject" user action by the specified approver(s).
In practice, the first step in creating workflow and approval rules is to define and map out the process and for each step in the process, detail the objects, the criteria, the users, and the actions required for the process.
Workflow and approval actions consist of e-mail alerts, tasks, field updates, and outbound messages that can be triggered either by a workflow rule or by an approval process.
An e-mail alert is an action that can be generated by both workflow and approval actions using an e-mail template that is sent to specified recipients which can be either Salesforce CRM application users or external e-mail recipients.
A field update is an action that can be activated by use of both workflow and approval actions that specify the field for update and the new value for it. The fields update action depends on the data type of the field where you can choose to apply a specific value, clear the field, or calculate a value according to a criteria or a derived formula that you can a specify.
Tasks are workflow and approval actions that are triggered by workflow rules or approval processes, and allow the assignment of tasks to a user that you can specify. You would also specify the Subject, Status, Priority, and Due Date of the task. Tasks appear on the user's calendar which can be accessed by the My Tasks section of the Home tab or on the specific day for the task within the Day View on the user's calendar. Tasks can be assigned on their own but you can also combine them with an e-mail alert to inform the user.
An outbound message in Salesforce CRM is an action that can be activated by both workflows and approvals that sends information to a web URL endpoint all of which you specify. The outbound message contains the data in specified fields in what is known as a SOAP message to the endpoint. As this requires development of a receiving web-service-enabled to set up and describe this action is not covered in this book.
To configure e-mail alerts, follow the path Your Name | Setup | (App Setup) | Create | Workflow & Approvals | Email Alerts, and then the click on the New Email Alert button.
Within the Email Alert Edit page, the following settings are presented:
To set the details for the e-mail alert, carry out the following:
The unique name for the e-mail alert is required and used by the API and managed packages. The name is auto-populated when you enter the preceding field called description. There are restrictions for permitted characters whereby the unique name must begin with a letter and use only alphanumeric characters and underscores. Also, the unique name cannot end with an underscore or have two consecutive underscores.
The Protected Component checkbox is used to mark the alert as protected. This option can be ignored as it is a setting used by developers who are building applications with the "managed release" package functionality. If you install a managed package, there are restrictions on what can be edited by non-developers. This is discussed later in the book.
Here you can:
Set the From Email Address
Setting the From Email Address also allows you to use a standard global e-mail address for your organization, such as [email protected], instead of the default From field, which is the e-mail address of the user who updates the record. Only verified organization-wide e-mail addresses will appear in the From Email Address picklist options.
There is a daily limit of 1,000 e-mail alerts per standard Salesforce license for workflow and approvals.
There is also an overall daily limit of 2,000,000 e-mail alerts for your entire organization and when the daily limits are reached, a warning e-mail is sent out by the Salesforce CRM application to the default workflow user where one is set. If there is no default workflow user set, then the warning e-mail goes out to a system administrator.
By setting up organization-wide addresses, your users can share a set of common e-mail aliases. Here, you can define a list of organization-wide addresses for each user profile.
When sending e-mail from Salesforce, users with these profiles can then choose a different From address than the e-mail address that they have defined on their user record and any e-mail responses are then returned to the organization-wide address.
To set up the list of organization-wide e-mail addresses, follow the path Your Name | Setup | (Administration Setup) | Email Administration | Organization-Wide Email Addresses.
From Organization-Wide Email Addresses, you can set the display name, the e-mail address, and the profiles that are permitted to use that address as shown:
When the organization-wide e-mail address is saved, (or is changed), Salesforce will send an e-mail to the address specified in the e-mail address field to verify that the e-mail address is valid, as shown next:
Now, the verified organization-wide e-mail addresses will appear in the From Email Address picklist options when configuring e-mail alerts as shown next:
To configure tasks, follow the path Your Name | Setup | (App Setup) | Create | Workflow & Approvals | Tasks, and then the click on the New Task button.
From the Step 1: Select object page, select the type of object type for the record from the select object picklist and click on Next.
Within the Step 2 : Configure Task page, the following settings are presented:
To set the details for the task, carry out the following:
If the assignee of a workflow task is a role and that particular role has multiple users, the record owner is then assigned the task. This is done regardless of the type of role that the record owner has which can cause some confusion.
This is because tasks cannot be assigned to more than one user and hence best practice dictates that you do not assign tasks to roles even though the option exists.
The unique name for the task is required and used by the API and any managed packages. The name is auto-populated when you move from the preceding field called Subject. There are restrictions for permitted characters whereby the unique name must begin with a letter and use only alphan-umeric characters and underscores. Also the unique name cannot end with an underscore or have two consecutive underscores.
To configure field updates, follow the path Your Name | Setup | (App Setup) | Create | Workflow & Approvals | Field Updates, and then click on the New Field Update button.
Within the Field Update Edit page, perform the following:
Both the name and a unique name for the field update are required. The unique name is used by the API and managed packages. The name is auto-populated when you exit the preceding name field. There are restrictions for permitted characters in that the unique name must begin with a letter and use only alphanumeric characters and underscores. Also the unique name cannot end with an underscore or have two consecutive underscores.
Upon choosing the object and field to update, a new section called Specify New Field Value appears where you can set the logic of the desired field update. Here, the available options depend on the type of field you are updating with following scenarios:
For checkboxes, choose True to select the checkbox and False to deselect it as shown:
This is useful for automating the setting of status flags for records whenever a certain business process is complete. In the previous example, the field update of the field Publish to Web? allows the automatic setting of the checkbox option to true, say, so that the record can be published.
For record owners, choose the user to whom the record should be assigned as shown:
This is useful for automating the changing of record owner for records whenever a certain business process is complete. For example, you could automate the field update of record owner from, say, a marketing executive to an account manager if a lead matches certain criteria.
For picklist fields, you can either select a specific value from the picklist, or you can select the value above or below the current value as shown. The above or below selection is based on the sorting order that is set in the picklist field definition.
For all other data types, you can set the following Text Options as shown:
Follow these steps to finish the field update configuration:
An outbound message in Salesforce CRM is an action that can be activated by both workflows and approvals that sends information to an web URL endpoint which you specify.
The outbound message contains the data using the specified fields in what is known as a SOAP message to the endpoint URL. Once the endpoint receives the message data, it consumes the information from the message and processes it.
As this requires development of a receiving web-service endpoint setting up this action is beyond the scope of this book.
18.191.240.222