Product rule creation on click of front end button

Hello Pega Experts,

I have a query. I want to create a Product rule on the click of a button. I already know the attribute names, which I will set when the button is clicked for creating the Product rule.

Currently, I am using a template Product rule. I perform an Obj-Open-By-Handle, set the required properties, and then save it as a new instance.

I would like to know if there are any other out-of-the-box (OOTB) rules or approaches that can help me create a new Product rule from scratch instead of cloning it from a template Product rule.

Thanks.

I’m not sure if this is a better practice to create the Product rule on click of front end button. I would recommend to leverage Pega Deployment Manager to generate the RAP and push it to higher environments. If you’re planning to execute the activity directly by unchecking Run Authentication in activity, this could cause potential security issues.