BNPL | Rule based freeze Penalties operations.

  • Freeze Penalties if daysPastDue(dpd) is greater than 91 days.

  • Unfreeze Penalties if the dpd equals to 0.

 

Find below the Migration script and changes need to be done in the database tables.

  1. Insert into f_account_arrears_config.

    INSERT INTO `f_account_arrears_config` (`id`, `grace_on_arrears_days`, `version`, `arrear_actions_config`) VALUES (1, 0, 1, '{\n\"penaltiesFreezeTypeRule\": \"PenaltiesFreezeTypeRule\"\n}');

     

  2. In f_product_config_mapping, update arrears_config_id values to 1.

  3. Insert into f_risk_rule.

    INSERT INTO `f_risk_rule` (`entity_type`, `name`, `uname`, `description`, `default_value`, `value_type`, `possible_outputs`, `expression`, `is_active`, `version`, `definition_type`, `created_on`, `status`) VALUES (4, 'PenaltiesFreezeTypeRule', 'PenaltiesFreezeTypeRule', 'Penalties Freeze Type Rule', NULL, 0, '[]', '{\n \"inputs\": [\n \"daysPastDue\"\n ],\n \"outputs\": {\n \"operation\": \"STRING\"\n },\n \"outputProvider\": \"BUCKET\",\n \"outputBuckets\": [\n {\n \"label\": \"Freeze if DPD is more than 91 days \",\n \"expressions\": [\n \"#daysPastDue>91 \"\n ],\n \"output\": {\n \"operation\": \"FREEZE_PENALTIES\"\n }\n },\n \n \n {\n \"label\": \"UnFreeze if DPD is equal to 0 days\",\n \"expressions\": [\n \"#daysPastDue==0\"\n ],\n \"output\": {\n \"operation\": \"UNFREEZE_PENALTIES\"\n }\n },\n\n {\n \"label\": \"Default\",\n \"expressions\": [\n \"true\"\n ],\n \"output\": {\n \"operation\": \"NONE\"\n }\n }\n ]\n}', 1, 1, 2, NULL, NULL);