Skip to main content

PreviewOptions

Zuora

PreviewOptions

Use the PreviewOptions object with the amend() and subscribe() calls to specify whether the call should return an actual subscription or amendment, or a preview of what the subscription or amendment would be if activated. This is useful when you want to see what charges would be for a customer considering an order (such as a new order, upgrade/downgrade, adding a product, or adding additional units). You can also use this to debug during implementations or when writing new business logic with the Z-Commerce API.

Supported Calls

Fields

All field names are case sensitive.

Name Required? Type Allowable Values Description
EnablePreviewMode No Boolean True or False Specifies whether the call should create a subscription/amendment, or whether it should return a preview of the order. Used with either NumberOfPeriods or PreviewThroughTermEnd.
NumberOfPeriods No Integer Positive integer greater than 0

Specifies the number of periods to show in a preview.

Usage Notes:

  • EnablePreviewMode=true must be set.

  • This option cannot be used in combination with PreviewThroughTermEnd.

  • If an InvoiceTargetDate is specified in the InvoiceProcessingOptions, then this value will be ignored and the preview will run through the InvoiceTargetDate.

PreviewThroughTermEnd No Boolean True or False

Requests to preview the charge through the end of the subscription term. This option is valid for termed subscriptions only, not Evergreen subscriptions. 

Usage Notes:

EnablePreviewMode=true must be set.

  • This option is valid for Termed subscriptions only, not Evergreen subscriptions.

  • This option cannot be used in combination with NumberofPeriods.

  • If an InvoiceTargetDate is specified in the InvoiceProcessingOptions, then this value will be ignored and the preview will run through the InvoiceTargetDate.

  • WSDL version: 51.0
PreviewType No String

InvoiceItem

ChargeMetrics

InvoiceItemChargeMetrics

The type of preview you will receive from a preview request.

Usage Notes:

  • InvoiceItem is the default. A preview request will return an invoice item preview.
  • A ChargeMetrics request will return a charge metrics preview
  • An InvoiceItemChargeMetrics request will return an invoice item and charge metrics of that item.
IncludeExistingDraftInvoiceItems No Boolean true or false

Specifies whether to include draft invoice items in amendment previews.

Values

  • true (default). Includes draft invoice items in amendment previews. 
  • false. Excludes draft invoice items in amendment previews.

Usage Notes: This field is only applicable if the EnablePreviewMode field is set to true