Pricefx Classic UI is no longer supported. It has been replaced by Pricefx Unity UI.

 

Condition Type Filter Logics

In this section you can define a logic that will be used in the Condition Type picker when adding Agreement/Promotion terms to a Agreement/Promotion. When users create a new Agreement/Promotion and start adding Condition Types, they will see only a subset of Condition Types based on the logic results. The logic can have multiple elements; for the resulting filter they are joined using the AND operator.

In order for the logic to be used, it must be set as 'Active' and be valid at the time of adding the Condition Type to the Agreement/Promotion.

For example, we can have a single element as show below. It demonstrates how to write the logic if the entitlement is done through data stored in the userGroupViewDetails field. The filter looks like this since userGroupViewDetails is a single field containing all groups as a single string joined by a comma.

//api.logInfo("contract", contract) 
def userGroups = api.user().groups.collect{ it.uniqueName } 
//api.logInfo("user", userGroups) 
def filter = Filter.isNull("userGroupViewDetails") 
if (userGroups == null || userGroups.isEmpty()) {
	return filter 
} else { 
	def filters = [filter] 
	filters.addAll(userGroups.collect { 
		  Filter.like("userGroupViewDetails", "%" + it + "%") 
		}) 
	return Filter.or(*filters) 
}

Found an issue in documentation? Write to us.