Files

2.4 KiB

lead-interests Specification

Purpose

Admins with the Interests module maintain the list of products and services that leads are tagged with.

Requirements

Requirement: Interest list

The system SHALL keep one interest list shared by all companies. Admins with BO_INTERESTS SHALL see the list, and only a super admin SHALL add, rename, reorder, deactivate, reactivate and delete interests. An interest name SHALL be required, at most 100 characters, and unique ignoring case, including against deleted interests. Deactivating SHALL ask for confirmation.

Scenario: Add interest

  • WHEN a super admin adds Kitchen appliances
  • THEN it is listed as active
  • AND staff of every company can tag leads with it

Scenario: Duplicate name

  • GIVEN an interest Kitchen appliances
  • WHEN a super admin adds kitchen APPLIANCES
  • THEN the save is refused and the name is reported as a duplicate

Scenario: Deactivate

  • GIVEN an active interest Cookware
  • WHEN a super admin deactivates it and confirms
  • THEN it is still listed, marked inactive
  • AND it is no longer offered when capturing a lead in any company

Scenario: Cancel deactivate

  • WHEN a super admin chooses Deactivate on Cookware and then Cancel
  • THEN Cookware stays active

Scenario: Company user edits

  • WHEN an INS user with BO_INTERESTS adds, renames, deactivates or deletes an interest
  • THEN the request is refused with 403 and the list is unchanged

Scenario: No module

  • WHEN an admin without BO_INTERESTS opens the Interests page or calls an interests endpoint
  • THEN the page shows not-authorised and the endpoint responds 403

Requirement: Interest deletion

A super admin SHALL be able to delete an interest after confirming. Deleting SHALL be soft: a deleted interest SHALL disappear from the list, the capture forms and the filters, while leads already tagged with it SHALL keep showing its name.

Scenario: Delete

  • GIVEN an interest Cookware that two leads are tagged with
  • WHEN a super admin deletes it and confirms
  • THEN it is no longer listed or offered anywhere
  • AND the two leads still show Cookware

Scenario: Name of a deleted interest

  • GIVEN Cookware was deleted
  • WHEN a super admin adds Cookware
  • THEN the save is refused with a message that the name belongs to a deleted interest