rfmaggregatenode properties
The Recency, Frequency, Monetary (RFM) Aggregate node enables you to take customers' historical transactional data, strip away any unused data, and combine all of their remaining transaction data into a single row that lists when they last dealt with you, how many transactions they have made, and the total monetary value of those transactions.
Example
node = stream.create("rfmaggregate", "My node")
node.setPropertyValue("relative_to", "Fixed")
node.setPropertyValue("reference_date", "2007-10-12")
node.setPropertyValue("id_field", "CardID")
node.setPropertyValue("date_field", "Date")
node.setPropertyValue("value_field", "Amount")
node.setPropertyValue("only_recent_transactions", True)
node.setPropertyValue("transaction_date_after", "2000-10-01")
rfmaggregatenode properties |
Data type | Property description |
---|---|---|
relative_to
|
Fixed
Today
|
Specify the date from which the recency of transactions will be calculated. |
reference_date
|
date | Only available if Fixed is chosen in relative_to . |
contiguous
|
flag | If your data is presorted so that all records with the same ID appear together in the data stream, selecting this option speeds up processing. |
id_field
|
field | Specify the field to be used to identify the customer and their transactions. |
date_field
|
field | Specify the date field to be used to calculate recency against. |
value_field
|
field | Specify the field to be used to calculate the monetary value. |
extension
|
string | Specify a prefix or suffix for duplicate aggregated fields. |
add_as
|
Suffix
Prefix
|
Specify if the extension should be added as a suffix or a prefix. |
discard_low_value_records
|
flag | Enable use of the discard_records_below setting. |
discard_records_below
|
number | Specify a minimum value below which any transaction details are not used when calculating the
RFM totals. The units of value relate to the value field selected. |
only_recent_transactions
|
flag | Enable use of either the specify_transaction_date or
transaction_within_last settings. |
specify_transaction_date
|
flag | |
transaction_date_after
|
date | Only available if specify_transaction_date is selected. Specify the
transaction date after which records will be included in your analysis. |
transaction_within_last
|
number | Only available if transaction_within_last is selected. Specify the number
and type of periods (days, weeks, months, or years) back from the Calculate Recency relative to date
after which records will be included in your analysis. |
transaction_scale
|
Days
Weeks
Months
Years
|
Only available if transaction_within_last is selected. Specify the number
and type of periods (days, weeks, months, or years) back from the Calculate Recency relative to date
after which records will be included in your analysis. |
save_r2
|
flag | Displays the date of the second most recent transaction for each customer. |
save_r3
|
flag | Only available if save_r2 is selected. Displays the date of the third most
recent transaction for each customer. |