Do you have a requirement to create the product rule dynamically or to deploy the product rule in some other environment once the Product rule is created?
Not sure if we have an option to dynamically create the product rule but we do have option do trigger a jenkins pipeline when product rule is created. Please look into the suggestion made in the below link:
The primary goal is to automate the deployment process. When we merge a branch into a ruleset version, we want to create a product rule including that ruleset version and then deploy to other environments using jenkins.
We have completed the part where we need to trigger jenkins after merging. But I have no idea about creating the product rule having the ruleset in which we merged the branch.
we can auto trigger deployment pipeline when a branch is merged, by using Pega deployment manager. Create a product rule to package the entire application which will be used by deployment manager to create a archive file after the branch merge.
No, Product rule cannot be created dynamically. Developer need to create the required product and review it before deployment. PRPCUtils command line utility also helps somewhat to package the product, but not completely. Deployment Manager has no automation of creating product rule dynamically.