Asset 360 Suite > Asset 360 for End Users > Maintenance Plans > Creating Platform Maintenance Plans Through APIs > Adding Assets to Maintenance Plan Using the Global Method
Adding Assets to Maintenance Plan Using the Global Method
The application allows you to add assets to a Maintenance Plan using the Global method with the following details.
Request Body
The following API should be populated as the request body.
{
"maintenancePlanId": "",
"maintenanceAssetDataList": [
{
"assetId": "",
"dateOfFirstWorkOrderInNextBatch": "",
"subscribedAssetId": "",
"subscribedAssetFieldName": ""
},
{
"assetId": "",
"dateOfFirstWorkOrderInNextBatch": "",
"subscribedAssetId": "",
"subscribedAssetFieldName": ""
}
]
}
Request Parameters
The following list explains the request parameters required to add assets to a Maintenance Plan.
Parameter
Mandatory (Yes/No)
Description
maintenancePlanId
Yes
The SFDC record ID of the Maintenance Plan record.
maintenanceAssetDataList: The list which will have the information of the assets which need to be converted to Maintenance Asset. The following parameters are part of the list.
assetId
Yes
The SFDC record ID of the Asset record.
dateOfFirstWorkOrderInNextBatch
No
The date of the first work order in the next batch that will be used to populate in the Maintenance Asset record.
subscribedAssetId
No
The ID of the Subscribed Asset object which needs to be copied to one of the Maintenance Asset's fields.
subscribedAssetFieldName
No
The field name on the Maintenance Asset object is a lookup to a Subscribed Asset object.
Response Body
The following API is received as the response body.
{
"success": true,
"message": "",
"errors": [],
"data": {
"maintenancePlanId": "",
"maintenanceAssetDataList": [
{
"assetId": "",
"dateOfFirstWorkOrderInNextBatch": "",
"subscribedAssetId": "",
"subscribedAssetFieldName": "",
"maintenanceAssetId": ""
},
{
"assetId": "",
"dateOfFirstWorkOrderInNextBatch": "",
"subscribedAssetId": "",
"subscribedAssetFieldName": "",
"maintenanceAssetId": ""
}
]
}
}
Response Parameters
The following list explains the response parameters.
Parameters
Description
success
The request status.
message
The status message.
errors
Error messages, if any.
data:
The set of output data for all the added maintenace assets.
maintenanceAssetDataList: The list which has the information of the assets which need to be converted to Maintenance Asset for a Maintenace Plan. The following parametrs are part of the list.
maintenancePlanId
The SFDC record ID of the Maintenance Plan record.
assetId
The SFDC record ID of the Asset record.
dateOfFirstWorkOrderInNextBatch
The date of the first work order in the next batch that is used to populate in the Maintenance Asset record.
subscribedAssetId
The ID of the Subscribed Asset object that is copied to one of the Maintenance Asset's fields.
subscribedAssetFieldName
The field name on the Maintenance Asset object is a lookup to a Subscribed Asset object.
maintenanceAssetId
The SFDC ID of the Maintenance Asset record which got created for the given Asset ID.
Was this helpful?