Wednesday, January 9, 2013

Order Of Rules In Salesforce

Salesforce processes any rules in the following order:  


  • Validation Rules
  • Assignment Rules
  • Auto-Response  Rules
  • Workflow Rules(Immediate Actions)
  • Escalation Rules

Validation Rule:

Validation rules help improve data quality by preventing users from saving incorrect data. You can define one or more validation rules that consist of an error condition and corresponding error message. Validation rules are executed at record save time. If an error condition is met, the save is aborted and an error message displayed.

What are different  Error Locations?
  1. Top Of the Page
  2. Field



Scenario:

For one Filed ,we create validation rule at backend and also create warning message using pagemessage component at forntend side?question is which one is fired first?

Ans: Pagemessage error is fired first,because validationrules are executed at record save time.


Steps to Create Validation Rule:

  1. Navigate to the relevant object, field, campaign member, or case milestone.
    • For standard objects, click Your Name | Setup | Customize, select the appropriate object, and click Validation Rules.
    • For custom objects, click Your Name | Setup | Create | Objects and select the custom object.
    • To create a validation rule for the field in Ideas, click Your Name | Setup | Customize | Ideas | Comment Validation Rules.
    • To create validation rules for campaign members, click Your Name | Setup | Customize | Campaigns | Campaign Member | Validation Rules.
    • To create validation rules for case milestones (entitlement management must be enabled), click Your Name | Setup |Customize | Cases | Case Milestones | Validation Rules.
  2. In the Validation Rules related list, click New.
  3. Enter the properties of your validation rule.
  4. To check your formula for errors, click Check Syntax.
  5. Click Save to finish or Save & New to create additional validation rules.


Assignment Rule:


Assignment rules to automate your organization’s lead generation and support processes.

Assignment Rules Are two types


Lead Assignment Rule:

Specify how leads are assigned to users or queues as they are created manually, captured from the web, or imported via the lead import wizards.

Case Assignment Rule:

Specify how cases are assigned to users or put into queues ,as they are created manually,using Web-to-Case, Email-to-Case, On-Demand Email-to-Case, the Self-Service portal, the Customer Portal, Outlook, or Lotus Notes.



To create an assignment rule, click Your Name | Setup | Customize from the top of any page. Then select Leads or Cases, and clickAssignment Rules.



Auto-Response Rule:

An auto-response rule is a set of conditions for sending automatic email responses to lead or case submissions based on the attributes of the submitted record. Applicable leads include those captured through a Web-to-Lead form. Applicable cases include those submitted through a:
  • Self-Service portal
  • Customer Portal
  • Web-to-Case form
  • Email-to-Case message
  • On-Demand Email-to-Case message
You can create as many response rules as you like based on any attribute of the incoming lead or case, but only one rule for leads and one for cases can be active at a time. The email responses are listed in the Activity History related list of the lead or contact and the Email related list on cases.

Creating Auto Response Rule:
To create a Web-to-Lead response rule, click Your Name | Setup | Customize | Leads | Auto-Response Rules. To create a response rule for cases, click Your Name | Setup | Customize | Cases | Auto-Response Rules. On the Auto-Response Rules page:
  1. Click New.
  2. Enter the rule name.
  3. Check the active box to make this rule the only one activated.
  4. Click Save.
  5. Create rule entries.

Workflow Rule:

We can use workflow rules to automatic your  procedures and processes.

Workflow Rule can trigger actions  such as email alert,tasks and field updates ,outbound message based on time triggers,criteria and formulas.

  1. Create the evaluation criteria
  2. Add actions
  3. Add Time trigger.

Differences Between Auto-Response Rules and Workflow Alerts?


Auto-response rules and workflow alerts provide similar functionality. The following table lists some of the differences between workflow alerts and auto-response rules to help you determine which process to use:
Type of ProcessDesigned ForRuns WhenSends Email ToNumber of Emails Sent
Workflow alertsNotifications to interested parties.A case or lead is created or edited.Anyone you choose who is associated to the Case or Lead object.Sends as many emails as there are matching criteria in the workflow.
Auto-response rulesInitial response to the contact who created a case or the person who submitted the lead on the Web.A case or lead is created.Contact on a case or the person who submitted the lead on the Web.Sends one email based on the first rule entry criteria it matches in a sequence of rule entries.



Escalation Rules:

Create case escalation rules to escalate cases automatically if they are not resolved within a certain period of time.

your organization will have one escalation rule that consists of multiple entries which specify exactly how the cases are escalated. For example, your standard case escalation rule could have two entries: cases with Type set to Gold are escalated within two hours, and cases with Type set to Silver are escalated within eight hours.


0 comments:

Post a Comment