Skip to main content

Create a Product Catalog

Zuora

Create a Product Catalog

You can create and update your product catalog using SOAP API calls. Creating your product catalog consist of three basic steps:

  1. Create a product
  2. Create a product rate plan for the product
  3. Create charges for the product rate plan

This article explains how to create products, rate plans, and various charges and prices. Sample code is also provided.

Create a Product

The following fields are required to create a product:

  • Name
  • Effective start date
  • Effective end date

Sample SOAP

<ns1:create>
  <ns1:zObjects xsi:type="ns2:Product">
    <ns2:EffectiveEndDate>2014-01-01</ns2:EffectiveEndDate>
    <ns2:EffectiveStartDate>2010-01-01</ns2:EffectiveStartDate>
    <ns2:Name>My API Product</ns2:Name>
  </ns1:zObjects>
</ns1:create>

Create a Product Rate Plan

The following fields are required to create a product rate plan:

  • Name
  • Effective Date
  • Effective Start Sate
  • Product ID

The effective dates of the rate plan must be within the effective dates of the product.

Sample SOAP

<ns1:create>
 <ns1:zObjects xsi:type="ns2:ProductRatePlan">
  <ns2:EffectiveEndDate>2014-01-01</ns2:EffectiveEndDate>
  <ns2:EffectiveStartDate>2010-01-01</ns2:EffectiveStartDate>
  <ns2:Name>My rate plan</ns2:Name>
  <ns2:ProductId>zuora-product-id-from-above</ns2:ProductId>
 </ns1:zObjects>
</ns1:create>

Create a Product Rate Plan Charge with Pricing Information

The following fields are required to create a product rate plan charge with pricing information:

  • BillCycleDay: 1-31, <value for default from customer account>
  • BillingPeriod (Required for Recurring and Usage): Month, Annual, Quarter, Semi-Annual
  • BillingPeriodAlignment: Required for Usage and Recurring Charges. Values: AlignToTermStart, AlignToSubscriptionStart, AlignToCharge
  • ChargeModel: FlatFee, PerUnit, Tiered, Volume, TieredWithOverage, Overage
  • ChargeType: OneTime, Recurring, Usage
  • Name
  • ProductRatePlanChargeTierData
  • ProductRatePlanChargeTier
  • Price
  • Currency
  • TriggerEvent: CustomerAcceptance, ContractEffective, ServiceActivation

Other fields are optional or dependent on charge model and charge type

ProductRatePlanChargeTierData is a wrapper for ProductRatePlanChargeTiers, and is only applicable for the create() call. This is for convenience and allows you to create all required tiers in a single call. ProductRatePlanChargeTierData is not applicable for querying.

The following examples demonstrate how to create different types of charges, pricing models, and how to handle multiple currencies.

Example 1: Recurring, Flat Fee Charge for Single Currency

This example creates a monthly, recurring flat fee charge in a single currency.

<ns1:create>
 <ns1:zObjects xsi:type="ns2:ProductRatePlanCharge">
  <ns2:AccountingCode>TestAPI</ns2:AccountingCode>
  <ns2:BillCycleDay>1</ns2:BillCycleDay>
  <ns2:BillingPeriod>Month</ns2:BillingPeriod>
  <ns2:BillingPeriodAlignment>AlignToTermStart</ns2:BillingPeriodAlignment>
  <ns2:ChargeModel>FlatFee</ns2:ChargeModel>
  <ns2:ChargeType>Recurring</ns2:ChargeType>
  <ns2:Name>API_Recurring_FlatFee</ns2:Name>
  <ns2:ProductRatePlanChargeTierData>
   <ns1:ProductRatePlanChargeTier xsi:type="ns2:ProductRatePlanChargeTier">
    <ns2:Active>true</ns2:Active>
    <ns2:Currency>USD</ns2:Currency>     
    <ns2:Price>50</ns2:Price>
   </ns1:ProductRatePlanChargeTier>
  </ns2:ProductRatePlanChargeTierData>        
  <ns2:ProductRatePlanId>zuora-productrateplan-id-from-above</ns2:ProductRatePlanId>
  <ns2:TriggerEvent>ContractEffective</ns2:TriggerEvent>
 </ns1:zObjects>
</ns1:create>

Example 2: Usage Charge, Tiered with Overage Model, Multiple Currencies

This example creates a usage-based that has multiple price tiers for multiple currencies.

Starting and ending units must be the same for different currencies. The different currencies must be enabled from Z-Billing Settings in the Zuora application.

<ns1:create>
 <ns1:zObjects xsi:type="ns2:ProductRatePlanCharge">
  <ns2:AccountingCode>TestAPI</ns2:AccountingCode>
  <ns2:BillCycleDay>1</ns2:BillCycleDay>
  <ns2:BillingPeriod>Annual</ns2:BillingPeriod>
  <ns2:BillingPeriodAlignment>AlignToTermStart</ns2:BillingPeriodAlignment>
  <ns2:ChargeModel>TieredWithOverage</ns2:ChargeModel>
  <ns2:ChargeType>Usage</ns2:ChargeType>
  <ns2:DefaultQuantity>10</ns2:DefaultQuantity>
  <ns2:Name>API_Usage_TieredWithOverage</ns2:Name>
  <ns2:ProductRatePlanChargeTierData>
   <ns1:ProductRatePlanChargeTier xsi:type="ns2:ProductRatePlanChargeTier">
    <ns2:Active>true</ns2:Active>
    <ns2:Currency>USD</ns2:Currency>     
    <ns2:EndingUnit>20</ns2:EndingUnit>
    <ns2:Price>100</ns2:Price>
    <ns2:StartingUnit>0</ns2:StartingUnit>
   </ns1:ProductRatePlanChargeTier>
   <ns1:ProductRatePlanChargeTier xsi:type="ns2:ProductRatePlanChargeTier">
    <ns2:Active>true</ns2:Active>
    <ns2:Currency>USD</ns2:Currency>
    <ns2:EndingUnit>3000</ns2:EndingUnit>
    <ns2:Price>90</ns2:Price>
    <ns2:StartingUnit>21</ns2:StartingUnit>
   </ns1:ProductRatePlanChargeTier>
   <ns1:ProductRatePlanChargeTier xsi:type="ns2:ProductRatePlanChargeTier">
    <ns2:Active>true</ns2:Active>
    <ns2:Currency>EUR</ns2:Currency>
    <ns2:EndingUnit>20</ns2:EndingUnit>
    <ns2:Price>85</ns2:Price>
    <ns2:StartingUnit>0</ns2:StartingUnit>
   </ns1:ProductRatePlanChargeTier>
   <ns1:ProductRatePlanChargeTier xsi:type="ns2:ProductRatePlanChargeTier">
    <ns2:Active>true</ns2:Active>
    <ns2:Currency>EUR</ns2:Currency>
    <ns2:EndingUnit>3000</ns2:EndingUnit>
    <ns2:Price>80</ns2:Price>
    <ns2:StartingUnit>21</ns2:StartingUnit>
   </ns1:ProductRatePlanChargeTier>
  </ns2:ProductRatePlanChargeTierData>        
  <ns2:ProductRatePlanId>zuora-productrateplan-id-from-above</ns2:ProductRatePlanId>
  <ns2:TriggerEvent>ContractEffective</ns2:TriggerEvent>
  <ns2:UOM>Each</ns2:UOM>
 </ns1:zObjects>
</ns1:create>

Note that you can create a ProductRatePlanChargeTier only as part of a ProductRatePlanCharge.