In continuation of our Salesforce learning, we will take a brief look at salesforce automation. To allow automated process as per customer specification or criteria we need to develop the business logic. This business logic is implemented on formulas, workflows, or approval process.
The logic will help us to introduce automation in salesforce and streamline the process as per customer need. Also, this article will briefly take you through assignment rules and page layouts
Rules for Automation in Salesforce:
The automation rules are divided into two main categories like Validation rules and Workflow rules. One of the best examples for the automation process is formula field.
Formula field is kept as read-only if one wants to evaluate the value by applying some formulas in the background.
Validation Rule (Run on highest priority for the App)
Validation rules are the highest priority rules which allow entering valid data in the field. These rules verify the data entered by the user whether data meets the standard of the specification mentioned by the user.
The validation rule contains a formula or expression for data that can verify the data for one or more fields. The validation rule always returns either true or false.
If all data entered by the user is valid then the application will allow you to save the record.
Example of validation rule for Vehicle Number plate starting
AND ( OR (State = "Maharashtra", State ="MH"), NOT REGEX (NumberPlateStart, "(MH-)")
We can clone validation rules by using the following steps
- Go to management settings for the relevant object, select Validation Rules.
- In the Validation Rules list, click the name of the validation rule.
- Click Clone.
- Define a new rule based on the original rule
- Click Save.
Workflow (Time-Dependent & Time-Independent)
To understand workflow rules let’s consider an example email sending process on a daily basis. Instead of doing it manually, we can configure this process using workflow rule to proceed automatically.
Workflow rules can be applied in the following types of actions based on your organization’s processes/needs:
- Tasks: Assign a new task to a user, or assign a new role, or new record owner.
- Email Alerts: Send an email to one or more recipients (daily/ periodically).
- Field Updates: Update the field on a record.
- Outbound Messages: to send the secure messages of xml-format
Each workflow rule consists of the following things:
- Criteria: Based on criteria the workflow rule to run.
- Action: immediate actions that execute when a record matches the criteria.
Some of the actions are time-dependent and some of them are independent.Time-dependent actions are queued and proceed automatically when a record matches the criteria, and execute according to time triggers.
Assignment Rule for Automation in Salesforce
The organization’s lead generation, support process, cases are managed by assignment rule. The assignment rules can be further mentioned as follows:
- Lead Assignment Rules– Specify how leads are assigned to users or
- Case Assignment Rules– Determine how cases are assigned to users or put into queues
Steps to create this Assignment rule on cases,
Setup -> App Setup -> Cases -> Assignment Rules -> click on New.
- Give name to assignment rule.
- Check the box “set this as the active case assignment rule
- After this click on the rule and now click on New
- Enter the order in which rule should run
- WE can set the formula field (Choose an option to create formula)
- Write the formula
- Assign case to a specific user if the formula comes true.
- Assign an email template that will communicate to a specific user.
Like assignment rule which perform an automated task, we can mention the escape condition. This can be done by escalation rules. These rules define the criteria to escalate.
Different Page-Layouts using Record-Type
Salesforce allows users to set the specific layout according to their need. In addition to this if the organization is using a specific record type for a particular object then the user can set the page layout which is the combination of user’s profile and record type.
One can assign page layouts from:
- The original or enhanced profile user interface
- The object’s customize page layout or record type page
To verify that the user’s accessibility level of record or field level security we can check the field accessibility grid. To view field accessibility grid follow these steps:
Setup -> enter Field accessibility (Find Box) -> select field accessibility. Then choose a particular object view or page layout and then check for accessibility by record, types, or profiles.
That’s all for now in this brief tour on how to add Automation in Salesforce.
In the next article, we will cover the Approval Process in Salesforce. If you have any questions/doubts, please do not hesitate to get back to us.
If you want to brush up earlier articles, here is the index
- Introduction to Cloud Computing (Salesforce.com and Force.com)
- Overview of Database Concepts (Salesforce.com)
- Introduction to Force.com
- Building Salesforce Custom App and Objects
- Object Relationships and Formula Field in Salesforce
- Salesforce Security Model and Overview
- Automation in Salesforce
- Approval Process in Salesforce
- Introduction to SOQL and SOSL
- Introduction to Apex
- Salesforce Data Management
- Visualforce MVC Architecture on Cloud
- Salesforce Reports and Dashboards
- Building a Visualforce (Custom) Page for the Salesforce App
- Salesforce Sandbox and Overview of Force.com capabilities
- Learning Apex and Deployment Tools