Notifications

Update a notification definition

Updates a notification definition.

put/notifications/notification-definitions/{id}

Path parameters

idstring uuid required

The ID of the notification definition to be updated.

Headers

Accept-Encodingstring

Include the Accept-Encoding: gzip header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response.

If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a Content-Encoding header with the compression algorithm so that your client can decompress it.

Content-Encodingstring

Include the Content-Encoding: gzip header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload.

Zuora-Track-Idstring

A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue.

The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (:), semicolon (;), double quote ("), and quote (').

Zuora-Entity-Idsstring

An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you should not set this header.

Zuora-Org-Idsstring

Comma separated IDs. If you have <a href="https://docs.zuora.com/en/zuora-platform/organization-and-entity-management/multi-org/overview-of-multi-org" target="_blank">Zuora Multi-Org</a> enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header.

The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. This header is important in Multi-Org (MO) setups because it defines the organization context under which the API should operate—mainly used for read access or data visibility filtering. If the header is not set, the operation is performed in scope of the user's accessible orgs.

Request body

activeboolean

The status of the notification definition. The default value is true.

associatedAccountstring

The account on which the histories of this notification will be displayed. The associated account does not enforce where the merge fields come from. Available values are as follows:

  • Account.Id: ID of the primary customer account related to the notification. It is also the default value.
  • ParentAccount.Id: this option is available only if you have <a href="https://docs.zuora.com?resourceId=billing-overview-customer-accounts" target="_blank">Customer Hierarchy</a> enabled for your tenant.
  • SubscriptionOwnerAccount.Id: this option is available if the base object of the notification is Order Action.

Note: before specifying this field, we recommend that you use Data Source to check the available types of accounts for the current notification.

calloutActiveboolean

The status of the callout action. The default value is false.

calloutTemplateIdsstring[]

List of callout template IDs that the notification definition is associated with.

You cannot specify the calloutTemplateIds and callout fields at the same time.

For more information about callout templates, see <a href="https://docs.zuora.com?resourceId=platform-callout-template-overview" target="_blank">Manage callout templates</a>.

communicationProfileIdstring uuid

The profile that notification definition belongs to.

If you want to associate the notification definition with multiple communication profiles, use the communicationProfileIds field, which overrides this field.

communicationProfileIdsstring[]

List of communication profile IDs that the notification definition is associated with.

This field overrides the communicationProfileId field.

descriptionstring

The description of the notification definition.

emailActiveboolean

The status of the email action. The default value is false.

emailTemplateIdstring uuid

The ID of the email template. If emailActive is updated from false to true, an email template is required, and the EventType of the email template MUST be the same as the EventType of the notification definition.

filterRuleParamsFilterRuleParameterValues

The parameter values used to configure the filter rule.

namestring

The name of the notification definition, which is unique in the profile.

Example request

{
  "description": "Details of the notification definition"
}

Response

OK

activeboolean

The status of the notification definition. The default value is true.

associatedAccountstring nullable

The account on which the histories of this notification will be displayed. The associated account does not enforce where the merge fields come from.

calloutActiveboolean

The status of the callout action. The default value is false.

calloutTemplateIdsstring[]

List of callout template IDs that the notification definition is associated with.

communicationProfileIdstring uuid

The ID of the communication profile that the notification definition is associated with.

If the notification definition is associated with multiple communication profiles, see communicationProfileIds for all associated communication profile IDs.

communicationProfileIdsstring[]

List of communication profile IDs that the notification definition is associated with.

createdBystring uuid

The ID of the user who created the notification definition.

createdOnstring

The time when the notification definition was created. Specified in the UTC timezone in the ISO860 format (YYYY-MM-DDThh:mm:ss.sTZD). E.g. 1997-07-16T19:20:30.45+00:00

descriptionstring nullable

Description of the notification definition

emailActiveboolean

The status of the email action. The default value is false.

emailTemplateIdstring uuid

The ID of the email template. In the request, there should be at least one email template or callout.

eventCategorynumber

The event category code for a standard event, on which the notification definition is created.

This field is available only if the notification definition is based on a standard event.

For the list of supported standard event category codes, see <a href="https://docs.zuora.com?resourceId=platform-parent-and-event-category-code" target="_blank">Standard event category code for events and notifications</a>.

eventIdstring uuid

The ID of the event that the notification definition is based on.

This field is available only if the notification definition is based on a standard event.

eventTypeNamestring

The name of the event that the notification definition is based on.

This field is available only if the notification definition is based on a Zuora custom event, custom event, or custom scheduled event.

eventTypeNamespace'user.notification' | 'com.zuora.notification'

The namespace of the eventTypeName field. It indicates who created the event and which namespace the event is assigned to.

Supported values are as follows:

  • com.zuora.notification: events that are created by Zuora. This value applies to Zuora custom events.
  • user.notification: events that are created by tenant users. This value applies to custom events and custom scheduled events.

This field is available only if the notification definition is based on a Zuora custom event, custom event, or custom scheduled event.

filterRuleParamsFilterRuleParameterValues

The parameter values used to configure the filter rule.

idstring uuid

The ID associated with this notification definition.

namestring

The name of the notification definition.

updatedBystring uuid

The ID of the user who updated the notification definition.

updatedOnstring

The time when the notification was updated. Specified in the UTC timezone in the ISO860 format (YYYY-MM-DDThh:mm:ss.sTZD). E.g. 1997-07-16T19:20:30.45+00:00

Example response

{
  "id": "838bfafa9b224408809f8ecbdae198ef",
  "createdBy": "8ad084a67f9c7138017fab8a8b511b5a",
  "createdOn": "2024-11-11T03:00:03.000 UTC",
  "updatedBy": "8ad084a67f9c7138017fab8a8b511b5a",
  "updatedOn": "2024-11-11T03:00:03.000 UTC",
  "eventTypeNamespace": "user.notification",
  "eventTypeName": "AccountEdit",
  "name": "Account Edit Notification",
  "description": null,
  "communicationProfileId": "2c92c0f9446cd49501447539d6a72815",
  "communicationProfileIds": [
    "2c92c0f9446cd49501447539d6a72815"
  ],
  "active": true,
  "emailTemplateId": "f11e498862584a10a05b83ea70119659",
  "callout": null,
  "calloutTemplateIds": [],
  "filterRule": {
    "id": "a1efc8cc717e48208b9f0fd5d7bf2a58",
    "createdBy": "8ad084a67f9c7138017fab8a8b511b5a",
    "createdOn": "2024-11-11T03:00:04.000 UTC",
    "updatedBy": null,
    "updatedOn": null,
    "description": "Filter rule to test if an account is a VIP account",
    "condition": "Account.Balance >= _VIP_BALANCE_AMOUNT && Account.Status == _ACCOUNT_STATUS",
    "parameters": {
      "_ACCOUNT_STATUS": {
        "displayName": "VIP Account Status",
        "description": "The status of the VIP Account",
        "options": [
          "Draft",
          "Active",
          "Canceled"
        ],
        "valueType": "STRING"
      },
      "_VIP_BALANCE_AMOUNT": {
        "displayName": "VIP Account Balance",
        "description": "The minimum account balance",
        "options": null,
        "valueType": "BIG_DECIMAL"
      }
    },
    "scheduled": false
  },
  "filterRuleParams": {
    "_ACCOUNT_STATUS": "Active",
    "_VIP_BALANCE_AMOUNT": "100000.0"
  },
  "emailActive": true,
  "calloutActive": false,
  "associatedAccount": null
}

Changes