Knowledge Center

Knowledge Center > API > SOAP API > SOAP API Object Reference > ProductRatePlanCharge > Discount Charge Use Cases

Discount Charge Use Cases

You can use the ProductRatePlanCharge object to create or update different discount product rate plan charges.

You must use these discount charge use cases based on WSDL version 85.0 or later. See The Zuora WSDL for information about downloading the current version.

Creating Discount Product Rate Plan Charges

You can use the ProductRatePlanCharge object to create different discount product rate plan charges, and apply them to different scopes.

Case 1: Creating Discount Charges that Apply to Different Charges in One Product Rate Plan

You can create a discount charge, and apply it to different regular charges in the same product rate plan. 

The following is the example request.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header>
      <ns1:SessionHeader xmlns:ns1="http://api.zuora.com/" soapenv:mustUnderstand="0">
         <ns1:session>XPwQerh8JKEjTqvBMJnqmRP79wckVQGYckaTJlTksltuu1wt7jF0nSnHDpV-4pvrHNdv8OLsf0GQqFoEkJyviMbXP-E_VM-kWT7hRzoH3uPE7aAfx6PE66_hMBQ9YqJwBXDbgdTz4gOG58M1HrCqqa3fCmMfMa8STjX8ijuD7a99dGndgT16v0v9RvM2dvgye0b8wlE5GsCvetTNaWl6rcpwYfNd3qzg9HQVSClfW1mxHVmRrCu4sKwaM6ZBBoMNXTR_sXOMQNHQrZRUjJs6HSnrbZZAJFYfmoau-0MHOJyiyINGE-1fAOEtXSu0jr2YFgvCtA6jrtMStH69pHpORw==</ns1:session>
      </ns1:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <ns1:create xmlns:ns1="http://api.zuora.com/">
         <ns1:zObjects xmlns:ns2="http://object.api.zuora.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:ProductRatePlanCharge">
            <ns2:AccountingCode>Accounts Receivable</ns2:AccountingCode>
            <ns2:ApplyDiscountTo>ONETIMERECURRINGUSAGE</ns2:ApplyDiscountTo>
            <ns2:BillCycleDay>1</ns2:BillCycleDay>
            <ns2:BillCycleType>DefaultFromCustomer</ns2:BillCycleType>
            <ns2:BillingPeriod>Month</ns2:BillingPeriod>
            <ns2:ChargeModel>Discount-Fixed Amount</ns2:ChargeModel>
            <ns2:ChargeType>Recurring</ns2:ChargeType>
            <ns2:DefaultQuantity>1</ns2:DefaultQuantity>
            <ns2:Description></ns2:Description>
            <ns2:DiscountClass>SVIP Discount</ns2:DiscountClass>
            <ns2:DiscountLevel>rateplan</ns2:DiscountLevel>
            <ns2:Name>Discount-Fixed 50</ns2:Name>
            <ns2:ProductRatePlanChargeTierData>
               <ns1:ProductRatePlanChargeTier xsi:type="ns2:ProductRatePlanChargeTier">
                  <ns2:Active>true</ns2:Active>
                  <ns2:Currency>USD</ns2:Currency>
                  <ns2:DiscountAmount>50.0</ns2:DiscountAmount>
                  <ns2:IsOveragePrice>false</ns2:IsOveragePrice>
                  <ns2:StartingUnit>0</ns2:StartingUnit>
                  <ns2:Tier>1</ns2:Tier>
               </ns1:ProductRatePlanChargeTier>
            </ns2:ProductRatePlanChargeTierData>
            <ns2:ProductDiscountApplyDetailData>
               <ns1:ProductDiscountApplyDetail xsi:type="ns2:ProductDiscountApplyDetail">
                  <ns2:AppliedProductRatePlanId>8a8082c45aefaba5015af47ba966023e</ns2:AppliedProductRatePlanId>
                  <ns2:AppliedProductRatePlanChargeId>8a8082c45b193f27015b1e88cc4a0064</ns2:AppliedProductRatePlanChargeId>
               </ns1:ProductDiscountApplyDetail>
               <ns1:ProductDiscountApplyDetail xsi:type="ns2:ProductDiscountApplyDetail">
                  <ns2:AppliedProductRatePlanId>8a8082c45aefaba5015af47ba966023e</ns2:AppliedProductRatePlanId>
                  <ns2:AppliedProductRatePlanChargeId>8a8082c45aefaba5015af47cfe5f024b</ns2:AppliedProductRatePlanChargeId>
               </ns1:ProductDiscountApplyDetail>
            </ns2:ProductDiscountApplyDetailData>
            <ns2:ProductRatePlanId>8a8082c45aefaba5015af47ba966023e</ns2:ProductRatePlanId>
            <ns2:TriggerEvent>ContractEffective</ns2:TriggerEvent>
         </ns1:zObjects>
      </ns1:create>
   </soapenv:Body>
