Skip to main content

Replace products in subscriptions

Zuora

Replace products in subscriptions

Orders is now generally available.

If you are an existing Zuora Subscribe and Amend customer and want to adopt Orders, see What is Orders Harmonization for more information. If you want to enable Orders, submit a request at Zuora Global Support.

This tutorial demonstrates how to replace a rate plan in a subscription by creating an order. You can choose one of the following methods to replace a rate plan in a subscription:

  • Remove a rate plan from the subscription and add a product rate plan to the subscription through the UI and REST API. If you choose this method, you can set the order date as the date of today, the trigger dates of product removal as the date of today, and the trigger dates of product addition as the date of tomorrow.
  • Directly change a rate plan through the REST API. If you choose this method, you can set the order date and trigger dates of plan change as the date of today.

Remove a rate plan and add a product rate plan using the Zuora UI

To replace a rate plan in a subscription:

  1. Navigate to Customers > Orders. The Orders page opens.

  2. Click Create New Order at the top right. The Create New Order page opens.

  3. In the Account field, enter the name of the account that owns the subscription. 

    You can enter the account by clicking either Account Name or Account Number.

    • If you click Account Name, type part of the account name in the Account field and the filtered accounts can be dynamically listed for your selection.
    • If you click Account Number, type the exact account number.
  4. Choose what you want to do by clicking Amend Subscription.

  5. In the Select an existing subscription area, locate the target subscription to which you are to add products by using the Search field.

  6. On the target subscription line, click Select in the Action column. 

    select-subscriptions.png

  7. To remove the product, complete the following steps:

    1. In the Included Products tab of the Associated subscriptions area, find the target product, and click Remove below the rate plan name. The Remove rate plan charge window opens.

      remove-product.png

    2. Specify appropriate dates in the Contract effectiveService activation, and Customer acceptance fields.

    3. Click Continue. The window is closed.

  8. To add another product, complete the following steps:

    1. At the top of the Associated subscriptions area, click Add Product, which is displayed to the right of the subscription number. 

    2. Scroll up to the top of the page, and select appropriate dates in the Contract EffectiveService Activation, and Customer Acceptance fields.

    3. In the Products and charges area, search and locate the product to be added. You can choose to search by product name or by product SKU by using the drop-down list. The displayed products will dynamically change as you type in the Search field.

      SearchProduct.png

    4. To add a product rate plan, click the right arrow ( > ) next to the product name to expand all its rate plans, and then select the checkbox in front of the rate plan.

      SelectRatePlan.png

      You can select more than one rate plan in multiple products. To remove a rate plan from your selection, clear the checkbox in front of the rate plan. The number of the selected rate plan is also indicated in the UI.

    5. Click Add Product in the bottom right corner to continue. 

  9. (Optional): Update the charges for the selected rate plan if necessary.

  10. Click Review Order to continue. The included products are all displayed for the selected subscription.

    At this point, you can still click Add Product to add more rate plans to this subscription.

  11. (Optional): To preview billing information for the subscription, click Preview Billing. Specify the preview settings and click Update Preview to see the preview invoices. After you are finished, click Done to return to the previous page.

  12. For the new order to take effect, click Activate.

Change a rate plan using the REST API 

You can directly use the change plan order action in the Create an order operation to replace a rate plan in a subscription. 

Before the Orders feature is enabled, you have to use the Update a subscription or Amend operation.

To replace a rate plan in a subscription by creating an order:

  1. Determine the values of the following variables:

    Variable Description
    $existingAccountNumber The number of the existing account that will own the order. For example, A00000001.
    $SubscriptionNum The number of the subscription to update. For example, A-S00000001.
    $ProductRPId The ID of the rate plan to be removed from the subscription. For example, 4028fc8281666f5501816680015f01f1.
    $NewProductPRId The ID of the product rate plan to be added to the subscription. For example, 4028fc8281666f55018166803c4f01f2.
    $Today The date of today. For example, 2022-09-01.
  2. Use the "Create an order" operation to create an order under an existing account:

    Request POST /v1/orders/
    Request Body
    {  
       "orderDate":"$Today",
       "existingAccountNumber":"$existingAccountNumber",
       "subscriptions":[
           {
               "subscriptionNumber":"$SubscriptionNum",
               "orderActions":[
                   {
                       "type":"ChangePlan",
                       "triggerDates":[{
                           "name":"ContractEffective",
                           "triggerDate":"$Today"
                           },
                           {
                           "name": "ServiceActivation",
                           "triggerDate": "$Today"
                           },
                           {
                           "name": "CustomerAcceptance",
                           "triggerDate": "$Today"
                       }],
                       "changePlan":{
                           "productRatePlanId":$ProductRPId,
                           "subType": "Upgrade",
                           "newProductRatePlan": {
                               "productRatePlanId":"$NewProductPRId"
                           }
                       }
                   }
               ]
           }
       ]
    }
    

     To preview invoices for the updated subscription, use the Preview an order operation.

