Chapter 6. Implementing Business Processes in Salesforce CRM

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:

  • Workflow rules
  • Approvals process
  • Workflow actions
  • Workflow queue
  • Approval wizard
  • Process visualizer

Workflow rules and approval processes

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

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.

E-mail alert

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.

Field update

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.

Task

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.

Outbound message

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.

Configuring e-mail alerts for workflow rules and approval processes

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:

Configuring e-mail alerts for workflow rules and approval processes

To set the details for the e-mail alert, carry out the following:

  • Enter a description for the e-mail alert
  • Enter a unique name for the e-mail alert

    Note

    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.

  • Choose an e-mail template.

    Note

    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.

  • Now select who should receive this e-mail alert from the available options:

    Recipients

    Description

    Account Owner

    If the Account Owner is selected then the e-mail alert is sent to the user in Salesforce CRM who is set as the account owner of either the account record or the account that is related to the record. Since this option requires an account relationship to be present, it is only valid on accounts, opportunities, contacts, and so on, and custom objects that are children of the account object.

    Account Team

    Choose from the list of users that are assigned to a particular account team role. Note: E-mail alerts are only sent when the rule is associated with the account object or any of its direct child objects.

    Case Team

    Choose from the list of users assigned to a particular case team role.

    Creator

    This is the user listed as the record creator and is the user who is set in the Created By field.

    Customer Portal User

    Choose from the list of users that are associated with a Customer Portal.

    Email Field

    An e-mail address field on the selected object, such as the Email field on contact records or a custom e-mail field.

    Owner

    The record owner.

    Partner User

    Choose from the list of users that are associated with a partner portal.

    Portal Role

    Choose from the list of users that are assigned to a particular portal role.

    Portal Role and Subordinates

    Choose from the list of users assigned to a particular portal role, plus all users in roles below that role.

    Public Groups

    Choose from the list of users in a particular public group.

    Related Contact

    An associated contact on the record. For example, you may have created a custom contact on the opportunity object called "Key Decision Maker"

    Related Lead or Contact Owner

    This is a related user lookup to the owner fields set on either the lead or contact record that is associated to the record. As an example, for opportunities, this field could be set to a contact role field linking to a contact.

    Related User

    A Related User is a user lookup field that is associated to the record. As an example, this field may d be set to the Last Modified By field.

    Role

    Choose from the list of users assigned a particular role.

    Role and Internal Subordinates

    Choose from the list of users in a particular role, plus all users in roles below that role, excluding partner portal and Customer Portal users.

    Role and Subordinates

    Choose from the list of users in a particular role, plus all users in roles below that role.

    User

    Choose from the list of available users in Salesforce CRM.

    Sales Team

    After having setup Sales Teams, this option allows you to choose from the list of users associated to a Sales Team.

  • Select the recipients who should receive this e-mail alert in the Available Recipients list and click on Add.

    Note

    If you change the object after selecting recipients, the Selected Recipients list will be automatically cleared.

  • Optionally, enter to and from e-mail addresses, and then finally click on Save.

Here you can:

  • Enter up to five additional recipient e-mail addresses (which may or may not be users in Salesforce).
  • Set the From Email Address to either the current user's e-mail address or to the default workflow user's e-mail address. .
  • Finally, to begin to use the e-mail alert, associate it with either a workflow rule or an approval process.

    Tip

    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.

Organization-wide Email Addresses

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:

Organization-wide Email Addresses

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:

Organization-wide Email Addresses

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:

Organization-wide Email Addresses

Configuring tasks for workflow rules and approval processes

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.

Note

When creating tasks for custom objects, only custom objects that have been set with activities are available for selection in the picklist.

Within the Step 2 : Configure Task page, the following settings are presented:

Configuring tasks for workflow rules and approval processes

To set the details for the task, carry out the following:

  • You must select an individual or individuals in which to set the required Assigned To field. Here the options when you click the lookup dialog for the Assigned To setting allows for the selection of either User, Role, or Record Owner.

    Note

    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.

  • Enter a subject and a unique name for the task

    Note

    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.

  • Choose a due date, status, and priority where due dates appear in the time zone of the assignee
  • Set the Notify Assignee checkbox to also send an e-mail notification when the task is assigned

    Note

    The Protected Component checkbox is used to mark the alert as protected. This is used by developers who are building managed package applications for the AppExchange Marketplace (the AppExchange will be covered in a later chapter).

  • Optionally, enter any comments for the description information that is included with the task and then click on Save
  • Finally, to set the task into action, associate it with the required workflow rule or approval process

    Note

    When the task is assigned it will include a Created By field which contains the name of the person who saved the record that triggered the rule to assign the task.

Configuring field updates for workflow rules and approval processes

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:

  • Enter a name and a unique name for the field update

    Note

    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.

  • Now, optionally enter a description for the field to update and then choose the object type to present the field to be updated as shown here for the object Opportunity:
    Configuring field updates for workflow rules and approval processes

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:

Checkboxes

For checkboxes, choose True to select the checkbox and False to deselect it as shown:

Checkboxes

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.

Record owners

For record owners, choose the user to whom the record should be assigned as shown:

Record owners

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.

Tip

Select Notify Assignee

Selecting Notify Assignee allows the automatic sending of an e-mail to the new record owner whenever the field update fires.

Picklists

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.

Picklists

Other data types

For all other data types, you can set the following Text Options as shown:

Other data types

Follow these steps to finish the field update configuration:

  • Choose A blank value (null) if you want to remove any existing value and leave the field blank

    Note

    This option is not available for required fields, checkboxes, and some other types of fields.

  • Choose Use a formula to set the new value to calculate the value based on formula logic
  • Now click on Save to complete the configuration of the field update
  • Finally, to set the field update into action, associate it with the required workflow rule or approval process

Configuring outbound message notifications for workflow rules and approval processes

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.

..................Content has been hidden....................

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