Configuring an Event Strategy
U+ Comms, a large telco, did some analysis and found that customers who experience three or more dropped calls in a week are more likely to switch to a competitor. If the company can detect this pattern in real-time, it can take a proactive step to prevent the customer from leaving the company.
Video
Transcript
In this demo, you will learn how to create an event strategy that looks for a pattern in a stream of events and emits an output when the pattern is detected. The pattern is a mobile phone experiencing three or more dropped calls in the last seven days.
Start by creating a new event strategy. In the Apply to field, enter the name of the class that represents the data model of the events. In this case, it is the class that represents the customer call detail records.
Real-time data is the starting component in every event strategy.
You can view the list of properties in the Apply to class here.
Event key is the property that you use to make aggregations. In the Event key field, you count the number of dropped calls for each phone number.
Event timestamp is the date and time at which the event occurred. When it's set to System time, the event timestamp is taken from the date and time of the system when the event is processed.
If the event contains a date-time field that you would like to use as the event timestamp, select the Event time radio button. Then, select a property from the input data that contains this information. Date format is not needed if the property is of type Date Time. These are the properties for the phone call details.
Time Of Call is the time when the call started. Call Detail Record ID is a unique identifier for each call that took place. Duration is the duration of the call. Completion Status shows if the call was completed successfully or was dropped.
Now, start building the event strategy.
From the entire list of call information, you are interested in the calls from the last seven days, so create a sliding window of seven days.
From the call information of the last seven days, select only the dropped calls by using a filter component.
Now that you have the dropped calls from the last seven days, count the number of dropped calls for every phone number using an aggregator component.
You have created a local variable in the event strategy called DroppedCallCount, which can be used in any subsequent components.
Now that you have the count of dropped calls in the last seven days for each phone number, you want the strategy to emit an output only if there are three or more dropped calls.
Note that 'greater than or equal to three' means that for any dropped call that occurs after the third one in the last seven days, the strategy emits an output.
If you set it equal to three, then any dropped call that occurs after the third one in the same window of time is ignored. When the window resets, the counting starts all over again. In this example, the window resets when a new day begins.
Finally, ensure that an output is emitted immediately when the pattern is detected. In the Emit event list, select As it happens to emit immediately, rather than once, during a specified time interval.
You have reached the end of this video. You have learned:
- How to create and configure an event strategy that emits an output if it detects a specified pattern in a stream of events.
This Topic is available in the following Modules:
Want to help us improve this content?