Exporting interactions and decision results
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.
Learn about the export feature by reviewing the following information:
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:
- Default properties defined in the Interaction History data model.
- Any additional properties that you added by extending the Interaction History data model.
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.
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.
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.
The InteractionFiles and DecisionFiles data sets are read-only data sets that are configured as the destinations for the export data flows:
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 Purpose | Ruleset | Default value | Setting description |
decision/writeToStream | Pega-DecisionEngine | false | Enables and disables the export of decisions. Starts and stops the WriteDataToDecisionFiles data flow. |
interactionHistory/writeToStream | Pega-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_data | Pega-DecisionEngine | 180 days | Defines the retention period for storing exported decision results. |
decision/interaction_files/days_to_keep_data | Pega-DecisionEngine | 180 days | Defines the retention period for storing exported interactions. |
Previous topic Extending Interaction History Next topic Pega Customer Decision Hub dynamic system settings