Based on your question, the image below shows when to use each method to extract the notification info. Additionally, please refer to the new notification payload, as the old one is deprecated.