Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Exporting interactions and decision results

Updated on September 15, 2022

Export interactions and decision results in real time to a file repository by using the export infrastructure that Pega Customer Decision Hub provides out of the box. You can analyze the exported interactions in business intelligence (BI) tools to gain insights, and audit exported decision results to meet contractual requirements.

Note: In the 8.7 release, Pega Customer Decision Hub continues to store interaction history in the relational database. Therefore, it is still possible to extract interaction history data from the database to files in a repository, using a manually defined export process. For more information about this earlier method, see Exporting interaction history data from the relational database.

Learn about the export feature by reviewing the following information:

Pega Customer Decision Hub

Repository

Pega Customer Decision Hub saves interactions, and optionally decision results, to a file repository that you select during application setup. If you skipped the repository selection step when running the Customer Decision Hub setup wizard, you can select the repository in the application settings.

For a Pega Customer Decision Hub application that is deployed on the premises or in a third-party cloud, you need to create your own repository. If your Pega Customer Decision Hub application is deployed in a Pega Cloud services environment, the Pega Cloud File Storage is preconfigured for you. During application setup, you can select this repository as the data export location.

The export of interactions, and optionally, decisions might increase your repository sizing requirements, depending on the configured retention period for exported files. In new systems, the default retention period is 180 days. If you need more storage space, please contact your Pega Account Executive.

Directories

Pega Customer Decision Hub creates the following directories in the repository for storing exported files:

  • repository_name/Interactions
  • repository_name/Decisions

Exported interactions

Interactions are exported into JSON files that are compressed using the gzip format. You need to extract the files before consumption. The files contain the following properties in a flattened format:

The file name format is: interaction-partition-UID-yyyymmddhhMMss_SSS.json

where:

  • partition is the partition from which the interaction or decision has been exported.
  • UID is a unique identifier of the file.
  • yyyymmddhhMMss_SSS is a date/time pattern.
For example:

interaction-5-10ebb5f9b18f71589b6c313afd05a3ee9301639734826487-20211217045215_824

The following example shows the content of a JSON file with details of an exported interaction. This interaction data is based on the default Interaction History data model without any additional properties added through extension.

{
  "pySubjectType": "CDHSample-Data-Customer",
  "pyGroupID": "",
  "ControlGroupValidityStart": "",
  "pxInteractionID": "7963812536090196336",
  "pyStage": "Awareness",
  "pyJourney": "DiscoverApplyForAMortgage",
  "CustomerID": "Customer-3964",
  "ChannelSubGroup": "",
  "pyLatitude": 0.0,
  "pyISFactID": "",
  "pyMaxBudget": "0",
  "pyChannel": "Email",
  "pyCustomerSubSegment": "",
  "pyFulfilled": "",
  "ReferrerUrl": "",
  "pyStep": "",
  "pySubjectID": "Customer-3964",
  "pyTreatment": "Home_EmailTreatment",
  "pyDirection": "Outbound",
  "pyGroup": "HomeLoans",
  "pyPropensity": 0.0,
  "BundleName": "",
  "pyOutcome": "Pending",
  "pyReason": "",
  "pyApplicationVersion": "01.01.01",
  "pyComponent": "Best Result",
  "MktType": "",
  "DeviceType": "",
  "pyOperator": "[email protected]",
  "pxRank": 1,
  "Utm_medium": "",
  "Revenue": 0.0,
  "pyPartitionKey": 0,
  "pyIssue": "Sales",
  "pyLongitude": 0.0,
  "BundleHead": false,
  "ModelControlGroup": "Test",
  "pxFactID": "0",
  "pyDivision": "Administration",
  "pyWorkID": "PR-1",
  "pyBehaviour": "Neutral",
  "MktValue": "",
  "pxOutcomeTime": "2021-12-17 04:52:15.824",
  "WorkID": "P-1",
  "URI": "",
  "Cost": 0.0,
  "pyApplication": "CDHSample",
  "pyTargetBudget": 0.0,
  "pxPriority": 0.7161618040716158,
  "pyCustomerSegment": "",
  "pyInteraction": "DF7d66f92f45c250bd2d0e18c18b680855952a4d6a",
  "ExternalAudienceId": "",
  "UserAgent": "",
  "pyName": "UFixedRateMortgage",
  "pyOrganization": "Bank A",
  "pyExternalID": "",
  "pyUnit": "Installation",
  "pxStreamPosition": "2",
  "pyResponse": "",
  "AccountID": "",
  "FinalPropensity": 0.003580809020358079,
  "pyWeight": 0.0,
  "EvaluationCriteria": "",
  "ActionContext": "Customer",
  "ControlGroupValidityEnd": "",
  "pyCategory": "Data-BatchOutPR1",
  "pyRevenue": "",
  "pxStreamPartition": "5",
  "pxDecisionTime": "2021-12-17 04:52:04.159",
  "pyLabel": "U+ Fixed Rate Mortgage",
  "IPAddress": "",
  "ChannelGroup": "",
  "pyStrategy": "BehavioralLimits",
  "pxUpdateDateTime": "2021-12-17 04:52:15.832"
}

