Question
Capgemini
US
Last activity: 11 Apr 2022 12:24 EDT
Treatment Eligibility -When Rule
I have a requirement where I have an action with 2 different email treatments based on the policy type. I have decided to implement this via the treatment eligibility functionality in Customer Decision Hub since this is a similar use case as the language of the email (in my case we have to different email verbiage based on the policy type).
As per Pega quidelines in order to see the rule in the drop-down list of the eligibility I have to create a " when rule" and save it under "Data-Decision-Request-Customer" class (https://docs-previous.pega.com/pega-customer-decision-hub-implementation-guide/86/creating-treatment-eligibility-criteria).
In my project the context is structured at Customer Level and under Customer I have products. (policies). My challenge is how to write the condition when I have 3 structures: Customer.Product.Product Type (I need to check the Property value).
Any suggestion or function advice on how to check the ProductType value under Customer. Products will be very much appreciated. ( screenshot attached).

I have a requirement where I have an action with 2 different email treatments based on the policy type. I have decided to implement this via the treatment eligibility functionality in Customer Decision Hub since this is a similar use case as the language of the email (in my case we have to different email verbiage based on the policy type).
As per Pega quidelines in order to see the rule in the drop-down list of the eligibility I have to create a " when rule" and save it under "Data-Decision-Request-Customer" class (https://docs-previous.pega.com/pega-customer-decision-hub-implementation-guide/86/creating-treatment-eligibility-criteria).
In my project the context is structured at Customer Level and under Customer I have products. (policies). My challenge is how to write the condition when I have 3 structures: Customer.Product.Product Type (I need to check the Property value).
Any suggestion or function advice on how to check the ProductType value under Customer. Products will be very much appreciated. ( screenshot attached).


Best regards,
Silviu

@SilviuStefan If I understand your question correctly, you are trying to reference the current Customer.Product's ProductType property in your When condition. Please review Step 4 in the Treatment eligibility article your referenced (https://docs-previous.pega.com/pega-customer-decision-hub-implementation-guide/87/creating-treatment-eligibility-criteria) where it describes you need to define a Pages & Classes entry for each context in your Context Dictionary. NOTE: These pages will be automatically mapped in the strategy and Proposition Filter which will ultimately call this When rule.
Add similar to the following entries to your Pages & Classes
Customer MyOrg-Data-Customer
Product MyOrg-Data-Product
Now in your When condition logic you can use these pages to access your ProductType property
Product.ProductType = "CreditCard"
The product being currently processed should be set to the Product page