This notebook will help us understand the movement of our users across the RFM segments between 2 different time periods. 

This notebook can be used for brands where RFM segment cuts are already defined. The cuts for R, F & M will need to be defined at the top of the notebook. 

Input parameters

You need to provide the following details before running the Notebook.

Input ParamDescription
org_idEnter the org_id of the brand for which RFM needs to be done.
Previous Start DateEnter the start date of the first time period.
Previous End DateEnter the end date of the first time period.
Number of SegmentsEnter the number of RFM segments that you have for your brand.
Recency CutsEnter comma-separated recency cuts in descending order. Append an additional zero at the end.
Frequency CutsEnter comma-separated frequency cuts in ascending order. Append an additional zero at the beginning.
Monetary CutsEnter comma-separated monetary cuts in ascending order. Append an additional zero at the beginning.
Overall Score CutsEnter comma-separated values of the overall score where you want to segment the users.
RFM LabelsEnter comma-separated values of the labels that you want to give to your segments. These names should be in the same order as Overall Score Cuts.
Current Start DateEnter the start date of the second time period.
Current End DataEnter the end date of the second time period.

Examples

For a number of segments 3,

  1. Recency cuts: 500,250,0
    where 0: >= 500
    1: between 251 - 500
    2: between 0 - 250
  2. Frequency Cuts: 0,1,5
    where 0: between 0 and 1

    1: between 1 and 5

    2: >=5

  3. Monetary Cuts: 0,500,1200

    where 0: between 0 and 500

    1: between 501 and 1200

    2: >= 1200

For overall cuts: 0,3,5 & RFM Labels: Base, Mid, Top

0: Base - Users with an overall scores between 0 and 3 will be tagged as Base.

3: Mid - Users with an overall scores between 3 and 5 will be tagged as Mid.

5: Top - Users with an overall score >= 5 will be tagged as Top.

Output

  • Download cmd 26 for user ids and segment information of the users.
    The output will only have users who are present in both time periods.
  • Cmd 27 has the final output showing the movement of the users across the RFM segments using defined cuts provided by the user.

Notebook Links

NotebookCluster links
Movement of Users Across RFM Segments using defined cutsIndia, SEA, EMEA