Requirements for Standalone Cancellation Order Products

Create a standalone cancellation order product through API in Salesforce Lightning or Salesforce Classic.

Required Editions
Available in: Salesforce Billing Winter ’21 and later

Salesforce Billing calculates canceled billings for a canceled standalone order product under the following settings.

  • The cancellation order product has a Contract Action value of Cancel.
  • The cancellation order product and related amendment order products all have a Revised Order Product field with the ID of the original order product used before any amendments or cancellations.
  • The cancellation order products and related amendment order products all have the same terminated date. The Terminated Date must be the last field you populate on each order product before you activate the cancellation order product.

You can cancel standalone order products under both legacy cancellation and LIFO cancellation.

Note

Section Title 

FieldValue
Billing FrequencyMust match the value of the Revised Order Product field
Billing Rule[Required]
Charge TypeRecurring
Revenue Recognition Rule[Required]
Tax Rule[Required]
FieldValue
Account[Required]
Effective Date[Required]
Price Book[Required]
StatusDraft
FieldValue
Billing FrequencyMust match the value of the Revised Order Product field
Billing Rule[Get value from product]
Billing Type[Required]
Billable Unit PriceRequired for invoice runs or Bill Now to pick up the order product for invoicing. We recommend calculating a value based on the formula described in Recurring Billing and Billable Unit Price.
Charge TypeRecurring
Contract ActionCancel
Default Subscription Term[Required]
End Date[Required] for termed subscriptions, omit for evergreen subscriptions
Legal EntityMust match the value of the Revised Order Product field
Order[Required]
Ordered QuantityNegative amount of the Revised Order Product field
Price Book EntryMust match the value of the Revised Order Product field
Product Subscription Type[Required]
QuantityNegative amount of the Revised Order Product field
Revenue Recognition Rule[Get value from product]
Revised Order Product[ID number for the original order product used before any amendments]
Service Date[Required]
StatusDraft
Subscription Type[Required]
Tax Rule[Get value from product]
Unit Price[Required]
Terminated Date[Set to the last day the canceled order product is billed]
Terminated Date and Contract Action fields must be populated in a separate DML after the order product is created, all other required fields are populated, and the order product is activated.
Terminated Date and Contract Action fields must be populated after the cancellation order product is created and activated. To do so:
  • Populate Terminated Date on the original order product (the one that is linked in the Revised Order Product field).
  • On the cancellation order product, populate Terminated Date and set Contract Action to Cancel.
  • Save.

Example 

1{
2"allOrNone" : true,
3"compositeRequest" : [{
4  "method" : "POST",
5  "url" : "/services/data/v48.0/sobjects/order",
6  "referenceId" : "refOrder",
7  "body" : { 
8      "Status" : "Draft" , 
9      "EffectiveDate" : "2020-06-16", 
10      "Pricebook2Id" : "Price records ID",
11      "AccountId" : "Account records ID"}
12  },{
13  "method" : "POST",
14  "url" : "/services/data/v48.0/sobjects/OrderItem",
15  "referenceId" : "refOrderItem",
16  "body" : { 
17    "Quantity" : "1", 
18    "Unitprice" : "1200",
19    "ServiceDate" : "2020-06-16", 
20    "EndDate" : "2021-06-15", 
21    "SBQQ__ChargeType__c" : "Recurring",
22    "SBQQ__BillingType__c" : "Advance",
23    "SBQQ__BillingFrequency__c" : "Monthly",
24    "blng__BillableUnitPrice__c" : "100",
25    "SBQQ__OrderedQuantity__c" : "1", 
26    "SBQQ__DefaultSubscriptionTerm__c" : "1", 
27    "SBQQ__Status__c" : "Draft", 
28    "PricebookEntryId" : "PricebookEntry records ID",
29    "SBQQ__RevisedOrderProduct__c" : "RevisedOrderProduct(original orderproduct) records ID",
30    "SBQQ__TerminatedDate__c" : "2020-08-15",
31    "SBQQ__ContractAction__c" : "Cancel",
32    "orderId" : "@{refOrder.id}"
33    }
34  }]
35}