Happy Business Starts Here

Savvy Scholar

Preview existing subscriptions via API REST With Usage Quantity

Hi,
I need to make the subscription preview via REST API including consumption for rateplancharge of type usage.
In the knowledge center https://knowledgecenter.zuora.com/BC_Subscription_Management/Subscriptions/C_Previewing_a_Subscripti... it is written that I can preview the subscription in Active status, and in the https://www.zuora.com/developer/api -reference / # operation / POST_PreviewSubscription it is written that a parameter exists (includeExistingDraftDocItems or includeExistingDraftInvoiceItems depending on the version) to exclude from the preview the usage included in draft invoices.

I can't find the construct to insert consumption of type usage, how should I do?

Best regards

Giancarlo.

 

 

My API is the following:

VERSION 196.0
/ V1 / subscriptions / preview

{ "AccountKey": "A02909725"
  "contractEffectiveDate": "2019-04-04",
  "includeExistingDraftInvoiceItems": false,
  "invoiceTargetDate": "2019-04-04",
  "PreviewType": "InvoiceItem"
  "subscribeToRatePlans": [
    {
      "chargeOverrides": [
        {
          "productRatePlanChargeId": "{{productRatePlanChargeId for usage}}"
          
        }
      ]
      "productRatePlanId": "{{productRatePlanId}}"
    }
  ]
  "termType": "EVERGREEN"
}

RESPONSE

{
    "success": true,
    "contractedMrr": 0,
    "totalContractedValue": null
}

2 REPLIES 2
Zuora Product Team

Re: Preview existing subscriptions via API REST With Usage Quantity

@giancarlofenu, Preview Subscription is used to preview a *new* subscription only. By excluding draft invoice items, the call is just omitting existing subscriptions that may have been already billed, but not posted.

You may want to look into the Billing Preview call instead, which effectively runs a bill run for you, and will calculate usage charges for any items loaded to-date.

Lastly, please note that consumption is usually loaded after a subscription is created, because the subscriber would need to use the service first.

Can you talk a little about what you'd like to get out of previewing a subscription with consumption? As a Product Manager, I'm interested in such use cases.

Highlighted
Savvy Scholar vuh
Savvy Scholar

Re: Preview existing subscriptions via API REST With Usage Quantity

The problem with Billing Preview is that it doesn't calculate taxes. I need to see the taxes. What I need is similar to what the Zuora's UI to preview an existing subscription:

- Login to Zuora

- Select an existing subscription

- In the More pulldown, select preview

 

This action shows future invoices with taxes.

 

Which API gives me the same thing as this action?