Check Entitlement API
This API retrieves all the applicable warranties and service contracts based on the user settings. The details for the Check Entitlement API are as follows:
URL: /services/apexrest/SVMXC/svmx/rest/entitlement/checkEntitlement
Type: Post method
A sample request and response for Check Entitlement is explained as follows:
Sample Request:
In the following request "accountId","warrantyFields", and "serviceContractFields" attributes help customize the Entitlement engine.
accountId: Allows the user to select a specific account related to the Case object. This does not apply to the Work Order object.
warrantyFields: List of warranty fields to be displayed on the UI.
serviceContractFields: List of service contract fields to be displayed on the UI.
{
"entitlementSettings": {
"showFutureEntitlement": true,
"showExpiredEntitlement": true,
"matchLocation": false,
"matchContact": false,
"matchAccount": true,
"coveredBy": "Account",
"coverageOnTopLevelProduct": true,
"coverageOnProductLine": true,
"coverageOnProductFamily": true,
"coverageOnPartProduct": true,
"coverageOnParentProduct": true,
"coverageOnChildProduct": true,
"accountId":"001F000001Y38Lw",
"warrantyFields":["Name","SVMXC__End_Date__c","SVMXC__Exchange_type__c","SVMXC__Start_Date__c","SVMXC__Service_Template__c","SVMXC__Installed_Product__c"],
"serviceContractFields":["SVMXC__Billing_Schedule__c"]
},
"headerId": "5000G00001ZpeDN"
}
Sample Response:
{
"": true,
"meages": "Success",
"data": {
"selectedEntitlementInfo": {
"warrantyTermName": "Harley Davidson General Warranty",
"warrantyTermId": "a1QF0000004nTN6MAM",
"warrantyOrScon": "warranty",
"startDate": "2016-05-18",
"sLARecordName": null,
"sLARecordId": null,
"recordName": "WN-068226",
"recordId": "a1hF0000006MNbQIAW",
"installedBaseName": "Harley Davidson - Fatboy - 1",
"entitlementNotes": null,
"endDate": "2016-06-17",
"coveredService": null,
"coveredBy": null,
"advancedFieldList": null
},
"recordName": "00352062",
"recordID": "5000G00001ZpeDNQAZ",
"productName": "Harley Davidson - Fatboy",
"listWarranty": null,
"listServiceContract": [
{
"warrantyTermName": null,
"warrantyTermId": null,
"warrantyOrScon": "scontract",
"uniqueID": "a1B0G000005NRTzUAOAccount",
"startDate": "2016-08-21",
"sLARecordName": null,
"sLARecordId": null,
"recordName": "SCON001_21Aug",
"recordId": "a1B0G000005NRTzUAO",
"installedBaseName": null,
"entitlementNotes": null,
"endDate": "2018-08-21",
"coveredService": null,
"coveredBy": "Account",
"advancedFieldList": [
{
"value": "Annual",
"key": "SVMXC__Billing_Schedule__c"
}
]
}
],
"listDetailRecords": null,
"installedBaseName": "Harley Davidson - Fatboy - 1",
"installedBaseId": "a0HF000000aZSGyMAO",
"entitlementPerformed": true,
"entitlementHistoryMap": null,
"contactName": "Test Entitlement",
"accountName": "A00001"
}
}
Was this helpful?