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. 

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

  1. 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.

  2. From the upper right-hand corner in the header, click Create New Rule. The Data Enrichment and Validation Setup wizard is displayed.
  3. 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").
  4. From the Target Object To Validate drop-down, select either Customer Purchase Order or Customer PO Item
  5. If you selected Customer PO Item as the object to validate, click the Target Object Parent drop-down and select Customer Purchase Order.
  6. From the Source Data Object drop-down, select the source object on the price agreement you want to match to the customer purchase order. 
  7. Click Next to display the Specify Target Data Filter Criteria screen.
  8. Click Add and define filter criteria to be applied to the target Customer PO or PO Item:
    1. Select a Field on the Target object (for example, Status).
    2. Select an Operator.
    3. 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).
  9. Click Add to add another filter to the target and repeat step 8. You can remove defined filter criteria by clicking the Delete icon ().
  10. Add any Filter Logic as needed.
  11. Click Next to display the Specify Source Data Filter Criteria screen.
  12. 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:
    1. Select a Field on the Source object (for example, Proposal Line Item).
    2. Select an Operator.
    3. 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.
    4. 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.
  13. Click Add to add another filter to the target and repeat step 12. You can remove defined filter criteria by clicking the Delete icon ().
  14. Click Save and Close to save the ruleset or click Next to display the Specify Enrichment Rules screen.
  15. Define an Enrichment rule to set a value on the Customer PO or PO Item to a value from the selected Source Object field:
    1. Select the Target Object Field (for example, Contract Item Number).
    2. Select the Source Object Field (for example, Record ID).
    3. Click the toggle to make the field a required field on the Customer Purchase Order or PO Item.
    4. 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).
  16. Click Add to add another rule to the ruleset and repeat Step 15. You can remove a rule by clicking the Delete icon ().
  17. Click Save and Close to save the ruleset or click Next to display the Specify Validation Rules screen.
  18. Define a Validation rule to validate a value in the CPO or PO Item against the master data in the Source object field:
    1. Select the Target Object Field (for example, Quantity).
    2. Select the Match Operator (for example, "less than or equal to").
    3. Select the Source Object Field (for example, Quantity (2)).
    4. Select the Error Type to be triggered when the rule does not evaluate to true: Warning or Error.
    5. Enter the Message to display to the user when an error occurs.
  19. Click Add to add another rule to the ruleset and repeat step 18. You can remove a rule by clicking the Delete icon ().
  20. 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.
  21. Click Done to save the ruleset and return to the PO Admin page.
  22. 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

  1. From the upper right-hand corner in the header, click Create New Rule. The Data Enrichment and Validation Setup wizard is displayed.
  2. Enter "Enrich PO and validate quantity" as the Ruleset Name.
  3. Enter "1" in the Sequence field.
  4. Click the Target Object To Validate drop-down and select Customer PO Item
  5. Click the Target Object Parent drop-down and select Customer Purchase Order.
  6. Click the Source Data Object drop-down and select Proposal Line Item
  7. Enter the Description "Enrich PO and validate quantity against QLI."
  8. Click Next to display the Specify Target Data Filter Criteria screen.
  9. Click Add and define the following filter criteria: 
    1. Click the Field drop-down and select the field "Status."
    2. Click the Operator drop-down and select "in." Value type is "Constant."
    3. Click the Value drop-down and select "In Amendment" and "Draft."
  10. Click Next to display the Specify Source Data Filter Criteria screen.
  11. Click Add and define the following filter criteria:
    1. Click the Field drop-down and select the field "Line Item Id."
    2. Click the Operator drop-down and select "equal to." Value type is "Field Value."
    3. Click the Value drop-down and select "Quote Line Item."
  12. Click Next to display the Specify Enrichment Rules screen.
  13. 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:
    1. Click the Target Object Field drop-down and select Product.
    2. Click the Source Object Field and select Product
  14. 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:
    1. Click the Target Object Field drop-down and select Ship To.
    2. Click the Source Object Field and select Ship To
    3. Click the toggle to make Ship To a required field on the Customer Purchase Order or PO Item.
    4. 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).
  15. 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:
    1. Click the Target Object Field drop-down and select Net Price.
    2. Click the Source Object Field and select Net Price
  16. Click Next to display the Specify Validation Rules screen.
  17. Define a Validation rule to validate Quantity of the PO Item against master data in the Proposal Line Item record:
    1. Click the Target Object Field drop-down and select Quantity.
    2. Click the Match Operator drop-down and select equal to.
    3. Click the Source Object Field drop-down and select Quantity (2).
    4. Click the Error Type drop-down and select Error
    5. In the Message field, enter "PO quantity does not match the value on the proposal line item."
  18. Click Next to display the Review screen.
  19. Click Done to save the ruleset and return to the PO Admin page.
  20. 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.