</soapenv:Envelope>

The following is the example response of the preceding request.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <ns1:createResponse xmlns:ns1="http://api.zuora.com/">
         <ns1:result>
            <ns1:Id>8a8082c45b1f1a0b015b236486a00018</ns1:Id>
            <ns1:Success>true</ns1:Success>
         </ns1:result>
      </ns1:createResponse>
   </soapenv:Body>
</soapenv:Envelope>

Case 2: Creating Discount Charges that Apply to All Charges in Two Product Rate Plans

You can create a discount charge, and apply it to all regular charges in two different product rate plans. 

The following is the example request.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header>
      <ns1:SessionHeader xmlns:ns1="http://api.zuora.com/" soapenv:mustUnderstand="0">
         <ns1:session>XPwQerh8JKEjTqvBMJnqmRP79wckVQGYckaTJlTksltuu1wt7jF0nSnHDpV-4pvrHNdv8OLsf0GQqFoEkJyviMbXP-E_VM-kWT7hRzoH3uPE7aAfx6PE66_hMBQ9YqJwBXDbgdTz4gOG58M1HrCqqa3fCmMfMa8STjX8ijuD7a99dGndgT16v0v9RvM2dvgye0b8wlE5GsCvetTNaWl6rcpwYfNd3qzg9HQVSClfW1mxHVmRrCu4sKwaM6ZBBoMNXTR_sXOMQNHQrZRUjJs6HSnrbZZAJFYfmoau-0MHOJyiyINGE-1fAOEtXSu0jr2YFgvCtA6jrtMStH69pHpORw==</ns1:session>
      </ns1:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <ns1:create xmlns:ns1="http://api.zuora.com/">
         <ns1:zObjects xmlns:ns2="http://object.api.zuora.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:ProductRatePlanCharge">
            <ns2:AccountingCode>Accounts Receivable</ns2:AccountingCode>
            <ns2:ApplyDiscountTo>ONETIMERECURRINGUSAGE</ns2:ApplyDiscountTo>
            <ns2:BillCycleDay>1</ns2:BillCycleDay>
            <ns2:BillCycleType>DefaultFromCustomer</ns2:BillCycleType>
            <ns2:BillingPeriod>Month</ns2:BillingPeriod>
            <ns2:ChargeModel>Discount-Fixed Amount</ns2:ChargeModel>
            <ns2:ChargeType>Recurring</ns2:ChargeType>
            <ns2:DefaultQuantity>1</ns2:DefaultQuantity>
            <ns2:Description>Recurring Discount-Fixed Amount</ns2:Description>
            <ns2:DiscountClass>Gold Discount</ns2:DiscountClass>
            <ns2:DiscountLevel>subscription</ns2:DiscountLevel>
            <ns2:Name>Discount-Fixed</ns2:Name>
            <ns2:ProductDiscountApplyDetailData>
               <ns1:ProductDiscountApplyDetail xsi:type="ns2:ProductDiscountApplyDetail">
                  <ns2:AppliedProductRatePlanId>402881ec5ae47d4b015ae494c84e0006</ns2:AppliedProductRatePlanId>
               </ns1:ProductDiscountApplyDetail>
               <ns1:ProductDiscountApplyDetail xsi:type="ns2:ProductDiscountApplyDetail">
                  <ns2:AppliedProductRatePlanId>402890525ad5bf15015ad5c3d77e000d</ns2:AppliedProductRatePlanId>
               </ns1:ProductDiscountApplyDetail>
            </ns2:ProductDiscountApplyDetailData>
            <ns2:ProductRatePlanChargeTierData>
               <ns1:ProductRatePlanChargeTier xsi:type="ns2:ProductRatePlanChargeTier">
                  <ns2:Active>true</ns2:Active>
                  <ns2:Currency>USD</ns2:Currency>
                  <ns2:DiscountAmount>50.0</ns2:DiscountAmount>
                  <ns2:IsOveragePrice>false</ns2:IsOveragePrice>
                  <ns2:StartingUnit>0</ns2:StartingUnit>
                  <ns2:Tier>1</ns2:Tier>
               </ns1:ProductRatePlanChargeTier>
            </ns2:ProductRatePlanChargeTierData>
            <ns2:ProductRatePlanId>402881ec5ae47d4b015ae494c84e0006</ns2:ProductRatePlanId>
            <ns2:TriggerEvent>ContractEffective</ns2:TriggerEvent>
         </ns1:zObjects>
      </ns1:create>
   </soapenv:Body>
