Custom plans can be created directly or by using a plan template. The billing application allows you to edit any of these custom plans directly. You have the option to edit the custom plan at the proposal or order levels, however, editing is restricted if the proposal is accepted or an order line item under an order is activated.

On a custom plan, editing is allowed at the plan header and line item level, however, there is a restriction on the number of fields that can be edited at these levels.

To Edit a Custom Plan

  1. Call the following Billing Management API,
    1. For order line items:  https://<URL_of_the_Instance>/api/billing/v1/order-line-items/custom-plans.
    2. For line items: https://<URL_of_the_Instance>/api/billing/v1/line-items/custom-plans.
  2. Enter the values for the fields to be edited from the following list in API input parameters in the payload:
    Fields on the custom plan headerFields on the line items under the plan
    • Description

    • Period needed

    • Number of Installments

    • Status

    • Period Start Date
    • Period End Date
    • Ready for Invoice Date
    • Percent
    • Payment Term
    • Milestone Expected Date
    • Comments
    The API returns the following response:
    For order line itemsFor line items
    [
      {
        "IsSuccess": true,
        "ErrorMessage": "string",
        "CustomPlanId": "string",
        "OrderLineItemId": [
          "string"
        ]
      }
    ]
    CODE


      {
        "IsSuccess": true,
        "ErrorMessage": "string",
        "CustomPlanId": "string",
        "LineItemId": [
          "string"
        ]
      }
    ]
    CODE


Suppose you created a custom plan CP-1, with the following details:

Order ID

Custom Plan ID

Name

Periods Needed

Plan Type

Based On

Number of Installments

Computation Method

Description

O-1CP-1My Custom Plan 1TrueMilestonePercentage2CustomCustom Plan

The plan line items have the following details:

Custom Plan ID

Plan line item ID

Percent

Milestone Expected Date

Ready for invoice date

Payment Term

CP-1PLI-160

01-August-2025

01-August-2025

Term 1
CP-1PLI-240

01-May-2025

01-May-2025

Term 1

You want to add one more installment with 20% of the amount and the percentage of the existing two line items to 40%. You also want to change the payment term for the first line to Term 3. On successful execution of the above API, the header and line items are as follows:

The plan header:

Order ID

Custom Plan ID

Name

Periods Needed

Plan Type

Based On

Number of Installments

Computation Method

Description

O-1CP-1My Custom Plan 1TrueMilestonePercentage3CustomCustom Plan

The plan line items:

Custom Plan ID

Plan line item ID

Percent

Milestone Expected Date

Ready for invoice date

Payment Term

Remarks

CP-1PLI-140

01-August-2025

01-August-2025

Term 3Values in the percent and payment term fields are updated for the existing line item.
CP-1PLI-240

01-May-2025

01-May-2025

Term 1Value in the percent field is updated for the existing line item.
CP-1PLI-220

01-July-2025

01-July-2025

Term 1A new line item is created.