Happy Business Starts Here

[SOAP] How to create Subscriptions with Features / how to add Features to existing subscriptions

Highlighted
Community Manager

[SOAP] How to create Subscriptions with Features / how to add Features to existing subscriptions

See Reply



Subscribe to Zuora System Updates at Zuora Trust
Follow Zuora Global Support on Twitter and LinkedIn

1 REPLY 1
Community Manager

Re: [SOAP] How to create Subscriptions with Features / how to add Features to existing subscriptions

Question:

How to create Subscriptions with Features / how to add Features to existing subscriptions via the SOAP API?

Solution:

- If you invoke the subscribe() call and add a product which already has the features attached, the new subscription will automatically have all the active features attached to it, if you do not specify which one you'd like to have.

- To be able to specify features for a subscription, the following option needs to be enabled on the product:

feature.JPG

 

- If the product has at least one feature, you can only create the subscription with said feature (from the logic described above: subscription gets ALL or specific features of the product, but FeatureId should not be null, so at least one is required)

- If your product does not have any features attached, AND the Allow Feature Changes in Subscriptions is enabled, you can still add any feature on subscription level, by simply specifying the FeatureId in your request. The features can be added in the RatePlanData object of your subscribe() call, my example call's RatePlanData looks like this:

<ns1:RatePlanData>
    <ns1:RatePlan xsi:type="ns2:RatePlan">
        <ns2:ProductRatePlanId>2c92c0f94c750685014c988b4f0b5521</ns2:ProductRatePlanId>
    </ns1:RatePlan>
    <ns1:RatePlanChargeData>
        <ns1:RatePlanCharge xsi:type="ns2:RatePlanCharge">
            <ns2:ProductRatePlanChargeId>2c92c0f94c750685014c988b51125525</ns2:ProductRatePlanChargeId>
            <ns2:Quantity></ns2:Quantity>
        </ns1:RatePlanCharge>
    </ns1:RatePlanChargeData>
    <ns1:SubscriptionProductFeatureList>
        <ns1:SubscriptionProductFeature xsi:type="ns2:SubscriptionProductFeature">
            <ns2:FeatureId>2c92c0f84c74f815014c987ca71b781f</ns2:FeatureId>
        </ns1:SubscriptionProductFeature>
        <ns1:SubscriptionProductFeature xsi:type="ns2:SubscriptionProductFeature">
            <ns2:FeatureId>2c92c0f94c75067f014c985ab7d90f4a</ns2:FeatureId>
        </ns1:SubscriptionProductFeature>
    </ns1:SubscriptionProductFeatureList>
</ns1:RatePlanData>

 

- And here is the SOAP amend() call you can use for adding features to existing subscriptions:

 

<ns1:amend>
    <ns1:requests>
        <ns1:Amendments>
            <ns2:ContractEffectiveDate>2015-01-01T00:00:00</ns2:ContractEffectiveDate>
            <ns2:CustomerAcceptanceDate>2015-01-01T00:00:00</ns2:CustomerAcceptanceDate>
            <ns2:EffectiveDate>2015-01-01T00:00:00</ns2:EffectiveDate>
            <ns2:Name>a</ns2:Name>
                <ns1:RatePlanData>
                    <ns1:RatePlan xsi:type="ns2:RatePlan">
                        <ns2:AmendmentSubscriptionRatePlanId>2c92c0f94c750685014c99a295e76689</ns2:AmendmentSubscriptionRatePlanId>
                    </ns1:RatePlan>
                    <ns1:SubscriptionProductFeatureList>
                        <ns1:SubscriptionProductFeature xsi:type="ns2:SubscriptionProductFeature">
                            <ns2:FeatureId>2c92c0f84c74f815014c987ca71b781f</ns2:FeatureId>
                        </ns1:SubscriptionProductFeature>
                        <ns1:SubscriptionProductFeature xsi:type="ns2:SubscriptionProductFeature">
                            <ns2:FeatureId>2c92c0f94c75067f014c985ab7d90f4a</ns2:FeatureId>
                        </ns1:SubscriptionProductFeature>
                    </ns1:SubscriptionProductFeatureList>
                </ns1:RatePlanData>
            <ns2:ServiceActivationDate>2015-01-01T00:00:00</ns2:ServiceActivationDate>
            <ns2:Status>Completed</ns2:Status>
            <ns2:SubscriptionId>2c92c0f94c750685014c99a295b96684</ns2:SubscriptionId>
            <ns2:Type>UpdateProduct</ns2:Type>
        </ns1:Amendments>
        <ns1:AmendOptions>
            <ns1:GenerateInvoice>False</ns1:GenerateInvoice>
            <ns1:ProcessPayments>False</ns1:ProcessPayments>
        </ns1:AmendOptions>
        <ns1:PreviewOptions>
            <ns1:EnablePreviewMode>False</ns1:EnablePreviewMode>
        </ns1:PreviewOptions>
    </ns1:requests>
</ns1:amend>

 

Supporting References:

https://knowledgecenter.zuora.com/BC_Developers/SOAP_API/E1_SOAP_API_Object_Reference/Feature

https://knowledgecenter.zuora.com/CB_Billing/G_Subscriptions/B_Creating_Subscriptions/D_Manage_Subsc...

https://knowledgecenter.zuora.com/CB_Billing/D_Product_Catalog/F0_Manage_Features

https://knowledgecenter.zuora.com/CB_Billing/D_Product_Catalog/FF_Manage_Product_Features



Subscribe to Zuora System Updates at Zuora Trust
Follow Zuora Global Support on Twitter and LinkedIn