Create future rate plans

You're viewing Apigee Edge documentation.
Go to the Apigee X documentation.
info

Introduction

After an existing rate plan is published, the only property you can change is its end date. However, you can create a new version of the plan that includes changed properties, such as changed rate plan rates. You can set up the revision to go into effect at a future date. The original rate plan ends when the revision goes into effect.

For example, suppose you created a standard rate plan that expires on December 31, 2019 and you want to replace it with another plan that goes into effect on January 1, 2020. To do that, you create a future rate plan and set it up to go into effect on January 1, 2020.

If no end date is set for the current rate plan, you can replace an existing rate plan with a future rate plan that starts as early as today. You'll need to expire the current rate plan, as described in Expire a published rate plan.

Developers are notified about the revised rate plan. Those developers who accept the original rate plan are automatically registered for the revision (but have the option of rejecting the revision).

You can create a future rate plan using the management UI or monetization API, as described in the following sections.

Creating a future rate plan using the UI

Create a future rate plan, as described below.

Edge

To create a future version of a rate plan that starts sometime after today using the Edge UI, perform the following steps.

  1. On the Rate Plans page, position your cursor within the row associated with the rate plan for which you want to create a future rate plan.
    The rate plan must have an end date.
  2. Click +Future.
  3. In the Future rate plan section, select one of the following:
    • Restart full contract period on new effective date: The future rate plan goes into effect on the effective date. The renewal term of the future rate plan is the same as for the current rate plan.
    • Deduct the time spent on previous contract from new period, on effective date: The future rate plan goes into effect on the effective date. The time spent using the current rate plan is deducted from the renewal term of the future rate plan. This means that if a developer uses the current plan for 3 months, and the renewal period is reduced by 3 months.
  4. Configure the following fields in the top panel:
    Note: Other fields are read-only.
    Field Description Default Required
    Rate plan name

    Name of your rate plan.

    Note: The name does not need to match the original rate plan name.

    Existing plan name Yes
    Start date Date the rate plan goes into effect. Enter a start date or select a date using the calendar. Today No
    End date Date the rate plan ends. To specify an end date, enable the Has End Date, toggle switch and enter an end date or select a date using the calendar.

    Note: The rate plan will be in effect until the end of the day on the date specified. If you want to expire a rate plan on December 1, 2018, for example, you should set the endDate value to 2018-11-30. In this case, the rate plan will expire at the end of the day on November 30, 2018; all requests on December 1, 2018 will be blocked.

    None No
    Visible to portals Set whether the rate plan is Public or Private. See Public versus private rate plans. Enabled No
  5. Configure fees for the rate plan. See Configuring fees.
    Note: Not applicable to adjustable notification plans.
  6. If you select a product bundle that contains more than one API product, set the following preferences in the Specific or generic rate plan section:
    Note: This step is not applicable to adjustable notification plans.
    Field Description Default
    Configure each product individually Flag that specifies whether to configure an individual rate plan for each API product. Disabled
    Configure each product's freemium offer individually Flag that specifies whether to configure a freemium plan for each API product. Disabled
    Select a product If you enable one or both of the flags, you must select each product individually from the drop-down list and configure its rate plan details.

    Note: Make sure that you configure all products in the product bundle.

    N/A
  7. Configure the rate plan details, based on the rate plan type selected:
  8. Click one of the following:
    Button Description
    Update Draft Save the rate plan as draft.

    The rate plan will not be visible to app developers until you publish it. You can edit any field in a draft rate plan.

    Publish Draft Publish the plan.

    Note: After you publish a rate plan, you can only modify the end date if it is not already set. You cannot delete a rate plan after it's published, but you can expire the rate plan and replace it with a future rate plan, as described in Expire a published rate plan.

Classic Edge (Private Cloud)

To create a future version of a rate plan that starts sometime after today using the Classic Edge UI, perform the following steps.

  1. In the package catalog, click +Future in the Draft/Future column for the rate plan that you want to replace.

    This opens a future Rate Plan window.

    The primary difference between a future rate plan window and a current rate plan window is the addition of an Existing Subscribers section.

  2. As you would for any rate plan:
    • Enter a name for the plan in the Rate Plan Name field. The name does not have to match the name of the original rate plan.
    • Configuring fees for a rate plan (optional).
    • Configure the rate plan details, based on the rate plan type selected:
    • Specify a date when the future plan goes into effect (see Publishing rate plans), and an end date (you can also select "No end date" if you don’t want the future rate plan to end on a specific date). If an end date is set for the current plan, then the effective date of the future plan should be after the end date of the current plan.
  3. In the Existing Subscribers section, select either of the following:
    • Restart full contract period on new effective date. The future rate plan goes into effect on the effective date. The renewal term of the future rate plan is the same as for the current rate plan.
    • Deduct the time spent on previous contract from new period, on effective date. The future rate plan goes into effect on the effective date. The time spent using the current rate plan is deducted from the renewal term of the future rate plan. This means that if a developer uses the current plan for 3 months, and the renewal period is reduced by 3 months.
  4. In the Effective Date field, enter a start date that occurs after the end date of the existing rate plan.

Creating a future rate plan using the API

You can create a future rate plan using the API by issuing a POST request to /organizations/{org_name}/monetization-packages/{package_id}/rate-plans/{plan_Id}/revision.

Where:

  • {org_id} is the name of the organization.
  • {package_id} is the identification of the API package.
  • {plan_Id} is the identification of the rate plan.
When you create the revision, you must specify the following properties in the request body:
  • parentRatePlan specifies the ID of the original rate plan.
  • startDate specifies the date that the new plan takes effect.

The name of the future rate plan does not have to match the name of the original plan. If you want to keep the original start date recorded for the developers, set the keepOriginalStartDate flag to true. This flag defaults to false.

For more information about the configuration settings, see Configuration settings for rate plans.

For example, the following request creates a future rate plan:

$ curl -H "Content-Type:application/json" -X POST -d \
'{ 
     "parentRatePlan": {
       "id": "monetization_package_flat_rate_card_plan_1379513833409"
     },
     "name": "Flat rate card plan",
     "developer":null,
     "developerCategory":null,
     "advance": "false",
     "currency": {
      "id" : "usd"
     },     
     "description": "Flat rate card plan",
     "displayName" : "Flat rate card plan",
     "frequencyDuration": "30",
     "frequencyDurationType": "DAY",
     "earlyTerminationFee": "10",     
     "monetizationPackage": {
      "id": "location"
     },
     "organization": {
      "id": "{org_name}"
     },
     "paymentDueDays": "30",
     "prorate": "false",
     "published": "true",
     "ratePlanDetails": [
     {
      "currency": {
       "id" : "usd"
      },
      "paymentDueDays": "30",      
      "meteringType": "UNIT",
      "organization": {
       "id": "myorg"
      },
      "ratePlanRates": [
       {
        "type": "RATECARD",
        "rate": "0.05",
        "startUnit": "0"       
       }      
      ],     
     "ratingParameter": "VOLUME",
     "type": "RATECARD"
     }],
     "recurringStartUnit": 1,
     "recurringType": "CALENDAR",
     "recurringFee": "10",
     "setUpFee": "10",
     "startDate": "2014-01-01 00:00:00",
     "type": "STANDARD"
}' \
"https://api.enterprise.apigee.com/v1/mint/organizations/{org_name}/monetization-packages/location/rate-plans/monetization_package_flat_rate_card_plan_1379513833409/revision" \
-u email:password