Question
How to add a custom record to Interaction History?
Hello pega community!
I want to add my own custom records to database table - PRPC.PR_DATA_IH_FACT, and also to PRPC.PR_DATA_IH_DIM_[tablename] tables.
Not with SQL or database client. But with using Pega and Pega Marketing application.
Is there any API to do this job?
What data transforms of activities does pega engine use to add/save interaction history?
And how to generate keys/IDs for new IH records?
Thanks
***Edited by Moderator Marissa to update platform capability tags****
Hi,
One clarity on the requirement : Is it for custom record (additional row) - or you need an additional column in the IH ?
If it is additional row and you are using Pega Marketing offer flows - you can use the "UpdateStatus" shape. Not sure where you need this extension. You can also use the pxInteractionHistory (data-set) to insert records to it, if you are in higher version post PM 7.x
If your requirement is to add additional column, then read the following or you can skip this:
Depending upon your Pega Marketing version, the steps will be slightly different for this. But, all the versions supported this one way or the other.
Basically in the high level, you need to add the properties in the dimension or the fact classes, add those columns in the respective IH tables and update couple of data transforms / rules to configure the properties that need to be written.
Also you need to see which table is appropriate for this - For example given the star schema of IH, fact tables could be extended if the data is "Interaction specific" for example an IP address of the user. Or dimension table would be more appropriate for data that is NOT transaction specific and common for many transactions - like an offer name or channel name.
Doing the wrong extension might result in performance issues. For example you don't want to record ip addresses in the dimension table.
Please work with Pega support (by raising an SR) to get the right level of details for your extension.