Skip to main content

Automate subscription cancellations, suspensions, or resumptions with Terms And Conditions order action

Zuora

Automate subscription cancellations, suspensions, or resumptions with Terms And Conditions order action

This tutorial demonstrates how to schedule a subscription cancellation by creating an order with the Terms And Conditions order action. The procedure for scheduling a suspension or resumption is similar to cancellation.

You can do this from the Zuora UI or through the REST API.

Introduction to scheduled actions for subscription automation

Zuora allows you to set the following settings in orders using the Terms And Conditions order action to cancel, suspend, or resume subscriptions automatically:

  • Scheduled cancellation date
  • Scheduled suspension date
  • Scheduled resumption date

You can specify one or more of these dates for a subscription, following these rules:

  • Each scheduled date must be in the future.
  • The scheduled cancellation date must be later than any other scheduled date.
  • The scheduled resumption date must be later than the scheduled suspension date.

When a scheduled date arrives, the system automatically creates an order with the corresponding order actions to cancel, suspend, or resume the existing subscription.

Schedule a subscription cancellation using the Zuora UI

To schedule a subscription cancellation, perform the following steps:

  1. Navigate to Customers > Subscriptions in the left navigation menu.
  2. Locate the subscription you want to cancel and click the subscription number. The subscription detail page opens.
  3. Click the more actions icon-more-options-white-background.png icon in the upper right and then click Schedule Cancellation, Suspension or Resumption. The Scheduled Actions dialog opens.
  4. Specify a cancellation date in the Cancel On field. The date must be greater than today.
    If you want to suspend or resume the subscription at a future date, specify the date in the Suspend On or Resume On field. When specifying multiple scheduled dates for a subscription, the date values must follow the rules described in Introduction to scheduled actions for subscription automation.
  5. Click Save. A new order with the Terms And Conditions order action is created.

Alternatively, you can schedule a subscription cancellation by manually creating an order with the Terms And Conditions order action. For more information, see Change terms and conditions of subscriptions.

View scheduled dates of a subscription using the Zuora UI

To view the scheduled dates of a subscription, perform the following steps:

  1. Navigate to Customers > Subscriptions in the left navigation menu.
  2. Locate the subscription you want to view and click the subscription number. The subscription detail page opens.
  3. Scroll to the Subscription Change History section and view the scheduled dates in Subscription Upcoming Changes.

Update scheduled dates of a subscription using the Zuora UI

If you want to update or remove the scheduled dates of a subscription, perform the following steps:

  1. Navigate to Customers > Subscriptions in the left navigation menu.
  2. Locate the subscription you want to update and click the subscription number. The subscription detail page opens.
  3. Click the more actions icon-more-options-white-background.png icon in the upper right and then click Update Schedule Cancellation, Suspension or Resumption. The Update Scheduled Actions dialog opens.
  4. Update or remove the scheduled dates.
    When specifying multiple scheduled dates for a subscription, the date values must follow the rules described in Introduction to scheduled actions for subscription automation.
  5. Click Save. A new order with the Terms And Conditions order action is created.

Alternatively, you can update or remove the scheduled dates of a subscription by manually creating an order with the Terms And Conditions order action. For more information, see Change terms and conditions of subscriptions.

Schedule a subscription cancellation using the REST API

You can use the Create an order API operation to schedule a subscription cancellation.

To create an order with the Terms And Conditions order action for cancelling a subscription on a scheduled date, perform the following steps:

  1. Determine the values of the following variables:
    Variable Description
    $AccountNum The number of the account that will own the order. For example, A00000001.
    $Today Today's date. For example, 2025-02-12.
    $SubscriptionNum The number of the subscription to cancel. For example, A-S00000001.
    $ScheduledCancelDate The date to cancel the subscription. For example, 2025-04-01.
  2. Use the 'Create an order' API operation to create an order for the existing subscription. The following is a request example:
    Request POST /v1/orders/
    Request Body
    {
        "existingAccountNumber": "$AccountNum",
        "orderDate": "$Today",
        "subscriptions": [
            {
                "subscriptionNumber": "$SubscriptionNum",
                "orderActions": [
                    {
                        "type": "TermsAndConditions",
                        "termsAndConditions": {
                            "scheduledCancelDate": "$ScheduledCancelDate"
                        }
                    }
                ]
            }
        ]
    }
    

    If you want to suspend or resume the subscription on a future date, specify the date in the scheduledSuspendDate or scheduledResumeDate field. When specifying multiple scheduled dates in the same order action, the date values must follow the rules described in Introduction to scheduled actions for subscription automation.