Configuring Initial Sync for Actual Time Fields in Work Orders
The Appointment object is configured with Actual Start Time and Actual End Time fields in Service Board. However, the corresponding fields are not configured for the Work Order object in Salesforce. If you have a business need to track scheduled versus actual times, you can add existing fields or custom fields to the Salesforce Work Order object to configure initial and real-time sync. In Salesforce, you can configure the Actual Start Time and Actual End Time fields for the Work Order, Event, or ServiceMax Event objects.
The procedure in this topic provides an example of how to use the existing fields in the following table to configure initial sync for the Work Order object.
Platform
Object
Field Name
API Name
Data Type
Salesforce
Work Order
Actual Start
SVMXC__Actual_Onsite_Response__c
Date/Time
Actual End
SVMXC__Completed_Date_Time__c
Service Board
Job
Actual Start
dev_actual_start
Timestamp
Actual End
dev_actual_end
To configure initial sync for Actual Time fields in Jobs:
1. In Salesforce, follow the steps in Configuring Real-Time Sync to Support Custom Fields on SFDC to add the Actual Start (SVMXC__Actual_Onsite_Response__c) and Actual End (SVMXC__Completed_Date_Time__c) fields to the Work Order field set.
* 
For these two fields of the Salesforce Work Order object, there is no need to configure ISCHANGED field-level filtering.
2. In Max Designer, on the Developer Tools () launchpad menu, click Initial Sync Actions, and then in the list view, click Initial Sync Jobs.
3. On the record page, on the Overview tab, in the Query URL field, add SVMXC__Actual_Onsite_Response__c and SVMXC__Completed_Date_Time__c to the code as shown in the following example, and then in the top left corner, click Save and Close ().
/services/data/@{SFDC_RESTAPI_VER}/query?q=SELECT+id,SVMXC__Preferred_Business_Hours__c,SVMXC__SM_Life_Cycle_Status__c,SVMXC__Service_Group__c,SVMXC__SM_Lock_Appointment_Schedule__c,SVMXC__Group_Member__c,SVMXC__Company__c,SVMXC__City__c,SVMXC__Country__c,SVMXC__Contact__c,SVMXC__SM_Estimated_Duration__c,SVMXC__Service_Duration__c,SVMXC__Component__c,SVMXC__Site__c,Name,SVMXC__Zip__c,SVMXC__Preferred_Technician__c,SVMXC__Preferred_End_Time__c,SVMXC__Preferred_Start_Time__c,SVMXC__Priority__c,SVMXC__Problem_Description__c,SVMXC__Product__c,SVMXC__Primary_Territory__c,SVMXC__Purpose_of_Visit__c,SVMXC__Scheduled_Date_Time__c,SVMXC__State__c,SVMXC__Street__c,SVMXC__Order_Type__c,SVMXC__Latitude__c,SVMXC__Longitude__c,OwnerId,SVMXC__Skill_Set__c,SVMXC__Order_Status__c,SVMXC__Dispatch_Status__c,SVMXC__Actual_Onsite_Response__c,SVMXC__Completed_Date_Time__c,SVMXC__SM_Version_Number__c,CreatedById,CreatedDate,LastModifiedById,LastModifiedDate,SVMXC__Dependency_Group__c++FROM+SVMXC__Service_Order__c+WHERE+Name+!=+null+AND+SVMXC__Company__c+!=+null+AND+(SVMXC__Order_Status__c+=+'Open'+OR+SVMXC__Order_Status__c+=+'Closed')+AND+(SVMXC__Dispatch_Status__c+=+'New'+OR+SVMXC__Dispatch_Status__c+=+'Assigned')+AND+(SVMXC__SM_Integration_Source__c+=+null+OR+SVMXC__SM_Integration_Source__c+=+'Local')
4. In Max Designer, on the Developer Tools () launchpad menu, click Transform Templates, and then in the list view, click Job Initial Sync Template.
5. On the record page, on the Overview tab, in the Custom Field Mappings field, add the following code, and then in the top left corner, click Save and Close ().
"dev_actual_start": "isoDateFormat(fields.SVMXC__Actual_Onsite_Response__c)",
"dev_actual_end": "isoDateFormat(fields.SVMXC__Completed_Date_Time__c)"
For more information:
Was this helpful?