</soapenv:Envelope>

The following is the example response of the preceding request.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <ns1:createResponse xmlns:ns1="http://api.zuora.com/">
         <ns1:result>
            <ns1:Id>8a8082c45aefaba5015af5617e160281</ns1:Id>
            <ns1:Success>true</ns1:Success>
         </ns1:result>
      </ns1:createResponse>
   </soapenv:Body>
</soapenv:Envelope>

Case 3: Creating Discount Charges that Apply to Different Charges in Different Product Rate Plans

You can create a discount charge, and apply it to different regular charges in different product rate plans.  

The following is the example request.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header>
      <ns1:SessionHeader xmlns:ns1="http://api.zuora.com/" soapenv:mustUnderstand="0">
         <ns1:session>XPwQerh8JKEjTqvBMJnqmRP79wckVQGYckaTJlTksltuu1wt7jF0nSnHDpV-4pvrHNdv8OLsf0GQqFoEkJyviMbXP-E_VM-kWT7hRzoH3uPE7aAfx6PE66_hMBQ9YqJwBXDbgdTz4gOG58M1HrCqqa3fCmMfMa8STjX8ijuD7a99dGndgT16v0v9RvM2dvgye0b8wlE5GsCvetTNaWl6rcpwYfNd3qzg9HQVSClfW1mxHVmRrCu4sKwaM6ZBBoMNXTR_sXOMQNHQrZRUjJs6HSnrbZZAJFYfmoau-0MHOJyiyINGE-1fAOEtXSu0jr2YFgvCtA6jrtMStH69pHpORw==</ns1:session>
      </ns1:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <ns1:create xmlns:ns1="http://api.zuora.com/">
         <ns1:zObjects xmlns:ns2="http://object.api.zuora.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:ProductRatePlanCharge">
            <ns2:AccountingCode>Accounts Receivable</ns2:AccountingCode>
            <ns2:ApplyDiscountTo>ONETIMERECURRINGUSAGE</ns2:ApplyDiscountTo>
            <ns2:BillCycleDay>1</ns2:BillCycleDay>
            <ns2:BillCycleType>DefaultFromCustomer</ns2:BillCycleType>
            <ns2:BillingPeriod>Month</ns2:BillingPeriod>
            <ns2:ChargeModel>Discount-Fixed Amount</ns2:ChargeModel>
            <ns2:ChargeType>Recurring</ns2:ChargeType>
            <ns2:DefaultQuantity>1</ns2:DefaultQuantity>
            <ns2:Description>Recurring Discount-Fixed Amount</ns2:Description>
            <ns2:DiscountClass>VIP Discount</ns2:DiscountClass>
            <ns2:DiscountLevel>subscription</ns2:DiscountLevel>
            <ns2:Name>Discount-Fixed Amount</ns2:Name>
            <ns2:ProductDiscountApplyDetailData>
               <ns1:ProductDiscountApplyDetail xsi:type="ns2:ProductDiscountApplyDetail">
                  <ns2:AppliedProductRatePlanId>402881ec5ae47d4b015ae494c84e0006</ns2:AppliedProductRatePlanId>
                  <ns2:AppliedProductRatePlanChargeId>402881ec5ae47d4b015ae49594a4000e</ns2:AppliedProductRatePlanChargeId>
               </ns1:ProductDiscountApplyDetail>
               <ns1:ProductDiscountApplyDetail xsi:type="ns2:ProductDiscountApplyDetail">
                  <ns2:AppliedProductRatePlanId>402890525ad5bf15015ad5c3d77e000d</ns2:AppliedProductRatePlanId>
                  <ns2:AppliedProductRatePlanChargeId>402881ec5adbc5ce015adbcbf7010002</ns2:AppliedProductRatePlanChargeId>
               </ns1:ProductDiscountApplyDetail>
            </ns2:ProductDiscountApplyDetailData>
            <ns2:ProductRatePlanChargeTierData>
               <ns1:ProductRatePlanChargeTier xsi:type="ns2:ProductRatePlanChargeTier">
                  <ns2:Active>true</ns2:Active>
                  <ns2:Currency>USD</ns2:Currency>
                  <ns2:DiscountAmount>50.0</ns2:DiscountAmount>
                  <ns2:IsOveragePrice>false</ns2:IsOveragePrice>
                  <ns2:StartingUnit>0</ns2:StartingUnit>
                  <ns2:Tier>1</ns2:Tier>
               </ns1:ProductRatePlanChargeTier>
            </ns2:ProductRatePlanChargeTierData>
            <ns2:ProductRatePlanId>402881ec5ae47d4b015ae494c84e0006</ns2:ProductRatePlanId>
            <ns2:TriggerEvent>ContractEffective</ns2:TriggerEvent>
         </ns1:zObjects>
      </ns1:create>
   </soapenv:Body>