Exported decisions

When the export of decisions is enabled, next-best-action decision results are exported into JSON files. The files are compressed using the gzip format. You need to extract the files before consumption. For auditing purposes, the exported files contain the results of all decisions made for individual customers and the associated data, regardless of the propensities calculated for each decision. The exported files only include the non-empty properties, that is those that have values. Empty properties are excluded.

The file name format is: decisions-Partition-UID-yyyymmddhhMMss_SSS.json

where:

  • partition is the partition from which the interaction or decision has been exported.
  • UID is a unique identifier of the file.
  • yyyymmddhhMMss_SSS is the date/time pattern.
For example:

decisions-5-68c639aca9555d8bf5ebe3411da03599f161e3cb765c1f16-20211218053010_425

The following example shows the content of a JSON file with details of an exported decision, which include all the properties set in the next-best-action strategy that generated this decision:

{
 "PageID": "example_account_dashboard",
 "Zip": "",
 "AdID": "12345",
 "pySubjectType": "uPlus-MKT-Data-Customer",
 "TreatmentFrequencyCap": "None",
 "pxInteractionID": "-7963812536090196336",
 "pyIsPropositionActive": "Always",
 "pyDecisionResultsTTL": "9000",
 "ApprovalStatus": "Approval Required",
 "pxDecisionReference": "0001234567 -7963812536090196336",
 "LOBRequester": "Andrea Carter",
 "user_type": "Known",
 "Placement": "Banner",
 "pxIdentifier": "/Other/Other/OfferExample",
 "pyChannel": "Web",
 "TreatmentGroup": "Other",
 "CreativeID": "12345",
 "pySubjectID": "0001234567",
 "pyTreatment": "12345",
 "pyPreviousComponent": "Set Properties",
 "pyDirection": "Inbound",
 "pyGroup": "Other",
 "TreatmentApprover": "",
 "TreatmentApprovalStatus": "Approval Required",
 "ProductType": "Other",
 "pyOutcome": "Decisioned",
 "PrimaryApprover": "UserA",
 "CellCode": "",
 "TreatmentFrequencyCapLimit": 0,
 "pyApplicationVersion": "01.01.01",
 "pyComponent": "Set Properties",
 "Experience": "all_other",
 "RulesetID": "uPlus-Artifacts",
 "pxRank": 2,
 "PageLayout": "",
 "ParentOffer": "OfferExample",
 "ProductIdentifier": "987",
 "CreativeName": "BannerExample",
 "pyIssue": "Other",
 "TagMapCode": "",
 "cid": "BannerExample123",
 "SourceCode": "",
 "pxOutcomeTime": "2021-11-30 10:00:42.923",
 "pxUpdateOpName": "Carlos Jiminez",
 "pxUpdateOperator": "OperatorA",
 "URI": "example_account_dashboard",
 "FrequencyCap": "None",
 "pyApplication": "uPlus",
 "pxSegment": "",
 "Target": "samewindow",
 "ConversionActivities": "",
 "pxPriority": -0.251302967664638,
 "TreatmentID": "/Treatment/Other/12345",
 "Workorders": "CWO-100,CWO-101,CWO-102",
 "pyInteraction": "MakeDecision_Reconciled",
 "pyName": "OfferExample",
 "BusinessOutcomeID": "200",
 "TreatmentIssue": "Treatment",
 "V1st_Cookie": "",
 "Topic": "",
 "pxStreamPosition": "222345",
 "IsDefault": true,
 "pxOriginalRank": "2",
 "ECI": "0001234567",
 "ConvertOnClick": false,
 "ProductTaxonomy": "Other-Other-Other-Other",
 "SelectedBusinessOutcome": "Product Acquisition-Open an account-New",
 "pyUserIdentifier": "OperatorA",
 "Preview_ES": "https://example.com",
 "Preview_EN": "https://example.com",
 "AdSize": "Standard Banner",
 "OfferWeight": -1.1,
 "pxStreamPartition": "1",
 "pxDecisionTime": "2021-11-30 10:00:42.923",
 "pyLabel": "Example Offer",
 "pyStrategy": "uPlus_NBA",
 "uplus_id": "",
 "pxUpdateDateTime": "2021-11-30 10:00:42.941"
}

