Happy Business Starts Here

Create Subscription from Salesforce with Duplicate Products

Highlighted
New Student

Create Subscription from Salesforce with Duplicate Products

I'm running into an issue when creating subscriptions from SF with duplicate products. These products have the same ProductRatePlanId and ProductratePlanChargeIds. They are added to the susbscription in separate RatePlanChargeData objects.

 

When the subscription is created, the problem is that the two charges are duplicated. The second one in the RatePlanChargeData list overwrites the data of the first one. The sub ends-up with two lines saying exactly the same thing (Qty, price, etc.)

 

First, is it possible to add duplicate products to a subscription?

If yes, how do I get them to reflect the pricing and quantity that they were passed in with?

 

Thanks,

Tom

2 REPLIES 2
Highlighted
Zuora Support Moderator

Re: Create Subscription from Salesforce with Duplicate Products

 

Speaking just from the subscribe() call standpoint, you should be able to add duplicate products to a single subscription, and you should be able to get them to carry the quantities/price that you pass without the newer one overwriting the second one.

 

I just did a quick subscribe() call test for the following:

 

* same product and rate plan

* different quantities (2 vs. 4)

* my subscription created with two product lines and each one had the correct value

 

Below is the SubscriptionData portion of my call:

 

<ns1:SubscriptionData>
  <ns1:Subscription xsi:type="ns2:Subscription">
    <ns2:AutoRenew>true</ns2:AutoRenew>
    <ns2:ContractAcceptanceDate>2016-02-29T00:00:00</ns2:ContractAcceptanceDate>
    <ns2:ContractEffectiveDate>2016-02-29T00:00:00</ns2:ContractEffectiveDate>
    <ns2:InitialTerm>12</ns2:InitialTerm>
    <ns2:Name>Green1</ns2:Name>
    <ns2:RenewalTerm>12</ns2:RenewalTerm>
    <ns2:ServiceActivationDate>2016-02-29T00:00:00</ns2:ServiceActivationDate>
    <ns2:TermStartDate>2016-02-29T00:00:00</ns2:TermStartDate>
    <ns2:TermType>TERMED</ns2:TermType>
  </ns1:Subscription>
  <ns1:RatePlanData>
    <ns1:RatePlan xsi:type="ns2:RatePlan">
      <ns2:ProductRatePlanId>2c92c0f8511929fd01511bd2a22e6e85</ns2:ProductRatePlanId>
    </ns1:RatePlan>
    <ns1:RatePlanChargeData>
      <ns1:RatePlanCharge xsi:type="ns2:RatePlanCharge">
        <ns2:ProductRatePlanChargeId>2c92c0f8511929f701511bd3f7ce5ad6</ns2:ProductRatePlanChargeId>
        <ns2:Quantity>2</ns2:Quantity>
        <ns2:TriggerDate>2017-03-01T00:00:00</ns2:TriggerDate>
      </ns1:RatePlanCharge>
    </ns1:RatePlanChargeData>
  </ns1:RatePlanData>
  <ns1:RatePlanData>
    <ns1:RatePlan xsi:type="ns2:RatePlan">
      <ns2:ProductRatePlanId>2c92c0f8511929fd01511bd2a22e6e85</ns2:ProductRatePlanId>
    </ns1:RatePlan>
    <ns1:RatePlanChargeData>
      <ns1:RatePlanCharge xsi:type="ns2:RatePlanCharge">
        <ns2:ProductRatePlanChargeId>2c92c0f8511929f701511bd3f7ce5ad6</ns2:ProductRatePlanChargeId>
        <ns2:Quantity>4</ns2:Quantity>
        <ns2:TriggerDate>2017-03-01T00:00:00</ns2:TriggerDate>
      </ns1:RatePlanCharge>
    </ns1:RatePlanChargeData>
  </ns1:RatePlanData>
</ns1:SubscriptionData>


If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

Highlighted
New Student

Re: Create Subscription from Salesforce with Duplicate Products

Thanks for the reply.

 

I just found the code bug that was causing my problem. I can add duplicate products now.

 

Thanks,

Tom