</soapenv:Envelope>

The following is the example response of the preceding request.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <ns1:createResponse xmlns:ns1="http://api.zuora.com/">
         <ns1:result>
            <ns1:Id>8a8082c45aefaba5015b0f18721f0425</ns1:Id>
            <ns1:Success>true</ns1:Success>
         </ns1:result>
      </ns1:createResponse>
   </soapenv:Body>
</soapenv:Envelope>

Updating Discount Product Rate Plan Charges

You can use the ProductRatePlanCharge object to update application scopes for existing discount product rate plan charges.

Case 1: Updating Discount Charges to Apply to All Charges in One Product Rate Plan

You can update an existing discount charge to apply it to all regular charges in the same product rate plan.

The following is the example request.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.zuora.com/" xmlns:obj="http://object.api.zuora.com/">
   <soapenv:Header>
      <api:SessionHeader>
         <api:session>6tbelkmA7qzUJ5e5pAwJM4sxYa48DfrqamPUwa1O1TFF_4S5o8ZdnpO0ZQ_UiSdG8GmYfqqc5arPLDL4e2-K85T8RUybhds1bxQnQOWmA-Sd08pEYflg9xcDUpQlb34UhzxbVZzvzssMPKSNEM4CSRjyQNW3FUKg5-0hHhvCQgEgrbLu7Gpln3NNGRs4rH-QOv1Zexaw7M4CwGNpseTsMlQMkBSCNM7pwD2Jh--Yu8Z8m4FlBSD72jCoQjJYa_GPImyv3V0-HEh7F1YzcXpxw88jJ7-6IY2Q3Cekdsx_Q3_4AM7rc-0fRcwkExpLVJw_hKgsDfzyNjapr2ob_UcR4w==</api:session>
      </api:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <ns1:update xmlns:ns1="http://api.zuora.com/">
         <ns1:zObjects xmlns:ns2="http://object.api.zuora.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:ProductRatePlanCharge">
            <ns2:Id>8a8082c45b1f1a0b015b236486a00018</ns2:Id>
            <ns2:ProductDiscountApplyDetailData>
               <ns1:ProductDiscountApplyDetail xsi:type="ns2:ProductDiscountApplyDetail">
                  <ns2:AppliedProductRatePlanId>8a8082c45aefaba5015af47ba966023e</ns2:AppliedProductRatePlanId>
               </ns1:ProductDiscountApplyDetail>
            </ns2:ProductDiscountApplyDetailData>
         </ns1:zObjects>
      </ns1:update>
   </soapenv:Body>
