Connected Field Service > Configuring Connected Field Service > Setting Up ServiceMax > Adding Parameters to ServiceMax API
  
Adding Parameters to ServiceMax API
Parameters can be added to the ServiceMax API request by overriding the createOthersInfoTable to provide additional field values to be added to the ServiceMax object. In addition, custom changes to the ServiceMax application must be made to be able to map the additional field values. This work is typically done by someone from ServiceMax working with the implementor.
Use these instructions to perform the override:
1. Open the ThingWorx Composer.
2. view the PTC.CSLM.Connector.ServiceMaxTemplate thing template.
3. Use the magnifying glass to view the createOthersInfoTable service script.
4. Highlight the script text and copy it to the clipboard.
5. Locate the PTC.CSLM.Connector.ServiceMax thing and open it for editing.
6. Click the Override and Edit button to override the createOthersInfoTable service script.
7. Paste the copied script into the scrip editor.
8. Make your changes to the script and click Done.
9. Click Save to preserve your script changes.
The following script is an example of adding extra fields.
* 
A trigger or custom event handle must exist to expose the additional fields in the ServiceMax object.
// Create the InfoTable using the appropriate data shape
var params = {
infoTableName : "InfoTable",
dataShapeName : "PTC.CSLM.Connector.ServiceMaxApiPayloadDS.OthersDS"
};
result = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params);

/*** DO NOT MAKE MODIFICATIONS ABOVE THIS LINE ***/

/*
* For version 2 of the ServiceMax API we will use the serial number to map
* requests to installed products
* If different matching is required then this section needs to be changed
* to include the field(s) configured
* for matching. Refer to the "Configuring Installed Product Lookup" in
* the ServiceMax IOT Enablement guide for details.
*
* Multiple rows can be added to the InfoTable; one for each name/value
* pair to appear in the Others section of the API payload.
* Follow the pattern below to add additional rows
*/

var othersObj = new Object();
othersObj.FieldName = "SerialNumber";
othersObj.FieldValue = dataShapeObj.AssetSerialNumber;
result.AddRow(othersObj);

/*
* Example to add more Thing properties to the InfoTable
*
* This example uses the thing name based in the dataShapeObj argument
* to look up the Thing and grab properties from it.
*
* The resulting JSON sent to the ServiceMax API looks like:
* "Others" : { "SerialNumber":"value", "IsConnected":"value",
* "LastConnection":"value" }
*/

var t = Things[dataShapeObj.AssetThingName];

var othersObj = new Object();
othersObj.FieldName = "IsConnected";
othersObj.FieldValue = t.isConnected;
result.AddRow(othersObj);

var lastConnectedUTCTime=new Date(t.lastConnection.getUTCFullYear(),
t.lastConnection.getUTCMonth(), t.lastConnection.getUTCDate(),
t.lastConnection.getUTCHours(), t.lastConnection.getUTCMinutes(),
t.lastConnection.getUTCSeconds());

var othersObj = new Object();
othersObj.FieldName = "LastConnection";
othersObj.FieldValue = dateFormat(lastConnectedUTCTime, "yyyy-MM-dd HH:mm:ss.sss");;
result.AddRow(othersObj);