Create Standalone Billing Schedules Action

Creates billing schedules for internal or external transaction records by calling the Create Standalone Billing Schedules API.

This action is available in API version 64.0 and later.

See Create Standalone Billing Schedules (POST) API to know more about the mandatory and optional tags, sample transaction details, and sample payloads for various types of transactions.

Special Access Rules 

This action is available in Enterprise, Unlimited, and Developer Editions with the Revenue Cloud Billing license. To use this action, you need the Billing Operations permission set.

Supported REST HTTP Methods 

URI: /services/data/v68.0/actions/standard/createBillingSchedulesFromTrxn

Formats: JSON, XML

HTTP Methods: POST

Authentication: Authorization: Bearer TOKEN

Where TOKEN is a placeholder for your OAuth access token.

Inputs 

InputTypeDescription
contextDefinitionNamestringRequired. Name of the context definition that contains the mappings for the transaction record and billing schedules.
executeAsyncbooleanOptional. Indicates whether to process the request asynchronously (true). The default value is false (synchronous). Available in API version 68.0 and later.
readContextMappingNamestringRequired. Name of the context mapping with the mapping for the transaction.
saveContextMappingNamestringRequired. Name of the context mapping with the mapping for the billing schedule and billing schedule group. The save context mapping is used to save the billing schedule.
transactionDetailsstringRequired. A JSON string containing the ID of the transaction record that the billing schedule is created for and other additional transaction details.

Outputs 

OutputTypeDescription
requestIdstringUnique request identifier that you can use to poll the asynchronous request.
statusUrlstringStatus URL that’s used to track the operation.

Example 

POST

Here’s a sample request for the Create Billing Schedules From Transaction action.

1{
2  "inputs": [
3    {
4      "transactionDetails": "{\"Transaction\":[{\"id\":\"sampleA1\",\"ParentTransactionId\":\"sample\",\"TransactionId\":\"sampleA1\",\"RelatedTransactionId\":\"ter1\",\"StartDate\":\"2025-04-01\",\"UnitPrice\":10,\"Quantity\":1,\"TotalPrice\":90,\"BillingActionType\":\"Amend\"},{\"id\":\"sampleA2\",\"ParentTransactionId\":\"sample\",\"TransactionId\":\"sampleA2\",\"RelatedTransactionId\":\"ter1\",\"StartDate\":\"2025-03-01\",\"UnitPrice\":10,\"Quantity\":-2,\"TotalPrice\":-200,\"BillingActionType\":\"Amend\"},{\"id\":\"sampleA3\",\"ParentTransactionId\":\"sample\",\"TransactionId\":\"sampleA3\",\"RelatedTransactionId\":\"ter1\",\"StartDate\":\"2025-03-01\",\"UnitPrice\":10,\"Quantity\":-1,\"TotalPrice\":-100,\"BillingActionType\":\"Amend\"}]}",
5      "contextDefinitionName": "StandaloneBillingContext__stdctx",
6      "readContextMappingName": "TransactionMapping",
7      "saveContextMappingName": "BSGEntitiesMapping"
8    }
9  ]
10}

Here’s a sample response for the Create Billing Schedules From Transaction action.

1{
2  "actionName": "createBillingSchedulesFromTrxn",
3  "errors": null,
4  "isSuccess": true,
5  "outputValues": {
6    "requestId": "16PZ6000000CnKRMA0",
7    "statusUrl": "/services/data/v64.0/sobjects/AsyncOperationTracker/16PZ6000000CnKRMA0"
8  },
9  "sortOrder": -1,
10  "version": 1
11}