</soapenv:Envelope>

The following is the example response of the preceding request.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <ns1:updateResponse xmlns:ns1="http://api.zuora.com/">
         <ns1:result>
            <ns1:Id>8a8082c45b1f1a0b015b236486a00018</ns1:Id>
            <ns1:Success>true</ns1:Success>
         </ns1:result>
      </ns1:updateResponse>
   </soapenv:Body>
</soapenv:Envelope>

Case 2: Updating Discount Charges to Apply to Multiple Different Product Rate Plan Charges 

You can update an existing discount charge to apply it to three different regular product rate plan charges, without specifying related product rate plans.

The following is the example request.

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.zuora.com/" xmlns:obj="http://object.api.zuora.com/">
   <soapenv:Header>
      <api:SessionHeader>
         <api:session>6tbelkmA7qzUJ5e5pAwJM4sxYa48DfrqamPUwa1O1TFF_4S5o8ZdnpO0ZQ_UiSdG8GmYfqqc5arPLDL4e2-K85T8RUybhds1bxQnQOWmA-Sd08pEYflg9xcDUpQlb34UhzxbVZzvzssMPKSNEM4CSRjyQNW3FUKg5-0hHhvCQgEgrbLu7Gpln3NNGRs4rH-QOv1Zexaw7M4CwGNpseTsMlQMkBSCNM7pwD2Jh--Yu8Z8m4FlBSD72jCoQjJYa_GPImyv3V0-HEh7F1YzcXpxw88jJ7-6IY2Q3Cekdsx_Q3_4AM7rc-0fRcwkExpLVJw_hKgsDfzyNjapr2ob_UcR4w==</api:session>
      </api:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <ns1:update xmlns:ns1="http://api.zuora.com/">
         <ns1:zObjects xmlns:ns2="http://object.api.zuora.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:ProductRatePlanCharge">
            <ns2:Id>8a8082c45b1f1a0b015b236486a00018</ns2:Id>
            <ns2:ProductDiscountApplyDetailData>
               <ns1:ProductDiscountApplyDetail xsi:type="ns2:ProductDiscountApplyDetail">
                  <ns2:AppliedProductRatePlanChargeId>402881f05933f1e30159340d1f200005</ns2:AppliedProductRatePlanChargeId>
               </ns1:ProductDiscountApplyDetail>
               <ns1:ProductDiscountApplyDetail xsi:type="ns2:ProductDiscountApplyDetail">
                  <ns2:AppliedProductRatePlanChargeId>402881f05933f1e30159340ea9d5000b</ns2:AppliedProductRatePlanChargeId>
               </ns1:ProductDiscountApplyDetail>
               <ns1:ProductDiscountApplyDetail xsi:type="ns2:ProductDiscountApplyDetail">
                  <ns2:AppliedProductRatePlanChargeId>4028905259069be8015906ae2b52000c</ns2:AppliedProductRatePlanChargeId>
               </ns1:ProductDiscountApplyDetail>
            </ns2:ProductDiscountApplyDetailData>
            <ns2:ProductRatePlanChargeTierData>
               <ns1:ProductRatePlanChargeTier xsi:type="ns2:ProductRatePlanChargeTier">
                  <ns2:DiscountAmount>100.0</ns2:DiscountAmount>
               </ns1:ProductRatePlanChargeTier>
            </ns2:ProductRatePlanChargeTierData>
         </ns1:zObjects>
      </ns1:update>
   </soapenv:Body>
