PDX Rules Tab

The PDX Rules tab of the PDX Channel Configurator contains multiple parameters that define the setup of data validation rules in PDX.

LOV Restrictions

Retailers can configure their channel so that when PDX users onboard products, they can make a selection in one LOV attribute and the options available to them in an entirely different LOV attribute will be pre-filtered. This presents the PDX user with a retailer-configured subset of LOV values from which to select. This can be done by configuring a product data validation with a LOV restriction condition.

As an example, an LOV attribute named ‘Country’ is a product attribute a supplier can enrich in PDX. From the LOV dropdown, the user has selected the value ‘Germany’, as shown in the screenshot below.

Because the LOV restriction has been implemented, when the PDX user selects ‘Germany’ the LOV options available in the LOV attribute ‘Region’ will display only German regions, even though the LOV from which the values are drawn contains regions for many countries.

This pre-filtering is controlled via an Attribute metadata attribute, which must be made available on the attribute definition.

The LOV restriction metadata attribute is used to enable the connection between the two relevant LOV-based attributes. For the dependent attribute, which is the LOV-based attribute whose values will be filtered, the value assigned to the LOV restriction attribute should be the ID of the defining attribute, which is the LOV-based attribute that determines the valid values. To continue the example described above, the dependent attribute ‘Region’ would have the LOV restriction attribute populated with the value ‘Country’.

Additionally, the ValueIDs for the two LOVs configured for LOV restriction must also satisfy additional requirements for the cross-validation to work.

  • The ValueIDs of the dependent LOV values, the values being filtered, must be prepended with the value ID of the defining LOV for the cross-validation to work properly.

    To continue the example described previously, the LOV attribute ‘Country’ includes an LOV value 'Germany' with the ValueID 'germany’. To restrict the region options available in the LOV attribute ‘Regions' to only German regions when ‘Germany’ is selected, the ValueID for the German region ‘Mosel' must begin with the ValueID for 'Germany’, which is ‘germany’'. Using this logic, a possible ValueID for ‘Mosel’ could be ‘germany_mosel'.

  • The LOV restriction allows for multiple layers of dependent attributes, not just two.

    To expand upon the previous example, let us say the retailer wants to include a second dependent LOV attribute, in this case ‘City’, to the cross-validation. In this scenario, the LOV restriction attribute for ‘City’ must be set to ‘Region’. A supplier would first select ‘Germany’ for ‘Country’, then ‘Mosel’ for ‘Region, and then, for the ‘City’ LOV attribute, only retailer-relevant German cities in the selected region should be available for the supplier to select. So, if an LOV value from the LOV ‘City’ is to be a selectable value when the user selects ‘Mosel', the ValueID for the valid city, in this case 'Koblenz’, will need to have both of its defining LOV values prepended to its ValueID. Using this logic, a possible ValueID for 'Koblenz' could be 'germany_mosel_koblenz'.

Following are the parameters available within the PDX Rules tab:

  • Mandatory For Submit: This parameter shall be configured with an attribute group. The attribute group holds those attributes that vendors must provide before submitting a product from PDX. If an attribute is mandatory for specific categories, it should not be included in this attribute group.

  • Category Mandatory For Submit: This parameter shall be configured with a metadata attribute. An LOV-based metadata attribute for Product Attribute Link, which defines if an attribute is mandatory for specific categories. The attribute should be LOV-based with allowed values of 'No' (Value ID=N) and 'Yes' (Value ID=Y).

  • Locked After Initiate: This parameter shall be configured with an attribute group. This attribute group holds attributes that the retailer would like to be locked after initial submission or after sending into PDX via the maintenance flow. For example, if a supplier has submitted a product with a specific GTIN, the retailer would want to lock down that attribute so as not to allow the supplier to re-submit the same product with a new GTIN.

  • LOV Restriction: This parameter contains a metadata attribute and defines the LOV restriction metadata attribute as explained above.

Business Rule Engine

The parameters available within this section are relevant to the configuration of advanced product data validations.

Below are the parameters that are available within the Business Rule Engine section:

  • Conditionally Mandatory Attribute: Making attributes conditionally mandatory using the conditionally mandatory functionality should be avoided. It is recommended that the Validation Engine (reference the bullet displayed below) is used instead as this is a more powerful tool that supports a wider range of related use cases.

  • Description Invalid examples Valid examples

    “:error:” must be present and have non-empty message

    ATTRIB_A:<=:ATTRIB_B:error: ATTRIB_A:<=:ATTRIB_B

    ATTRIB_A:<=:ATTRIB_B:error:A should be greater than B

    At least one truth valued operator must be present (i.e. + or - is not enough) and attribute names must be separated by operators or parentheses

    ATTRIB_A:error:Some message

    (:ATTRIB_A:ATTRIB_B:):error:Some message

    (:ATTRIB_A:+:ATTRIB_B:):error:Some message

    (:ATTRIB_A:+:ATTRIB_B:==:1):error:Some message

    “(“ is matched by “)”

    (ATTRIB_A:<=:ATTRIB_B:error:Some message

    (ATTRIB_A:<=:ATTRIB_B):error:Some message

    if “:ruleid:” is present, then it has non-empty content

    ATTRIB_A:<=:ATTRIB_B:error:Some message:ruleid:

    ATTRIB_A:<=:ATTRIB_B:error:Some message:ruleid:Rule 1

    :ruleid can only contain alphanumeric characters and -_#:

    width:*:height:>:1000:error:too large:ruleid:Unsanitized$ID

    width:*:height:>:1000:error:too large:ruleid:Unsanitized_ID