Bulk Revenue Schedule Generation (POST)

Create revenue schedules for a collection of opportunity line items.

Resource 

1connect/media/asm/actions/generate-revenue-schedules

Resource Example 

1https://YOUR_INSTANCE.salesforce.com/services/data/65.0/connect/media/asm/actions/generate-revenue-schedules

Where YOUR_INSTANCE is a variable.

Available Version 

65.0

HTTP Methods 

POST

Request Body for POST 

JSON Example 

1{
2    "endDate":"", //format dd-mm-yyyy
3    "opportunityLineItemIds":[],
4    "oppId": "53534534",
5    "calendarType": "broadcast",
6    "period":"monthly",
7    "revenueDistributionType": "prorated"
8}

Properties 

Input Representation: RevenueScheduleGenerationBulkInput

Parameter NameTypeDescriptionRequired or OptionalAvailable Version
endDateStringThe end date of the opportunity line items for which revenue schedules must be generated.Optional65.0
opportunityIdStringThe ID of the opportunity that consists of the line items for which revenue schedules must be generated.Optional65.0
opportunityLineItemListList<String>The IDs of the opportunity line items for which revenue schedules must be generated.Optional65.0
calendarTypeEnumSpecifies the type of calendar based on which revenue schedules are generated for the opportunity line items. Possible values are Broadcast and Gregorian.Required65.0
revenueSchedulePeriodTypeEnumSpecifies the type of period for which revenue schedules must be generated.Required65.0
revenueDistributionTypeEnumSpecifies the method in which the opportunity line item revenue is distributed across the schedules that must be generated.Required65.0

Response Body for POST 

JSON Example 

1{
2"status": "SUCCESS",
3"message": "Sent request for async schedule generation successfully",
4"jobId":"Id"
5}

In error scenario (when end date is missing for one or more Opportunity Products):

1{
2   "status":"FAILED",
3   "error": "Bad Request",
4   "message": "End date must be populated for all Opp Products"
5}

Properties 

Output Representation: RevenueScheduleGenerationBulk

Parameter NameTypeDescriptionRequired or OptionalAvailable Version
statusStringThe status of the asynchronous job that was executed to generate opportunity line item revenue schedules.Required65
messageStringThe message that indicates the status of the revenue schedule generation request.Optional65
errorStringThe details of the error due to which the asynchronous job that generates revenue schedules wasn’t executed.Optional65
jobUrlStringThe URL of the asynchronous job that was executed to generate opportunity line item revenue schedules.Required65

Async Output Details 

Parameter NameTypeDescriptionRequired or OptionalAvailable Version
statusStringThe status of the asynchronous job that was executed to generate opportunity line item revenue schedules.Required65.0
messageStringThe message that indicates the status of the revenue schedule generation request.Optional65.0
errorStringThe details of the error due to which the asynchronous job that generates revenue schedules wasn’t executed.Optional65.0