Create Standalone Billing Schedules (POST)

Generate billing schedules from any internal or external transaction by using context service.

You can create a billing schedule from any sObject such as WorkOrder, Cart, Order, Opportunity, and insurance policy. Or, you can also generate billing schedules from order items.

The Create Standalone Billing Schedules (POST) API uses the StandaloneBillingContext context definition to hydrate the context of the transaction. The context definition includes these mappings.

  • The TransactionMapping maps the fields of the transaction to the attributes of the Transaction node.
  • The BSGEntitiesMapping maps the attributes of the Billing Schedule node, the Billing Schedule Group node, and Billing Schedule Group Relationship node to the fields of the corresponding Salesforce objects.

For the StandaloneBillingContext context definition to hydrate all the required data, transaction data for the mandatory context tags are required. Here are the topics that mention the mandatory and optional tags, sample transaction details, and sample payloads for various types of transactions.

Special Access Rules 

This API is available with the Revenue Cloud Billing license.

Resource 

1/commerce/invoicing/standalone/billing-schedules/actions/create

Resource Example 

1https://{yourInstance}.salesforce.com/services/data/v68.0/commerce/invoicing/standalone/billing-schedules/actions/create

Available Version 

64.0

HTTP Methods 

POST

Request Body for POST 

JSON Example

1{
2  "transactionDetails": "{\"nodeName\": [{\"id\":\"801Az00000aynKZIAY\", \"businessSobjectType\": \"Order\"}]}",
3  "transactionContextDetails": {
4    "contextDefinitionName": "StandaloneBillingContext",
5    "intraContextCustomMappingName": "CustomContextMapping",
6    "readContextMappingName": "OrderTransactionMapping",
7    "saveContextMappingName": "BSGEntitiesMapping"
8  }
9}

Properties

NameTypeDescriptionRequired or OptionalAvailable Version
transaction​ContextDetailsStandalone Billing Schedule Metadata Input[]Details of the context definition and its mappings that are used to hydrate the transaction data and save it in the appropriate Billing fields.Required64.0
transaction​DetailsStringInput JSON data that includes the ID of the transaction record for which the billing schedule must be created and other additional transaction details. The API request supports a single mapping ID. You can send separate requests for line items and line details by using their respective mapping IDs. However, this approach can result in duplicate billing schedules for the same line items and line details.Required64.0

Response Body for POST 

Context-Aware Billing Schedule

See Also