Export data flows and data sets

Pega Customer Decision Hub uses the following data flows and data sets to export interactions and decision results:

WriteDataToInteractionFiles
A real-time data flow with the pxResponsesStream data set as the source and the InteractionFiles data set as the destination.
WriteDataToDecisionFiles
A real-time data flow with the pxDecisionStream data set as the source and the DecisionFiles data set as the destination.

The WriteDataToInteractionFiles and WriteDataToDecisionFiles real-time data flow runs create files in the repository every 300 seconds or after processing 75,000 records, according to the snapshot management settings. The condition that is satisfied first triggers file creation. If the default settings do not meet your requirements, for example, when the system creates many small files, you can modify the data flow run settings to create files at a different cadence.

Real-time data flows for exporting decisions and interactions
On the Data Flows landing page in Dev Studio, the Real-time processing tab shows the two data flows for data export.

The InteractionFiles and DecisionFiles data sets are read-only data sets that are configured as the destinations for the export data flows:

InteractionFiles data set
The Interaction Files data set is open in Dev Studio. A message indicates that it is a read-only record.
DecisionFiles data set
The Decision Files data set is open in Dev Studio. A message indicates that it is a read-only record.

Enabling export in new systems

When implementing a new Pega Customer Decision Hub application, you select the repository for exported files when you run the Pega Customer Decision Hub setup wizard. For more information, see Running the Pega Customer Decision Hub setup wizard and Introducing Pega Customer Decision Hub implementation.

If you skip that step when running the wizard, you can select the repository later in your application settings. The dynamic system setting that controls the export of interactions is enabled by default. The setting that controls the export of decisions is disabled. For more information about enabling data export in a newly deployed system, see the instructions in the Pega Customer Decision Hub Implementation Guide.

Enabling export in updated systems

In systems that have been updated from earlier versions of Pega Customer Decision Hub to the current version, the dynamic system settings that control the export of interactions and decisions are disabled by default. To start using this feature, you need to first review your system for certain deprecated strategies and segments that are not compatible with the export feature, and remove or redesign them. Next, you need to select the repository for exported files, and then enable the associated dynamic system settings. For more information, see the instructions in the following guides:

Export-related dynamic system settings

After you select a repository for exported files, you can turn the export feature on and off, as well as define how long you want to keep the exported files, by modifying the related dynamic system settings.

Setting PurposeRulesetDefault valueSetting description
decision/writeToStreamPega-DecisionEnginefalseEnables and disables the export of decisions. Starts and stops the WriteDataToDecisionFiles data flow.
interactionHistory/writeToStreamPega-DecisionEngine

true in new systems

false in updated systems

Enables and disables the export of interactions. Starts and stops the WriteDataToInteractionFiles data flow.
decision/decision_files/days_to_keep_dataPega-DecisionEngine180 daysDefines the retention period for storing exported decision results.
decision/interaction_files/days_to_keep_dataPega-DecisionEngine180 daysDefines the retention period for storing exported interactions.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us