Posted: 14 Jan 2019 12:06 EST Last activity: 14 Jan 2019 15:23 EST
Use existing products in the DB as Proposition Data
We have a table in the database with Products that we would like to offer to the customers when using Decision Strategies. Therefore we would like to use these Products as Propositions. How can we map, the Proposition Data to use the Products existing in this DB table?
We were checking how the Propositions are structured in the DB. The pattern of the class where the Propositions are is like <Enterprise>-<Application>-SR-<BusinessIssue>-<Group>, for example MyCo-MyApp-SR-Sales-Phones. All these Proposition classes are mapped to the DB table "pegadata.pr_dm_proposition". After creating some Propositions, we expected that this table would contain them, however, the table is empty even though there are several Propositions in the system. So, where are the Propositions stored in the DB?
Depends exactly on your requirements but it look like you are after a one off capability to export and use those propositions from the table. If this is the case I would recommend importing those propositions via a CSV using the import capability available within the proposition group decision data rule (versioned propositions). To do this you will have needed to create the issue and group hierarchy plus the proposition properties you require.
Note, unversioned propositions are legacy and should be avoided.
If the requirement is for example to manage the proposition in an external system, there are more sophisticated approaches available and we have a pxManageProposition utility which will do Manage, Create, Update and Delete and possibly others (open?). This can be used to create propositions dynamically. You would need to develop a service to use this API which can be called by the external system holding the propositions to create in Pega.
The data is stored in internal rule meta data and you should not try to reverse engineer or manage it yourself from a database. As the previous responder indicates, you should import it via CSV or clarify your use case so the best solution for your needs can be identified.
Also, in your original post you seem to be suggesting that there is a one to one mapping between propositions and products. This is often not the case. Normally you have many offers/propositions for a given product. The business/marketing will have many different ways to communicate a product to different audiences and as such you should be careful about modeling products and propositions in a one to one manner.