Attributes
|
Values
|
---|---|
Web service Class Name
|
saveTechnicalAttributes
|
REST Endpoint URI*
|
/services/apexrest/SVMXC/technicalAttribute/v1/saveTechnicalAttributes/
|
Method
|
POST
|
* You must prefix the Salesforce instance URL or the custom URL in the request to access from an external system. For example, https://MyDomainName.my.salesforce.com/services/apexrest/SVMXC/technicalAttribute/v1/saveTechnicalAttributes/
|
Input Type
|
Field
|
Mandatory or Optional?
|
Description
|
Notes
|
||
---|---|---|---|---|---|---|
targetObject
|
Optional
|
The target object.
|
The value must be set to null.
|
|||
source
|
Mandatory
|
The source from where the technical attribute is being added.
|
The value must be set to External System.
|
|||
objectName
|
Mandatory
|
The name of the object to which the technical attribute is associated.
|
The value must be set to SVMXC__Installed_Product__c.
|
|||
assetIdentifier FieldAPIName
|
Mandatory
|
The API name of the field on the IB object that holds the unique value of the asset. For example, External Record ID
|
• This is used to recognize the IB which needs to be updated.
• If the key recordId is not populated in the request then the IB search will be on this key.
• The value must match with the IB's field API name to recognize the IB field.
• When IB data has been synchronized between
ServiceMax and the external system using a unique key, then it is recommended to use this key to recognize the matching IB.
• This key can be blank, and will not be considered when 'Installed Product Lookup" configuration is added in the IoT setup.
|
|||
attributeList
|
value
|
Mandatory
|
The most recent value of the technical attribute.
|
• When you pass "" or a null value, the technical attribute is created, but without a value.
• To clear the value, send “” or null.
• The date value must be in the format yyyy-mm-dd.
• The datetime must be in the format yyyy-mm-dd hh:mm:ss.
• Boolean must be in the true/false format.
• The value format must match the attribute datatype when updating the existing attribute.
|
||
unit
|
Optional
|
The unit of the technical attribute.
|
||||
recordName
|
Optional
|
The name of the IB for which you are creating the technical attribute.
|
||||
recordId
|
Optional
|
The record ID of the IB for which you are creating the technical attribute.
|
• You can skip the assetIdentifiers() and update the attribute value by directly passing the IB recordId in the request. The sample request is as follows:
{ "targetObject": null, "source": "External System", "objectName": "SVMXC__Installed_Product__c", "assetIdentifierFieldAPIName": "", "attributeList": [ { "value": "16", "unit": "", "recordId": "18 digit saleforce id ", "dataType": "Number", "attributeKey": "Temperature", "timeOfOccurence": "yyyy-mm-dd hh:mm:ss" } ] }
|
|||
dataType
|
Optional
|
The datatype of the technical attribute.
|
• If you do not provide the datatype, the datatype is set as text when creating missing attributes.
• The format must match: Text / Number / Picklist / Boolean / Date / Datetime.
• The API will not perform datatype validation when updating an existing attribute value.
|
|||
attributeKey
|
Mandatory
|
The unique attribute name.
|
• If the technical attribute does not exist, a new technical attribute with the provided name is created.
• If a technical attribute with the same name already exists, that technical attribute is updated.
|
|||
timeOfOccurence
|
Optional
|
Timestamp when the attribute displayed a specific value or event occurred.
|
• The format must be yyyy:mm:dd hh:mm:ss.
• If the value is not sent then the date and time when the attribute value is captured on the server is set as the time of occurrence.
|
|||
assetIdentifiers
|
Mandatory
|
Unique key and value of the IB from external system.
|
• The assetIdentifier has two parameters: identifierName and value.
◦ The "identifierName" holds the external identifier key. This is mandatory if the IB lookup configuration is present in the IoT Setup.
◦ The "value" holds the value of the key.
• Both these parameters are mandatory if the IB search is based on IB lookup configuration or the search is based on passing field API name.
• You can send one or multiple idenfierName and values. The values sent in this list will be concatenated in the order it is sent to form the unique external asset Identifier for the IB, which will be matched against the ServiceMax unique identifier field value.
|
|||
lastOccurrenceTimeList
|
Optional
|
Multiple entries for the same attributes.
|
Send the previous entries for the same attribute by passing the time of occurrence (in descending order) and the attribute value
|
• Event execution status is maintained in the IoT Events object. For more information, see Event Traceability. • The Validate External ID flow validates the unique IB External ID for a Technical Attribute and if a duplicate IB External ID is found, an error message is displayed. For more information, see Validate External ID. |