Creating Workflow Rules
Before you begin. Workflow functionality in Oracle CRM On Demand must be set up for your company, as described in About Workflow Rules. To perform the procedures described in this topic, you must have the Manage Data Rules - Manage Workflow Rules privilege in your user role. For information on adding privileges to roles, see Adding Roles.
NOTE: After a rule is created, you cannot change the record type or trigger event on the rule. However, you can update the workflow condition.
To create a workflow rule
- In the upper-right corner of any page, click the Admin global link.
- In the Business Process Management section, click Workflow Configuration.
- On the Workflow Rules List page, do one of the following:
- To create a new workflow rule by copying an existing one, click Copy on the workflow rule that you want to copy.
- To create a new workflow rule that is not based on an existing rule, click New on the title bar.
- In the Workflow Rule Detail page, in the Key Workflow Rule Details section, fill in the rule information.
The following table describes the rule fields.
Field
|
Description
|
Workflow Name
|
Enter a unique name, up to 50 characters.
|
Active
|
Use the Active check box to enable and disable the rule. Any number of workflow rules can be active at the same time.
|
Record Type
|
Select the record type for the workflow rule.
For create, update, and delete trigger events, each workflow rule relates to one record type only. The rule is evaluated for that type of record and the actions are performed on that type of record. After a rule is created, you cannot change the record type on the rule.
For workflow rules where the trigger event is After Association With Parent trigger event or After Dissociation From Parent, select the record type of the child record. For example, if you want the workflow rule to be triggered when a contact record is associated with an account record, select Contact in this field, and select Account in the Parent Record Type field.
|
Trigger Event
|
Select the event that triggers the rule.
When this event occurs on a record of the specified type, the rule is evaluated. After a rule is created, you cannot change the trigger event on the rule.
NOTE: The trigger events After Association With Parent and After Dissociation From Parent are supported only for the Account, Contact, and Opportunity record types. For more information, see the Association and Dissociation Trigger Events section of the About Workflow Rules topic.
|
Order
|
This field is read-only when you create the workflow rule. It determines the order in which Oracle CRM On Demand invokes rules that are based on the same record type and the same trigger event. Oracle CRM On Demand automatically assigns the next unused number for rules based on the same record type and the same trigger event, but you can later change the order of the workflow rules. For more information, see Changing the Order of Workflow Rules.
|
Parent Record Type
|
This field is displayed if you select the After Association With Parent trigger event or the After Dissociation From Parent trigger event.
Select the parent record type. For example, if you are setting up a workflow rule that will be triggered when a contact record is associated with a parent account record, select Account in this field, and select Contact in the Record Type field.
|
- If you want to define a condition on the workflow rule, click the fx icon in the Workflow Rule Condition section of the page, and use Expression Builder to define the workflow rule condition. For more information about Expression Builder, see Expression Builder.
NOTE: If you do not define any condition for the workflow rule, the actions on the rule will be performed each time the rule is triggered.
When creating conditions on workflow rules, note the following points:
- A workflow rule condition can contain a maximum of 1024 characters.
- You can configure workflow rules that are specific to particular roles or channels. For more information about restricting workflow rules to specific roles or channels, see Restricting Workflow Rules to Specific Channels or Roles.
- You can determine if a field in a record has been updated by using a condition similar to the following in the workflow rule. In this example, the string used to determine if the field has changed is Invalid, but you can use any string you want, provided that the string does not exist as a value in the field that is being examined:
IfNull([<FieldName>], "Invalid") <> IfNull(PRE("<FieldName>"), "Invalid")
CAUTION: The PRE function does not return the previous value of a field if the function is used in any workflow or action that is invoked after a Wait action. For more information about the PRE() function, see PRE.
- (Conditional) If the trigger event on the rule is Before Modified Record Saved and the record type on the rule is Opportunity, do the following:
- In the Actions If Condition Is False section of the Workflow Rule Detail page, specify whether the save operation is to be canceled if the rule condition is not met.
- (Optional) Specify the error message that is to be displayed when the save operation is canceled because the rule condition is not met.
NOTE: The option to cancel the save operation is available only on workflow rules where the trigger event is Before Modified Record Saved and the record type is Opportunity.
The following table describes the options in the Actions If Condition Is False section of the Workflow Rule Detail page.
Field
|
Description
|
Cancel Save
|
If you select this check box, the following actions are performed if the rule condition is not met:
- The workflow rule terminates.
- All subsequent workflow rules based on the same record type that have the Before Modified Record Saved trigger event also terminate.
- All previous changes to the state of the record, except changes made by Oracle CRM On Demand, are rolled back.
- The record returns to its original state. However, if Oracle CRM On Demand makes an update to the record, the change overrides the Cancel Save action. For example, if the primary contact is removed from the related contacts, Oracle CRM On Demand updates the primary contact information on the parent opportunity record. This update by Oracle CRM On Demand overrides any Cancel Save action on the opportunity record.
- Any subsequent workflow rules for the same record type that have the When Modified Record Saved trigger event are not triggered.
- A message is returned as follows:
- If the rule is triggered by a user action, a message is displayed to the user whose action triggered the rule.
- If the rule is invoked by a Web service, a message is returned to the Web service as an error string.
- If the rule is invoked by an import operation, a message is returned as an error string to the import log file.
You can specify the message in the Display Message field.
If this check box is not selected, the save operation is not affected (and no message is returned) if the condition on the rule is not met.
By default, the Cancel Save check box is not selected.
|
Display Message
|
In this field, you can specify the message that is returned to the user, Web service, or import log file if the condition on the rule is not met and the Cancel Save check box is selected on the rule.
If you do not specify a message in this field, a default message is returned.
The maximum number of characters that the message can contain is 1999.
|
- Save the workflow rule.
When you have saved the rule, you can create actions for the rule. You can create multiple actions for a workflow rule, up to a maximum of 25 actions for each rule. For step-by-step procedures for creating workflow actions, see the following topics:
Related Topics
See the following topics for related workflow information:
|