Lookup Tables Support in Conditions (Approval Workflow)

You can define data obtained from P, C, PX, CX, or PP and use them in an approval workflow condition expression.

For example, we have a quote condition that starts an approval process: line.MarginPct < noWayMargin. In the condition, line.MarginPct is a margin percentage per line item in the Quote and noWayMargin is the expected margin percentage for each line item (the quote should not go lower than this value) and its value is fetched from the PX, PP, etc. table. The previous version looked like line.MarginPct < 0.1.

In this improved version, we provide two Price Parameter tables besides ApprovalWorkflowSetup, Approvers, and ApprovalConditions. To provide better guidance, we created an example PP table "Test Expected Margin Quote":

Set up Price Parameter Tables

WFExpressionVariableConfiguration

Column NameDescription
Variable Name

Variable that can be used in the condition expression. You can define it in your own way but the input should look like noWayMarign, expectedMargin, etc.

Workflow Type

Name of the workflow type (Quote, Contract, PriceList, PriceGridItem, etc.) where the variable is used.

Lookup Table

Defines a lookup table seeking for the value.

Lookup Type

Defines the lookup type. Supported types: P, C, PX, CX, PP.

Variable Value

Defines an attribute of the lookup table where the variable value is stored.

Variable Type

Defines the variable data type for auto type casting. Supported values: Number (default), String. 

Skip"Yes" – Allows to skip the variable name
"No" – Keeps the variable name

Example:


WFLookupFilterConfiguration

Column NameDescription
Variable Name

Variable name from the WFExpressionVariableConfiguration PP table to define the lookup key.

Lookup Table

Defines a value used to look up for each key.

Lookup Key

Defines a key. For example, key1, key2 for CusotmerId, ProductId in the Test Expected Margin Quote PP shown above. 

Lookup Value

Defines a value where the key will get data. For example, key1 will get data from customerId in Customer Master, key2 is from sku in Product Master.

Note: For a Rebate Agreement with the input type Product Group / Customer Group, you must define "customerGroup" or "productGroup" in this column.

Value Provider

Defines a value provider if the lookup value can not be directly accessed from the approvable. There are some predefined values: 

  • customer – Gets a value in a specific attribute for customerId (if the lookup value is not obtained directly from customerId, it is from another attribute, e.g. Country in Customer Master).
  • product – Gets a value in a specific attribute from sku (if the lookup value is not obtained directly from sku, it is from another attribute, e.g. Business Unit in Product Master). 
  • customerGroup – Gets customerFieldValue from the customer group input.
  • productGroup – Gets productFieldValue from the product group input.

If you are getting the values directly from customerId or sku, you do not need to configure this column.

Example:

Example for approval condition: