CreateWorkOrder
This event is used to create Work Order records automatically. The following table lists its various attributes.
Attributes
Values
Webservice Class Name
CreateWorkOrder
REST Endpoint URI*
/services/apexrest/SVMXC/svmx/rest/IOTServiceIntf/CreateWorkOrder/2.0/
* The REST endpoint URI must be prefixed with http://<your salesforce organization url>. For example, if your Saleforce organization url is na17.salesforce.com, then CreateWorkOrder event can be invoked as http://na17.salesforce.com/services/apexrest/SVMXC/svmx/rest/IOTServiceIntf/CreateWorkOrder/2.0/.
The event request includes various fields as a part of the web service request payload. The mapping of these fields to the Work Order object fields are as below.
Fields Received in the Payload
Work Order Fields
Event > Subject
SVMXC__Special_Instructions__c
SVMXC__Problem_Description__c
Event > Description
SVMXC__Problem_Description__c
Event > AlertType
SVMXC__Problem_Description__c
Event > Property
SVMXC__Problem_Description__c
Event > EventTime
SVMXC__Problem_Description__c
Event > Priority
If value = 1 then SVMXC__Priority__c = "Low"
If value = 2 then SVMXC__Priority__c = "Medium"
If value = 3 then SVMXC__Priority__c = "High"
Asset > ThingName
SVMXC__Problem_Description__c
Others > Installed Product record identified based on External Unique Key field-value pairs
SVMXC__Component__c = Installed product’s Id
SVMXC__Product__c = Installed product’s Product
SVMXC__Company__c = Installed product’s Company (Account)
SVMXC__Contact__c = Installed product’s Contact
SVMXC__Site__c = Installed product’s Site
The value of the Problem Description field in the resulting Work Order record is set by concatenating the non-null values of Subject, Description, AlertType, Property, EventTime, and ThingName fields from the request payload in the mentioned order. In other words, WorkOrder.SVMXC__Problem_Description__c = Event.Subject + " " + Event. Description + " " + Event.AlertType + " "+ Event.Property + " " + Event.EventTime + " " + Asset.ThingName.
The contents of the Others group in the request payload are considered only when Installed Product Lookup is configured in your IoT Setup. For each of the field-values pair sent in the Others group, the corresponding field is set in the resulting Work Order record (as per the mapping above) only if there is an exact field-name match in the External Unique Key section of the Installed Product Lookup configuration. Else, the received field-value pair is ignored.
Was this helpful?