</soapenv:Envelope>

The following is the example response of the preceding request.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <ns1:updateResponse xmlns:ns1="http://api.zuora.com/">
         <ns1:result>
            <ns1:Id>8a8082c45b1f1a0b015b236486a00018</ns1:Id>
            <ns1:Success>true</ns1:Success>
         </ns1:result>
      </ns1:updateResponse>
   </soapenv:Body>
</soapenv:Envelope>

Case 3: Updating Discount Charges to Apply to One Specific Charge 

You can update an existing discount charge to apply it to one specific regular product rate plan charge.

The following is the example request.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.zuora.com/" xmlns:obj="http://object.api.zuora.com/">
   <soapenv:Header>
      <api:SessionHeader>
         <api:session>6tbelkmA7qzUJ5e5pAwJM4sxYa48DfrqamPUwa1O1TFF_4S5o8ZdnpO0ZQ_UiSdG8GmYfqqc5arPLDL4e2-K85T8RUybhds1bxQnQOWmA-Sd08pEYflg9xcDUpQlb34UhzxbVZzvzssMPKSNEM4CSRjyQNW3FUKg5-0hHhvCQgEgrbLu7Gpln3NNGRs4rH-QOv1Zexaw7M4CwGNpseTsMlQMkBSCNM7pwD2Jh--Yu8Z8m4FlBSD72jCoQjJYa_GPImyv3V0-HEh7F1YzcXpxw88jJ7-6IY2Q3Cekdsx_Q3_4AM7rc-0fRcwkExpLVJw_hKgsDfzyNjapr2ob_UcR4w==</api:session>
      </api:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <ns1:update xmlns:ns1="http://api.zuora.com/">
         <ns1:zObjects xmlns:ns2="http://object.api.zuora.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:ProductRatePlanCharge">
            <ns2:Id>8a8082c45b1f1a0b015b236486a00018</ns2:Id>
            <ns2:ProductDiscountApplyDetailData>
               <ns1:ProductDiscountApplyDetail xsi:type="ns2:ProductDiscountApplyDetail">
                  <ns2:AppliedProductRatePlanChargeId>8a8082c45b193f27015b1e87afb40061</ns2:AppliedProductRatePlanChargeId>
               </ns1:ProductDiscountApplyDetail>
            </ns2:ProductDiscountApplyDetailData>
         </ns1:zObjects>
      </ns1:update>
   </soapenv:Body>
</soapenv:Envelope>

The following is the example response of the preceding request.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <ns1:updateResponse xmlns:ns1="http://api.zuora.com/">
         <ns1:result>
            <ns1:Id>8a8082c45b1f1a0b015b236486a00018</ns1:Id>
            <ns1:Success>true</ns1:Success>
         </ns1:result>
      </ns1:updateResponse>
   </soapenv:Body>
</soapenv:Envelope>

Case 4: Updating Discount Charges to Apply to Two Specific Charges in Two Product Rate Plans

You can update an existing discount charge to apply it to two specific regular charges in two different product rate plans.

