Creating Maintenance Plan Using the Global Method
The application allows you to create a Maintenace Plan from a given Maintenace Plan Template using the Global method with the following details.
Request Body
The following API should be populated as the request body.
{
"sourceRecordId": "",
"maintenancePlanTitle": "",
"startDate": "",
"dateOfFirstWorkOrderInNextBatch": "",
"maintenancePlanTemplateProductId": "",
"subscriptionId": "",
"subscriptionFieldName": ""
}
Request Parameters
The following list explains the request parameters required to create a Maintenace Plan record with the given Maintenace Plan Template.
P
arameters
Mandatory (Yes/No)
Description
sourceRecordId
Yes
The SFDC record Id of the Account record.
maintenancePlanTitle
No
The Maintenance Plan title of the newly created Maintenance Plan.
startDate
Yes
​The Start Date of the Maintenance Plan.
dateOfFirstWorkOrderInNextBatch
​No
The Date of the first work order in the next batch will be used to populate in the Maintenance Plan.
maintenancePlanTemplateProductId
Yes
The SFDC ID of the Product record used to find the Maintenance Plan Template using which the Maintenance Plan needs to be created.
subscriptionId
No
The ID of the Subscription object that needs to be copied to one of the Maintenance Plan's fields.
subscriptionFieldName
No
The field name on the Maintenance Plan object is a lookup to a Subscription object.
Response Body
The following API is received as the response body.
{
"success": true,
"message": "",
"data": {
"sourceRecordId": "",
"maintenancePlanTitle": "",
"startDate": "",
"dateOfFirstWorkOrderInNextBatch": "",
"maintenanceTemplateProductId": "",
"subscriptionId": "",
"subscriptionFieldName": "",
"maintenancePlanId": ""
},
"errors": []
}
Response Parameters
The following list explains the response parameters.
Parameters
Description
Success
The request status.
Message
The status message.
sourceRecordId
The SFDC record Id of the Account record provided in the request.
maintenancePlanTitle
The Maintenance Plan title of the newly created Maintenance Plan provided in the request.
startDate
The Start Date of the Maintenance Plan provided in the request.
dateOfFirstWorkOrderInNextBatch
​The Date of the first work order in the next batch will be used to populate in the Maintenance Plan as provided in the request.
maintenancePlanTemplateProductId
The SFDC ID of the Product record used to find the Maintenance Plan Template using which the Maintenance Plan needs to be created, as provided in the request.
subscriptionId
The ID of the Subscription object needs to be copied to one of the Maintenance Plan's fields as provided in the request.
subscriptionFieldName
The field name on the Maintenance Plan object is a lookup to a Subscription object as provided in the request.
maintenancePlanId
The SFDC ID of the Maintenance Plan that is created.
errors
Error messages, if any.
Was this helpful?