Download PDF
Download page Creating Data Enrichment and Validation Rules.
Creating Data Enrichment and Validation Rules
You can use the Purchase Order Admin (PO Admin) user interface to create and manage Data Enrichment and Validation rules for your Customer Purchase Orders.
A Data Enrichment and Validation Ruleset defines the target object (Customer PO or Customer PO Item), the source object (Quote/Proposal, Contract, Order, Proposal Line Item, Agreement Line Item, or Order Line Item), the criteria to be applied to the target and source objects, and any additional filter logic. When criteria for a ruleset is fulfilled, the Enrichment and Validation Rules defined in the ruleset are triggered and any actions specified in its rules are executed. Perform the following task to create a Data Enrichment and Validation Ruleset and its rules.
Do not click your browsers "Back" button when using the PO Admin.
To create Enrichment and Validation rules using the PO Admin
Navigate to the PO Admin tab. The Customer Purchase Order Admin page is displayed.
If you cannot find the PO Admin tab, your administrator must add the tab in Salesforce. Refer to the Order Management for Administrators for steps.
- From the upper right-hand corner in the header, click Create New Rule. The Data Enrichment and Validation Setup wizard is displayed.
- Enter a Ruleset Name and the Sequence, which indicates the order in which this ruleset will be validated on confirmation of the customer purchase order (starts at "1").
- From the Target Object To Validate drop-down, select either Customer Purchase Order or Customer PO Item.
- If you selected Customer PO Item as the object to validate, click the Target Object Parent drop-down and select Customer Purchase Order.
- From the Source Data Object drop-down, select the source object on the price agreement you want to match to the customer purchase order.
- Click Next to display the Specify Target Data Filter Criteria screen.
- Click Add and define filter criteria to be applied to the target Customer PO or PO Item:
- Select a Field on the Target object (for example, Status).
- Select an Operator.
- Enter or select a Value for the field (for example, Draft. In this case, whenever the system finds a status in Draft, the rule is triggered for the Customer Purchase Order).
- Click Add to add another filter to the target and repeat step 8. You can remove defined filter criteria by clicking the Delete icon ().
- Add any Filter Logic as needed.
- Click Next to display the Specify Source Data Filter Criteria screen.
- Click Add and define the filter criteria to match a field on the source object (Quote/Proposal, Proposal Line Item, Agreement, Agreement Line Item, Order, or Order Line Item) with a field on the Customer PO or PO Item, or to validate a field on the source object against a field on the Customer PO or Customer PO Item:
- Select a Field on the Source object (for example, Proposal Line Item).
- Select an Operator.
- To match a field on the source object with a field on the Customer PO, click the Value Type drop-down and select Field Value. Then select one or more values from the Target Field drop-down.
- To validate a field on the source object against a field on the Customer PO, click the Value Type drop-down and select Constant. Enter the value for the field on the target object.
- Click Add to add another filter to the target and repeat step 12. You can remove defined filter criteria by clicking the Delete icon ().
- Click Save and Close to save the ruleset or click Next to display the Specify Enrichment Rules screen.
- Define an Enrichment rule to set a value on the Customer PO or PO Item to a value from the selected Source Object field:
- Select the Target Object Field (for example, Contract Item Number).
- Select the Source Object Field (for example, Record ID).
- Click the toggle to make the field a required field on the Customer Purchase Order or PO Item.
- Enter the Message to be displayed to the user when an error occurs (for example, when either the target or source object field is not found).
- Click Add to add another rule to the ruleset and repeat Step 15. You can remove a rule by clicking the Delete icon ().
- Click Save and Close to save the ruleset or click Next to display the Specify Validation Rules screen.
- Define a Validation rule to validate a value in the CPO or PO Item against the master data in the Source object field:
- Select the Target Object Field (for example, Quantity).
- Select the Match Operator (for example, "less than or equal to").
- Select the Source Object Field (for example, Quantity (2)).
- Select the Error Type to be triggered when the rule does not evaluate to true: Warning or Error.
- Enter the Message to display to the user when an error occurs.
- Click Add to add another rule to the ruleset and repeat step 18. You can remove a rule by clicking the Delete icon ().
- Click Next to display the Review screen. You can review the entire Data and Enrichment Validation Rule Setup on this page. If you need to make any changes, click Previous to return to the appropriate step.
- Click Done to save the ruleset and return to the PO Admin page.
- Click Activate to activate the ruleset.
When a rule is executed and any errors are found, they are recorded in the log.
Use Case: Creating a Data Enrichment/Validation Ruleset for a Customer Purchase Order
Description: The requirement for this Customer Purchase Order is to create and apply Data Enrichment and Validation rules as part of a ruleset that enriches the PO using data on the quote line item. The ruleset then validates that the quantity entered in the PO is the same as the quantity on the quote line item. This use case is an example of a ruleset that can be applied to multiple purchase orders with varying combinations of products and services.
In the following example, an administrator or sales user/customer support representative with appropriate permissions creates a Data Enrichment/Validation Ruleset and the Enrichment and Validation rules that comprise it.
Prerequisites:
- The Customer Purchase Order and Purchase Order Admin user interfaces must be configured.
- Data Enrichment/Validation Ruleset seed data must be configured.
Refer to Order Management for Administrators for configuration steps.
To create a Data Enrichment/Validation Ruleset to enrich the Customer Purchase Order and validate order quantities against quote line items
- From the upper right-hand corner in the header, click Create New Rule. The Data Enrichment and Validation Setup wizard is displayed.
- Enter "Enrich PO and validate quantity" as the Ruleset Name.
- Enter "1" in the Sequence field.
- Click the Target Object To Validate drop-down and select Customer PO Item.
- Click the Target Object Parent drop-down and select Customer Purchase Order.
- Click the Source Data Object drop-down and select Proposal Line Item.
- Enter the Description "Enrich PO and validate quantity against QLI."
- Click Next to display the Specify Target Data Filter Criteria screen.
- Click Add and define the following filter criteria:
- Click the Field drop-down and select the field "Status."
- Click the Operator drop-down and select "in." Value type is "Constant."
- Click the Value drop-down and select "In Amendment" and "Draft."
- Click Next to display the Specify Source Data Filter Criteria screen.
- Click Add and define the following filter criteria:
- Click the Field drop-down and select the field "Line Item Id."
- Click the Operator drop-down and select "equal to." Value type is "Field Value."
- Click the Value drop-down and select "Quote Line Item."
- Click Next to display the Specify Enrichment Rules screen.
- Click Add and define an Enrichment rule to set the value for the Product field on the Customer PO Item to the value of the same field on the Proposal Line Item:
- Click the Target Object Field drop-down and select Product.
- Click the Source Object Field and select Product.
- Click Add and define an Enrichment rule to set the value for the Ship To field on the Customer PO Item to the value of the same field on the Proposal Line Item:
- Click the Target Object Field drop-down and select Ship To.
- Click the Source Object Field and select Ship To.
- Click the toggle to make Ship To a required field on the Customer Purchase Order or PO Item.
- Enter the Message "Ship To not found at the source on the line item" (this displays a message to the user when the Ship To field has no value on the corresponding quote line item).
- Click Add and define an Enrichment rule to set the value for the Net Price field on the Customer PO Item to the value of the same field on the Proposal Line Item:
- Click the Target Object Field drop-down and select Net Price.
- Click the Source Object Field and select Net Price.
- Click Next to display the Specify Validation Rules screen.
- Define a Validation rule to validate Quantity of the PO Item against master data in the Proposal Line Item record:
- Click the Target Object Field drop-down and select Quantity.
- Click the Match Operator drop-down and select equal to.
- Click the Source Object Field drop-down and select Quantity (2).
- Click the Error Type drop-down and select Error.
- In the Message field, enter "PO quantity does not match the value on the proposal line item."
- Click Next to display the Review screen.
- Click Done to save the ruleset and return to the PO Admin page.
- Click Activate to activate the ruleset.
Result: A Data Enrichment/Validation Ruleset is created and activated. Any custom purchase orders created in the system from this point forward will use the enrichment and validation rules defined by the ruleset.
Next Step: Create a Customer Purchase Order and Purchase Order items for an accepted quote.