Asset 360 Suite > Asset 360 for End Users > Service Contracts > Service Contract Creation Using APIs > Adding Assets to Service Contract Using Apex Actions
Adding Assets to Service Contract Using Apex Actions
Parameters for Contract Line Item Data
This method creates Contract Line Items (CLIs) for the given Assets and Contract Plan by using the following parameters.
Parameters
Mandatory (Yes/No)
Description
servicePlanProductId
No
the ID of Service Contract Plan using which the CLIs need to be created.
serviceContractId
Yes
the ID of the Service Contract record.
assetDataList
Yes
list of Assets to be added to the Service Contract
Parameters for Contract Line Asset Data
Use the following parameters to get a collection of Assets linked to a Contract Plan.
Parameters
Mandatory (Yes/No)
Description
assetId
Yes
the record ID of the Asset that needs to be added as CLI. This Asset can be any Asset but should match the Product in CLI Plan. It should be in line with interactive authoring.
startDate
Yes
the Start Date of the CLI.
endDate
No
the End Date of the CLI. If not provided, the EndDate is calculated as StartDate + Duration in Plan.
pricebookEntryId
No
the pricebook Entry ID or the Product ID. If provided, use that. If not, then use it from the Service Contract's pricebook. It throws an error if the ID in pricebook is not matching.
subscriptionId
No
the ID of the Subscription object that needs to be copied to one of the CLI fields.
subscriptionFieldName
No
the field name on CLI, which is a lookup to Subscription object.
subscribedAssetId
No
the ID of the Subscription object that needs to be copied to one of the CLI's fields.
subscribedAssetFieldName
No
the field name on CLI, which is a lookup to Subscribed Asset object.
The following screen shows the parameters in an org.
Was this helpful?