wiki:UseCase009

UseCase009 - Modification of a Product

Initiating actor: Logged-In Admin

The goal of this use case is to allow an administrator to update the details of an existing physical product in the inventory. This ensures that information such as current pricing, stock availability, and format descriptions remain accurate, reflecting real-time changes in the store's supply and business requirements.

Scenario

  1. Admin selects an existing Product from the inventory management interface that requires an update.
  1. System retrieves the current data for the Product, including price, stock, description, and format.
SELECT product_id, format, price, stock, product_description, release_id
FROM PRODUCTS
WHERE product_id = :selected_product_id;
  1. Admin enters the new values for the attributes that need to be modified.
  1. System validates the updated information to ensure it adheres to the required data formats (e.g., non-negative values for price and stock).
  1. System updates the corresponding record in the Product table with the new data.
UPDATE PRODUCTS
SET 
    price = :new_price,
    stock = :new_stock,
    product_description = :new_description,
    format = :new_format
WHERE product_id = :selected_product_id;
  1. System logs the modification
INSERT INTO MODIFICATIONS (modification_id, admin_id, date_modified, type_of_modification, discount)
VALUES (:new_modification_id, :authenticated_admin_id, CURRENT_DATE, 'UPDATE', NULL);

INSERT INTO MODIFICATION_PRODUCTS (modification_id, product_id)
VALUES (:new_modification_id, :selected_product_id);
  1. System confirms the successful modification to the admin and updates the product information across the public catalog immediately.
SELECT * FROM PRODUCTS 
WHERE product_id = :selected_product_id;
Last modified 6 days ago Last modified on 05/21/26 18:31:25
Note: See TracWiki for help on using the wiki.