The following is the example request.

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.zuora.com/" xmlns:obj="http://object.api.zuora.com/">
   <soapenv:Header>
      <api:SessionHeader>
         <api:session>6tbelkmA7qzUJ5e5pAwJM4sxYa48DfrqamPUwa1O1TFF_4S5o8ZdnpO0ZQ_UiSdG8GmYfqqc5arPLDL4e2-K85T8RUybhds1bxQnQOWmA-Sd08pEYflg9xcDUpQlb34UhzxbVZzvzssMPKSNEM4CSRjyQNW3FUKg5-0hHhvCQgEgrbLu7Gpln3NNGRs4rH-QOv1Zexaw7M4CwGNpseTsMlQMkBSCNM7pwD2Jh--Yu8Z8m4FlBSD72jCoQjJYa_GPImyv3V0-HEh7F1YzcXpxw88jJ7-6IY2Q3Cekdsx_Q3_4AM7rc-0fRcwkExpLVJw_hKgsDfzyNjapr2ob_UcR4w==</api:session>
      </api:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <ns1:update xmlns:ns1="http://api.zuora.com/">
         <ns1:zObjects xmlns:ns2="http://object.api.zuora.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:ProductRatePlanCharge">
            <ns2:Id>8a8082c45b1f1a0b015b236486a00018</ns2:Id>
            <ns2:ProductDiscountApplyDetailData>
               <ns1:ProductDiscountApplyDetail xsi:type="ns2:ProductDiscountApplyDetail">
                  <ns2:AppliedProductRatePlanId>402881ec5ae47d4b015ae494c84e0006</ns2:AppliedProductRatePlanId>
                  <ns2:AppliedProductRatePlanChargeId>8a8082c45aefaba5015af47cfe5f024b</ns2:AppliedProductRatePlanChargeId>
               </ns1:ProductDiscountApplyDetail>
               <ns1:ProductDiscountApplyDetail xsi:type="ns2:ProductDiscountApplyDetail">
                  <ns2:AppliedProductRatePlanId>402890525ad5bf15015ad5c3d77e000d</ns2:AppliedProductRatePlanId>
                  <ns2:AppliedProductRatePlanChargeId>8a8082c45b193f27015b1e88cc4a0064</ns2:AppliedProductRatePlanChargeId>
               </ns1:ProductDiscountApplyDetail>
            </ns2:ProductDiscountApplyDetailData>
         </ns1:zObjects>
      </ns1:update>
   </soapenv:Body>
</soapenv:Envelope>

The following is the example response of the preceding request.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <ns1:updateResponse xmlns:ns1="http://api.zuora.com/">
         <ns1:result>
            <ns1:Id>8a8082c45b1f1a0b015b236486a00018</ns1:Id>
            <ns1:Success>true</ns1:Success>
         </ns1:result>
      </ns1:updateResponse>
   </soapenv:Body>
</soapenv:Envelope>

Case 5: Updating Discount Charges to Remove Existing Application Details

You can update an existing discount charge to remove the existing application details of the discount charge. In this case, the discount charge is applied according to the discount level and the types of applied charges.

The following is the example request.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.zuora.com/" xmlns:obj="http://object.api.zuora.com/">
   <soapenv:Header>
      <api:SessionHeader>
         <api:session>6tbelkmA7qzUJ5e5pAwJM4sxYa48DfrqamPUwa1O1TFF_4S5o8ZdnpO0ZQ_UiSdG8GmYfqqc5arPLDL4e2-K85T8RUybhds1bxQnQOWmA-Sd08pEYflg9xcDUpQlb34UhzxbVZzvzssMPKSNEM4CSRjyQNW3FUKg5-0hHhvCQgEgrbLu7Gpln3NNGRs4rH-QOv1Zexaw7M4CwGNpseTsMlQMkBSCNM7pwD2Jh--Yu8Z8m4FlBSD72jCoQjJYa_GPImyv3V0-HEh7F1YzcXpxw88jJ7-6IY2Q3Cekdsx_Q3_4AM7rc-0fRcwkExpLVJw_hKgsDfzyNjapr2ob_UcR4w==</api:session>
      </api:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <ns1:update xmlns:ns1="http://api.zuora.com/">
         <ns1:zObjects xmlns:ns2="http://object.api.zuora.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:ProductRatePlanCharge">
            <ns2:Id>8a8082c45b1f1a0b015b236486a00018</ns2:Id>
            <ns2:ProductDiscountApplyDetailData />
         </ns1:zObjects>
      </ns1:update>
   </soapenv:Body>
</soapenv:Envelope>

The following is the example response of the preceding request.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <ns1:updateResponse xmlns:ns1="http://api.zuora.com/">
         <ns1:result>
            <ns1:Id>8a8082c45b1f1a0b015b236486a00018</ns1:Id>
            <ns1:Success>true</ns1:Success>
         </ns1:result>
      </ns1:updateResponse>
   </soapenv:Body>
</soapenv:Envelope>
Last modified
21:24, 31 Mar 2017

Tags

This page has no custom tags.

Classifications

(not set)