Updating the Product Catalog

From API Documentation

Jump to: navigation, search

You can update all aspects of the product catalog, including:

  • Products
  • ProductRatePlan
  • ProductRatePlanCharge
  • ProductRatePlanChargeTier
Note: As of version 26.0+, you can update ProductRatePlanCharge and ProductRatePlanChargeTier objects, giving you full programmatic control of the product catalog.

Contents

Updating Products

The following fields can be updated for Products:

  • Name
  • SKU
  • Effective End Date
  • Effective Start Date
  • Description
  • Custom Fields

Sample SOAP

<ns1:update>
 <ns1:zObjects xsi:type="ns2:Product">
   <ns2:Id>4028e6992601720d01261a5d351c1955</ns2:Id>
   <ns2:EffectiveEndDate>2013-01-31T00:00:00</ns2:EffectiveEndDate>
   <ns2:EffectiveStartDate>2009-11-01T00:00:00</ns2:EffectiveStartDate>
   <ns2:Name>Cloud Store Storage 2</ns2:Name>
   <ns2:SKU>SKU-45000040</ns2:SKU> </ns1:zObjects>
 </ns1:zObjects>
</ns1:update>

Updating ProductRatePlans

The following fields can be updated for ProductRatePlans:

  • Name
  • Effective Start Date
  • Effective End Date
  •  Custom FIelds
Sample SOAP
<ns1:update>
 <ns1:zObjects xsi:type="ns2:ProductRatePlan">
   <ns2:Id>4028e6992601720d01261a5de7851957</ns2:Id>
   <ns2:EffectiveEndDate>2011-01-31T00:00:00</ns2:EffectiveEndDate>
   <ns2:EffectiveStartDate>2009-12-01T00:00:00</ns2:EffectiveStartDate>
   <ns2:Name> Silver Monthly Plan</ns2:Name>
   <ns2:ProductId>4028e6992601720d01261a5d351c1955</ns2:ProductId>
 </ns1:zObjects>
</ns1:update>

Updating ProductRatePlanCharges and ProductRatePlanChargeTiers

Note that you cannot update a charge type.  For example, you cannot change a recurring charge to a one-time or usage charge.

The following fields can always be updated:

  • AccountingCode
  • BillCycleDay
  • BillingPeriod
  • BillingPeriodAlignment
  • Description
  • Name
  • RevRecCode
  • RevRecTriggerCondition
  • Taxable
  • TaxCode

Sample SOAP:

<ns1:update>
  <ns1:zObjects xsi:type="ns2:ProductRatePlanCharge">
    <ns2:Id>4028e6991e6a5727011e74818e1105ab</ns2:Id>
    <ns2:BillCycleDay>DefaultFromCustomerAccount</ns2:BillCycleDay>
  </ns1:zObjects>
</ns1:update>

Updating Charge Models

If you update the charge model, you must:

  • Specify all fields for the new charge model
  • Replace the entire set of ProductRatePlanChargeTier objects (ie, the "price table").  To ensure a consistent price table, you must update the entire set of ProductRatePlanChargeTiers at one time.  To do this, use the ProductRatePlanChargeTierData wrapper object insde the ProductRatePlanCharge object.

Sample SOAP

<ns1:update>
 <ns1:zObjects xsi:type="ns2:ProductRatePlanCharge">
   <ns2:Id>4028e6992601720d01261a695edb1a83</ns2:Id>
   <ns2:BillingPeriod>Month</ns2:BillingPeriod>
   <ns2:BillingPeriodAlignment>AlignToCharge</ns2:BillingPeriodAlignment>
   <ns2:ChargeModel>Volume</ns2:ChargeModel>
   <ns2:Name>Monthly Charge</ns2:Name>
   <ns2:ProductRatePlanChargeTierData>
      <ns1:ProductRatePlanChargeTier xsi:type="ns2:ProductRatePlanChargeTier">
         <ns2:Active>true</ns2:Active>
         <ns2:Currency>USD</ns2:Currency>
         <ns2:EndingUnit>10</ns2:EndingUnit>
         <ns2:Price>100.2222</ns2:Price>
         <ns2:PriceFormat>PerUnit</ns2:PriceFormat>
         <ns2:StartingUnit>1</ns2:StartingUnit>
      </ns1:ProductRatePlanChargeTier>
      <ns1:ProductRatePlanChargeTier xsi:type="ns2:ProductRatePlanChargeTier">
         <ns2:Active>true</ns2:Active>
         <ns2:Currency>USD</ns2:Currency>
         <ns2:EndingUnit>30</ns2:EndingUnit>
         <ns2:Price>200.222</ns2:Price>
         <ns2:PriceFormat>PerUnit</ns2:PriceFormat>
         <ns2:StartingUnit>21</ns2:StartingUnit>
      </ns1:ProductRatePlanChargeTier>
      <ns1:ProductRatePlanChargeTier xsi:type="ns2:ProductRatePlanChargeTier">
         <ns2:Active>true</ns2:Active>
         <ns2:Currency>USD</ns2:Currency>
         <ns2:EndingUnit>40</ns2:EndingUnit>
         <ns2:Price>300.22</ns2:Price>
         <ns2:PriceFormat>PerUnit</ns2:PriceFormat>
         <ns2:StartingUnit>31</ns2:StartingUnit>
      </ns1:ProductRatePlanChargeTier>
      <ns1:ProductRatePlanChargeTier xsi:type="ns2:ProductRatePlanChargeTier">
         <ns2:Active>true</ns2:Active>
         <ns2:Currency>USD</ns2:Currency>
         <ns2:EndingUnit>50</ns2:EndingUnit>
         <ns2:Price>400.22</ns2:Price>
         <ns2:PriceFormat>PerUnit</ns2:PriceFormat>
         <ns2:StartingUnit>41</ns2:StartingUnit>
      </ns1:ProductRatePlanChargeTier>
   </ns2:ProductRatePlanChargeTierData><ns2:Taxable>false</ns2:Taxable>
   <ns2:TriggerEvent>ContractEffective</ns2:TriggerEvent>
 </ns1:zObjects>
</ns1:update>

Updating Pricing Information

If you are not changing the charge model, or don't need to change anything other than the price, you can update the ProductRatePlanChargeTier For example if you simply want to change the price from 14.99 to 16.99, update the ProductRatePlanChargeTier.

Sample SOAP:

<ns1:update>
 <ns1:zObjects xsi:type="ns2:ProductRatePlanChargeTier">
   <ns2:Id>4028e6991e6a5727011e74818e119e23</ns2:Id>
   <ns2:Price>16.99</ns2:Price>
 </ns1:zObjects>
</ns1:update>