Remove a rate plan and add a product rate plan using the REST API

You can use remove product and add product order actions in the Create an order operation to replace a rate plan or offer in a subscription.

Remove a rate plan and add a product rate plan

Before the Orders feature is enabled, you have to use the Update a subscription or Amend operation.

To replace a rate plan in a subscription by creating an order:

  1. Determine the values of the following variables:

    Variable Description
    $AccountNum

    The number of the account that will own the order. For example, A00000001.

    To create the order under a new account instead of an existing account, specify the newAccount field instead of the existingAccountNumber field.

    $SubscriptionNum The number of the subscription to update. For example, A-S00000001.
    $RPIdRemove The ID of the rate plan to be removed from the subscription. For example, 8a8081085e0d4b70015e4b844495058d.
    $ProductRPId The ID of the product rate plan to add to the subscription. For example, 8a8081085d834928015d9ce60ef41acf.
    $ProductRPChargeId The ID of the product rate plan charge to use when adding the product rate plan. For example, 8a8081085d834928015d9ce6ae821ad1.
    $Today Today's date. For example, 2017-09-30.
    $Tomorrow Tomorrow's date. For example, 2017-10-01.
  2. Use the "Create an order" operation to create an order under an existing account:

    Request POST /v1/orders/
    Request Body
    {
      "orderDate": "$Today",
      "existingAccountNumber": "$AccountNum",
      "subscriptions": [
        {
          "subscriptionNumber": "$SubscriptionNum",
          "orderActions": [
            {
              "type": "RemoveProduct",
              "triggerDates": [
                {
                  "name": "ContractEffective",
                  "triggerDate": "$Today"
                },
                {
                  "name": "ServiceActivation",
                  "triggerDate": "$Today"
                },
                {
                  "name": "CustomerAcceptance",
                  "triggerDate": "$Today"
                }
              ],
              "removeProduct": {
                "ratePlanId": "$RPIdRemove"
              }
            },
            {
              "type": "AddProduct",
              "triggerDates": [
                {
                  "name": "ContractEffective",
                  "triggerDate": "$Tomorrow"
                },
                {
                  "name": "ServiceActivation",
                  "triggerDate": "$Tomorrow"
                },
                {
                  "name": "CustomerAcceptance",
                  "triggerDate": "$Tomorrow"
                }
              ],
              "addProduct": {
                "productRatePlanId": "$ProductRPId",
                "chargeOverrides": [
                  {
                    "productRatePlanChargeId": "$ProductRPChargeId",
                    "pricing": {
                      "recurringVolume": {
                        "quantity": 20
                      }
                    }
                  }
                ]
              }
            }
          ]
        }
      ],
      "processingOptions": {
        "runBilling": false,
        "collectPayment": false
      }
    }
    

     To preview invoices for the updated subscription, use the Preview an order operation.

Remove an offer and add a product offer

To replace an offer in a subscription by creating an order:

  1. Determine the values of the following variables:

    Variable Description
    $AccountNum

    The number of the account that will own the order. For example, A00000001.

    To create the order under a new account instead of an existing account, specify the newAccount field instead of the existingAccountNumber field.

    $SubscriptionNum The number of the subscription to update. For example, A-S00000001.
    $productOfferNum The number of the product offer to be added to the subscription. For example, OF-00000001.
    $subscriptionOfferNum The number of the offer to be removed from the subscription. For example, S-O00000006.
    $Today Today's date. For example, 2023-02-28.
    $Tomorrow Tomorrow's date. For example, 2023-03-01.
  2. Use the "Create an order" operation to create an order under an existing account:

    Request POST /v1/orders/
    Request Body
    {
     "existingAccountNumber": "$AccountNum",
     "subscriptions": [
       {
         "orderActions": [
             {
             "addProduct": {
               "productOfferNumber": "$productOfferNum"
             },
             "type": "AddProduct",
             "triggerDates": [
               {
                 "triggerDate": "$Today",
                 "name": "ContractEffective"
               },
               {
                 "triggerDate": "$Today",
                 "name": "ServiceActivation"
               },
               {
                 "triggerDate": "$Today",
                 "name": "CustomerAcceptance"
               }
             ]
           },
           {
             "removeProduct": {
               "subscriptionOfferNumber": "$subscriptionOfferNum"
             },
             "type": "RemoveProduct",
             "triggerDates": [
               {
                 "triggerDate": "$Tomorrow",
                 "name": "ContractEffective"
               },
               {
                 "triggerDate": "$Tomorrow",
                 "name": "ServiceActivation"
               },
               {
                 "triggerDate": "$Tomorrow",
                 "name": "CustomerAcceptance"
               }
             ]
           }
         ],
         "subscriptionNumber": "$SubscriptionNum"
       }
     ],
     "orderDate": "$Today"
    }