Cancellation Categories

Overview

For cancellation, it is important to choose the right type of cancellation to ensure proper document generation and downstream processing. If the number of types is large, it can be hard for an end user to select the correct type. This feature makes these cases simpler for the end user to handle.

Configuration

In the configuration for each cancellation type in cancellations.json, there is an optional cancellationCategories property, which takes a value of an array of strings. Any number of categories can be added to each type, however, if any type has one or more categories, all must have at least one category.

For example, this configuration would define four cancellation types, and three categories. Selecting customer_initiated or carrier_invoked will narrow the available types to two; selecting general will leave all four types as valid choices:

{
  "cancellationTypes": [
    {
      "name": "customer_declined",
      "title": "Customer Declined",
      "documents": [],
      "reinstatement":
      {
        "defaultDeadlineDays": 7,
        "documents": []
      },
      "cancellationCategories": [ "customer_initiated", "general" ]
    },
    {
      "name": "no_longer_needed",
      "title": "No Longer Needed",
      "documents": [],
      "reinstatement":
      {
        "defaultDeadlineDays": 14,
        "documents": []
      },
      "cancellationCategories": [ "customer_initiated", "general" ]
    },
    {
      "name": "fraudulent_application",
      "title": "Fraudulent Application",
      "documents": [],
      "reinstatement":
      {
        "defaultDeadlineDays": 0,
        "documents": []
      },
      "cancellationCategories": [ "carrier_invoked", "general" ]
    },
    {
      "name": "audit_failed",
      "title": "Audit Failed",
      "documents": [],
      "reinstatement":
      {
        "defaultDeadlineDays": 30,
        "documents": []
      },
      "cancellationCategories": [ "carrier_invoked", "general" ]
    }
  ]
}

API

When creating a Cancellation object, if categories have been defined for that product, then the cancellation must have a cancellationCategory set before it can be issued, and the name (or type) of the cancellation must have that category as one of its allowed values. If the cancellation name is not compatible with the cancellation category, issuing the cancellation will fail.

User Interface

If categories are defined for a given product, then when the user initiates cancellation, an option will be presented to choose the category. When this is selected, the list of available cancellation types will be filtered to show only those that are compatible.