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.
Revenue Recognition REST API
Use REST API to call invocable methods from the Revenue Recognition Apex
class.
This object is available in API version 48.0 and later.
Supported REST HTTP Methods
- URI
- actions/custom/apex/blng__RevenueRecognition
- Formats
- JSON, XML
- HTTP Methods
- POST
- Authentication
- Bearer Token
Parameters
| Input | Details |
|---|---|
| currencyIsoCode |
|
| legalEntityID |
|
| revenueAmount |
|
| revenueRecognitionRuleId |
|
| source |
|
| sourceFieldName |
|
| startDate |
|
| endDate |
|
Response Body
| Name | Type | Definition |
|---|---|---|
| jobId | ID | The ID of the APEX job that sent your input parameters to the revenue recognition service. |
| inputValidationStatus | String | A list of input parameters that encountered validation errors. |
| totalNumberOfInputsWithErrors | Integer | The number of input parameters that the revenue recognition service couldn’t use due to errors (for example, a missing startDate, or a revenueAmount with a non-numeric character). |
| totalNumberOfInputsWithoutErrors | Integer | The number of input parameters that were successfully passed to the revenue recognition service. |
Samples
- Sample Request Body
- This payload passes a payment record to the Revenue Recognition Service. The service attempts to create a revenue schedule based off the revenue amount of $12000 and the defined revenue recognition rule.
-
1{ 2 "inputs":[ 3 { 4 "revenueAmount":"12000", 5 "currencyIsoCode":"USD", 6 "legalEntityId":"a1j5A000001P2ri", 7 "revenueRecognitionRuleId":"a2A0x000000jM6REAU", 8 "startDate":"2019-08-29", 9 "source":"a2217000000G4ecAAC", 10 "sourceFieldname":"blng__Contract__c" 11 } 12 ] 13} - Sample Response Body
- In this case, we receive a response with one error because the sample payload didn’t include a startDate variable.
-
1[ 2 { 3 "actionName" : "blng__RecognizeRevenue", 4 "errors" : null, 5 "isSuccess" : true, 6 "outputValues" : { 7 "jobId" : "7070x00000s3Ut9AAE", 8 "totalInputWithoutErrors" : "0", 9 "totalInputWithErrors" : "1", 10 "inputValidationStatus" : [ 11 [ "Queued"], 12 [ "Start date is a required field"] 13 ] 14 } 15 } 16]