New implementation that uses parameter to create a notification or call the API