Stale cancellation data, a null scorecard input, and a failing when rule at Contoso Retail
Contoso Retail's Pega CDH installation uses a daily data flow to populate the customer profile from a file data set. The strategy RetentionOffers first filters customers with a decision tree, then scores the remaining customers with a scorecard, then uses a when rule to select a proposition. Analysts report three symptoms. First, customers who cancelled yesterday still receive retention offers. Second, the scorecard returns a blank score for customers whose tenure property is null. Third, the strategy sometimes returns no propositions even though eligible actions exist. The data flow is scheduled at 02:00 and completes at 04:15. The cancellation feed lands at 01:30, but it is loaded from a file that is refreshed only weekly. The when rule compares a decimal property to a string constant. No one has changed the strategy in six months.
1. For each of the three symptoms, identify the most likely root cause and the first diagnostic you would run.
Read the worked answer
First symptom: the data flow runs daily but reads a file data set refreshed weekly, so the cancellation feed is stale. Check the source file timestamp and the data flow run history, then open the Profile Viewer for a recently cancelled customer. Fix the source refresh or replace it with a real-time data flow; rescheduling the data flow alone will not help. Second symptom: the scorecard receives a null tenure and returns a blank score rather than a default. Run a strategy test with a null-tenure customer and inspect the scorecard input mapping and score output. Add a default, a null branch, or filter before the scorecard. Third symptom: the when rule compares a decimal property to a string constant, which can produce a type mismatch or a false result, and the decision tree may also be filtering. Trace the strategy for a customer with eligible actions, inspect the when rule condition types, and replace the string constant with a numeric one. Also confirm the strategy is not running before the 04:15 data flow completion.
2. What is the difference between a data flow and a data set here, and why does that distinction matter for the fix?
Read the worked answer
A data flow is the definition of how data moves and is transformed; a data set is the source or target, such as a file, database table, or stream. The data flow schedule controls when the flow runs, not when the underlying file is refreshed. That distinction matters because the symptom looks like a scheduling problem but the root cause is at the data set or source. The customer profile is assembled from data sets, and the strategy reads the profile; if the data set is stale, every downstream component sees stale values. The fix belongs at the source refresh, or in a new real-time data flow for cancellations, plus a check that profile assembly has completed before the strategy runs. Changing the decision tree or scorecard would not correct stale input data.