APMCreateServiceRequest
This is a custom event that can be used to create Service Request records. The following table lists its various attributes.
Attributes
Values
Web Service Class Name
APMCreateServiceRequest
REST Endpoint URI*
http://<your salesforce org url>/services/ apexrest/SVMXC/svmx/rest/IOTServiceIntf/<name of the custom event created in IoT event setup>/2.0/
Note that this event is not available in the IoT Setup by default. You need to manually make an entry for this event with the APMCreateServiceRequest class name.
To create this event:
1. Create an event with the event name <name of the custom event created in IoT event setup> for the above webservice and associate them using the IoT Setup page. For more information, see IoT Setup.
2. Create the Installed Product Lookup configuration as required using the IoT Setup page. For more information, see IoT Setup.
3. The REST endpoint URI for this custom event will be http://<your salesforce org url>/services/apexrest/SVMXC/svmx/rest/IOTServiceIntf/<name of the custom event created in IoT event setup>/2.0/.
The event request includes various fields as a part of the Request Payload Structure. The mapping of these fields to the Service Request object fields are as below.
Fields Received in the Payload
Service Request Fields
Event > Subject
SVMXC__Subject__c
Event > Description
SVMXC__Problem_Description__c
Event > Priority
SVMXC__Priority__c
Event > AlertType
SVMXC__Type__c
Others > ServiceRequestSource
SVMXC__Service_Request_Source__c
Others > Status
SVMXC__Status__c
Others > PreferredStartTime
SVMXC__Preferred_Start_Time__c
Others > Installed Product records based on IB lookup fields
SVMXC__Product__c
SVMXC__Serial_Number__c
SVMXC__Contact__c
SVMXC__Account__c
Values for Date and Date Time fields should be in the UTC format. For example, "2016-01-30T07:38:44.268Z".
The following example shows how the various fields in a Service Request record are set when the corresponding APMCreateServiceRequest event is invoked with the following request payload.
{
"Asset": {
},
"Event": {
"Subject": "Pollution test"
"Description": Need to fix air quality"
"Priority": "Medium"
"EventTime": "2017-12-10 12: 27: 06.006"
"AlertType": "Depot Repair",
}
"Others":{
"RecordID": "a0N1I0000012BMY",
"FamilyID": "MI_OPR_REC",
"CurrentStateID": "MI_PROPOSED",
"RecommendationId": "REC-57195",
"RecommendationType": "GENERAL",
"RelatedAlert": "MI_PROPOSED",
"ConnectionType": "SVMX","
"SystemID": "XXXXXX",
"SystemName": "YYYYYY",
"AssetDescription": "thing",
"StateKey": "64255992427",
"GenerateWorkRequest": "TRUE",
"LocationID": "a2H1I000000QT4h"
}
}
Was this helpful?