Split out changed_inventory_status into separate function