Skip to main content

Report on notification histories

Zuora

Report on notification histories

When an email or a callout notification is triggered, Zuora generates a notification history object to store the result and related information of the notification.

This article provides guidance on how to view and resend notification histories, query notification histories through Data Source Export, Data Query, or AQuA API, and create reports based on the information from notification histories.

View notification histories

To view email or callout notification histories, perform the following steps:

  1. Navigate to Settings > Administration, Settings > Billing, Settings > Finance, or Settings > Payments.
  2. Click Setup Profiles, Notifications and Email Templates.
  3. Click the Email History or Callout History tab. The notification histories are displayed.

Resend a notification history

To resend a notification history, perform the following steps:

  1. Navigate to Settings > Administration, Settings > Billing, Settings > Finance, or Settings > Payments.
  2. Click Setup Profiles, Notifications and Email Templates.
  3. Click the Email History or Callout History tab.
  4. Locate the notification history you want to resend from the list.
  5. Click Resend.
  6. In the confirmation dialog, click Resend.

Alternatively, you can use the following operations to resend notification histories through the REST API:

When resending callout or email notifications, some information in the notification to be resent comes from the template associated with the notification definition, while other information comes from the notification history.

The following table describes where the information comes from when resending callout or email notifications:

Notification type Information from the related template Information from the notification history
Callout
  • Authentication Type
  • Username
  • Password
  • Domain
  • Enable Preemptive Authentication
  • Provider Name
All other information such as endpoint and custom callout header configurations.
Email
  • From Name
  • From Email
  • To Email
  • Reply-to Email
  • CC Email
  • BCC Email
  • Custom Email Header
All other information such as email subject and body.

Query notification histories through Data Source Export

You can create data source exports for the following data sources to query email or callout notification histories:

For more information, see Generate a data source export.

Query notification histories through Data Query

Notification histories are stored in the following tables that can be retrieved through Data Query:

  • notificationhistorycallout
  • notificationhistoryemail
  • notificationhistoryemailevent

For more information about each table, see Available tables for Data Query.

Sample queries for querying notification histories

Query for email failures

SELECT notificationId, CreatedOn, AccountId, ContactId, ObjectId, Subject, ErrorMessage
FROM notificationhistoryemail
WHERE status = 'Failed'
ORDER BY CreatedOn
DESC LIMIT 100

Query for email failures with advanced configuration

SELECT Account.AccountNumber, Account.Name, Contact.FirstName, Contact.LastName, notificationhistoryemail.Id, notificationhistoryemail.CreatedOn, notificationhistoryemail.Subject   
FROM notificationhistoryemail
JOIN account on account.id = notificationhistoryemail.AccountId
JOIN contact on contact.id = notificationhistoryemail.ContactId
WHERE notificationhistoryemail.status = 'Failed' AND CreatedOn >= DATE('2023-10-08')
LIMIT 100 

Query for callout failures

SELECT Account.AccountNumber, Account.Name, notificationhistorycallout.Id, notificationhistorycallout.CreateTime, notificationhistorycallout.ResponseCode, notificationhistorycallout.ResponseContent   
FROM notificationhistorycallout
JOIN account on account.id = notificationhistorycallout.AccountId
WHERE notificationhistorycallout.ResponseCode <> 200 
LIMIT 100

Query for callout successes

SELECT Account.AccountNumber, Account.Name, notificationhistorycallout.Id, notificationhistorycallout.CreateTime, notificationhistorycallout.ResponseCode, notificationhistorycallout.ResponseContent   
FROM notificationhistorycallout
JOIN account on account.id = notificationhistorycallout.AccountId
WHERE notificationhistorycallout.ResponseCode = 200 
LIMIT 100 

Query notification histories through AQuA API

Notification histories are stored in the following objects that can be retrieved through the AQuA API:

  • CalloutHistory
  • EmailHistory

For more information, see AQuA Post query and Data sources and objects for Export ZOQL.

Create a report using the information from notification histories

You can create a summary or detail report against the following data sources for notification histories:

  • Notification History - Callout
  • Notification History - Email

For more information, see Create a summary report and Create a detail report.