Map to Object
To configure the Map to Object tab:
1. Select the Map to Object tab. You can perform the following actions on this page.
2. Add a new event by clicking Add:
a. Double-click in the Event Name field of the resulting row to specify the event name. Ensure that you do not specify an event name that already exists.
b. Double-click the Description field of the resulting row to enter a description for the event.
c. Click Select in the Object field of the resulting row to create the event. The Create Event pop-up window is displayed as shown in the following screenshot:
3. Perform the following steps to add the event information:
a. Select an object in the Select Object drop-down box: Case, Work Order, Service Request, or Installed Product.
b. Click Add to add field information.
c. In the row under the Field Name column, select the field name. Note that the field name selections change based on the object you have selected.
d. In the row under the Lookup Field ID column, select the field ID for the field name you have selected in the previous column. Note: This field will have “N/A” pre-populated if the field name is not a lookup.
e. In the row under the Field Key column, enter the field key corresponding to the field name you have selected.
f. You can enter multiple field name-key combinations by adding rows and specifying the information.
g. Ensure that you do not select duplicate field names, and also do not leave any field blank. An error is displayed in such scenarios, and you will not be able to save the event.
h. Click Apply after you have added all the event information. The Create Event pop-up window closes, and the event you have created is listed in the Map - Object section of the IoT Event Setup page. If you close the window without clicking Apply, information will not be saved.
4. You can edit the event by clicking on the object name. The field name and field value can be updated, added, or deleted. You can also change the object by clicking the Object field and specifying the required Object details. Click Apply followed by Save to save the updated event details.
5. Delete an event by clicking Delete.
6. Save changes by clicking Save at the top right of the screen. Ensure that information is specified in all the fields. An error is displayed if a value is missing in any of the fields. Click Cancel to discard the changes made.
7. Go back to the ServiceMax Setup Home page by clicking Back to Setup Home at the top left corner.
Points to Consider
The following points should be considered while passing values for custom events through REST API:
Values for Asset, Event, and Others are optional. The values you pass in the CustomEvent fields are updated if is created.Note: Values for Others are mandatory if the Installed Product Lookup configuration has to be respected.
The lookup ID field is not mandatory. The ID is considered as the first preference to find and update existing records if the ID is mapped, has been provided in the request, and is found in the Org.
If the ID is invalid, an error message is displayed that the record is not found.
If ID is not provided and externalId is provided, it will be considered the same as the ID.
If more than one externalID is present, they will be processed one by one to find the record and then update it.
New records are created if values are not given in the request for both the ID and externalID fields.
While updating a Work Order, Case, Service Request, or Installed Product record, the search order for finding the records is :
Id
Name
externalId 1, 2 ... n
The engine will look for the ID value first. If the ID value is unavailable in the payload structure, it will look for the Name value. If the Name value is also unavailable, it will look for the extenralID values.
Installed Product lookup will only be considered if you have configured the Installed Product reference field while creating the event in the Map to Object IoT Setup page.
If both ID and externalID values are not available, then the engine will look for the Installed Product Lookup configuration done in the IoT Setup page.
An error message is displayed if the engine fails to find a record for an invalid value.
If you provide values for the non-editable fields of any object, it will display an error message.
You can clear the mapping of a field by passing a NULL value.
Ensure the values you pass for Number fields do not contain special characters.
Values for the Date and Date Time fields should be in the UTC format. For example, "2016-01-30T07:38:44.268Z".
Date and Date Time values you pass in the payload structure will be saved as is.
Was this helpful?