Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Set Up Standalone Orders with API
| Available in: Salesforce Billing Winter ’21 and later |
Our standalone orders documentation contains required fields and setup instructions unique to standalone orders and order products. For concepts shared between standard orders and standalone orders, we provide links to the original CPQ and Billing topics.
You still need the Salesforce CPQ package installed to create standalone orders and order products. Although it doesn’t use any Salesforce CPQ features or objects, Salesforce Billing runs internal validations against the CPQ package for several features and workflows.
Create your objects by executing the following series of REST API requests in a single POST request. All object creation requests use the following endpoint, replacing VERSION with your required API version, such as v48.0 or v49.0:
1/services/data/v48.0/compositeYour JSON request must contain a compositeRequest class that defines both the order and the order item. Here’s a generic example with null values for the minimum required fields. Configurations for certain billing and order product features may require additional fields and entities.
Example
1{
2"allOrNone" : true,
3"compositeRequest" : [{
4 "method" : "POST",
5 "url" : "/services/data/VERSION/sobjects/order",
6 "referenceId" : "refOrder",
7 "body" : {
8 "Status" : "Draft" ,
9 "EffectiveDate" : ""
10 "Pricebook2Id" : "",
11 "AccountId" : ""}
12 },{
13 "method" : "POST",
14 "url" : "/services/data/VERSION/sobjects/OrderItem",
15 "referenceId" : "",
16 "body" : {
17 "Quantity" : "",
18 "Unitprice" : "",
19 "ServiceDate" : "",
20 "EndDate" : "",
21 "SBQQ__ChargeType__c" : "",
22 "blng__BillableUnitPrice__c" : "",
23 "SBQQ__OrderedQuantity__c" : "",
24 "SBQQ__Status__c" : "",
25 "PricebookEntryId" : "",
26 "orderId" : ""
27 }
28 }]
29}