Skip to main content

Create subscriptions

Zuora

Create subscriptions

This tutorial demonstrates how to create a subscription by creating an order. 

You can use either UI or API to subscribe to a product rate plan during subscription creation in an order. However, you can only use API to subscribe to an offer during subscription creation. 

You will set the duration of the first term to be 12 months. You will also set the duration of the renewal term to be 12 months. In this tutorial, you will set the following dates to today's date:

  • The date when the order is signed
  • The contract effective date of the subscription
  • The service activation date of the subscription
  • The customer acceptance date of the subscription
  • The start date of the first term of the subscription

Create a subscription using the Zuora UI

To create a subscription by creating an order in the Zuora application:

  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 order. By default, the account that owns the order will also own the subscription. If you want to set a different account as the subscription owner, you can do it in Step 6.

    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 complete account number.
  4. In the Order Date field, enter the order date you are to assign to the order.

  5. Choose what you want to do by clicking Create a New Subscription.

  6. In the Create a New Subscription area, complete the following steps:

    For more information, see Basic information for subscriptionsInvoice subscriptions separately, and Renew subscriptions automatically.

    1. In the Subscription Overview section, to set another account as the subscription owner, specify the account in the Subscription Owner field. 

    2. In the Terms and Conditions section, enter 12 in the Initial term and Renewal term fields.

    3. In the Trigger Dates section, specify the appropriate dates in the Contract effective, Service activation, and Customer acceptance fields for the subscription. For more information, see Billing Trigger Dates.

    4. (Optional): In the Custom Fields section, enter the reason for creating the subscription in the Change Reason field.

  7. Click Continue.

  8. In the Products and charges area, search and locate the product to be added by performing one of the following steps:

    • You can choose one of your recently added products by placing your cursor in the search field. If the recently added products are displayed in a drop-down list (maximum eight), choose one from the list. Note that the recently added products mean the products you selected and then clicked Add Product in the bottom right corner in your previous order actions, no matter whether your previous order actions are completed.

      Recently added products.png
    • 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. Note that the default product and charge list displays a maximum of 30 products in the UI. After a search, a maximum of 20 products are displayed on each page of your search result.

      SearchProduct.png

  9. To add a 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.

    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.

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

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

  12. Click Review Order. The Review Order page opens. The operations that you can perform on the subscription are listed to the right of the new subscription name.

    previewsubscription2.png

  13. To change the subscription name, complete the following steps:

    1. In the Associated subscriptions area, click More Order Actions and then click Edit subscription name.

      EditSubscriptionName.png

    2. In the Subscription name field, enter the subscription name and then click Save.

      newsubscriptionname.png

  14. (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.

  15. Click Activate to activate the subscription.

Create a subscription using the REST API

You can use the Create an order operation to create a subscription.

In the subscription, you can subscribe to a product rate plan or product offer.

When subscribing to a product offer, you can also override the existing rate plans or rate plan charges, or both in the offer with new ones.

Create a subscription and subscribe to a product rate plan

The subscribeToRatePlans field is deprecating, you are recommended to use the subscribeToProducts field instead. You can use either the subscribeToRatePlans or subscribeToProductsfield, but not both.

Before the Orders feature is enabled, you would have used the "Create subscription", "Subscribe", or "Create account" operation.

To create a subscription and subscribe to a product rate plan 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 and the subscription. 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.

    $ProductRPId The ID of the product rate plan to subscribe to. For example, 2c92c0f85e5019d7015e513826e650f7.
    $Today Today's date. For example, 2017-09-30.
  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": [
        {
          "orderActions": [
            {
              "type": "CreateSubscription",
              "triggerDates": [
                {
                  "name": "ContractEffective",
                  "triggerDate": "$Today"
                },
                {
                  "name": "ServiceActivation",
                  "triggerDate": "$Today"
                },
                {
                  "name": "CustomerAcceptance",
                  "triggerDate": "$Today"
                }
              ],
              "createSubscription": {
                "terms": {
                  "initialTerm": {
                    "startDate": "$Today",
                    "period": 12,
                    "periodType": "Month",
                    "termType": "TERMED"
                  },
                  "renewalSetting": "RENEW_WITH_SPECIFIC_TERM",
                  "renewalTerms": [
                    {
                      "period": 12,
                      "periodType": "Month"
                    }
                  ]
                },
                "subscribeToRatePlans": [
                  {
                    "productRatePlanId": "$ProductRPId"
                  }
                ]
              }
            }
          ]
        }
      ],
      "processingOptions": {
        "runBilling": false,
        "collectPayment": false
      }
    }
    

     To preview invoices for the new subscription, use the "Preview order" operation.

Create a subscription and subscribe to a product rate plan or product offer

To create a subscription and subscribe to a product offer 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 and the subscription. 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.

    $productOfferNum The number of the product offer to subscribe to. For example, OF-00000002.
    $Today Today's date. For example, 2023-03-01.
  2. If you want to override the existing rate plan and rate plan charge in the offer, you also need to determine the values of the following variables:

    Variable Description
    $productRatePlanId The ID of a product rate plan to override the existing rate plan in the offer. For example, 40288186859a602601859aa873e219e3.
    $productRatePlanChargeId The ID of a product rate plan charge to override the existing rate plan charge in the offer. For example, 402880e684748f78018475514bdc04be.
  3. Use the "Create an order" operation to create an order under an existing account.

    Request POST /v1/orders/
    Request Body
    {
        "existingAccountNumber": "$AccountNum",
        "subscriptions": [
            {
                "orderActions": [
                    {
                        "createSubscription": {
                            "terms": {
                                "initialTerm": {
                                    "period": 4,
                                    "periodType": "Week",
                                    "termType": "TERMED",
                                    "startDate": "$Today"
                                },
                                "renewalSetting": "RENEW_WITH_SPECIFIC_TERM",
                                "renewalTerms": [
                                    {
                                        "period": 4,
                                        "periodType": "Week"
                                    }
                                ],
                                "autoRenew": true
                            },
                            "subscribeToProducts": [
                                {
                                    "productOfferNumber": "productOfferNum",
                                    "ratePlanOverrides": [
                                        {
                                            "productRatePlanId": "$productRatePlanId",
                                            "customFields": {
                                                "testsrp__c": "test"
                                            },
                                            "chargeOverrides": [
                                                {
                                                    "productRatePlanChargeId": "$productRatePlanChargeId",
                                                    "pricing": {
                                                        "recurringFlatFee": {
                                                            "listPrice": 444
                                                        }
                                                    },
                                                    "startDate": {
                                                        "triggerEvent": "SpecificDate",
                                                        "specificTriggerDate": "$Today"
                                                    },
                                                    "endDate": {
                                                        "endDateCondition": "Subscription_End"
                                                    }
                                                }
                                            ]
                                        }
                                    ]
                                }]
                            },
                            "type": "CreateSubscription",
                            "triggerDates": [
                                {
                                    "triggerDate": "$Today",
                                    "name": "ContractEffective"
                                },
                                {
                                    "triggerDate": "$Today",
                                    "name": "ServiceActivation"
                                },
                                {
                                    "triggerDate": "$Today",
                                    "name": "CustomerAcceptance"
                                }
                            ]
                        }
                    ]
                }
            ],
            "orderDate": "$Today"
        }