Configuring Automatic Reference Resolution
During data sync, when records synced from Salesforce to Service Board reference other records that do not exist on the Max side, you can configure automatic reference resolution to bring the relevant data into Service Board. Automatic reference resolution requires an active Transform Template record with the Mapping Object value set to the relevant object and the Action value set to Create or Patch. The transform template must be used in an Initial Sync Action and cannot have an empty Query URL field.
The following steps provide an example of how to configure automatic reference resolution for a custom object (Partner) that does not exist on Service Board and is referenced by a custom Relationship field in the Job object and a corresponding custom Lookup field configured in the Salesforce Work Order object.
* 
When Salesforce Event (ServiceMax Event) records that reference Work Orders which do not exist on Service Board are synced to Service Board in real time, the references are not automatically resolved. This is treated as a configuration issue, caused by a missing real-time sync filter in the Process Builder for the Salesforce Event (ServiceMax Event) object on Salesforce. Salesforce Event (ServiceMax Event) records are ignored and Appointments are not created. A WARN entry is logged, but the Outbound Queue record for the sync operation is not marked as Failure.
Missing Assigned To Resource references in Appointment records are not resolved automatically. This means that initial sync for the Resource object must run before initial sync for the Salesforce Event object. The Salesforce Event object has an Assigned To field that is mapped to the Assigned to User field in Appointment and Service Board Event objects. Therefore, during initial sync, only the Assigned To field value is synced to Service Board. A Service Board event handler sets Assigned To Resource field values in Appointment and Event objects based on Assigned To User field values when Assigned To Resource field values are null for newly created records, or based on Assigned To User field values for updated records. However, because Salesforce Event objects do not have Assigned To Resource fields, on-demand sync for Resource records is not supported for Salesforce-to-Service Board sync of Salesforce Event records.
Bulk address resolution for Job, Resource, Appointment, and Event objects is supported, but is disabled by default. Contact ServiceMax Support to enable this option.
To configure automatic reference resolution:
1. In Max Designer, on the Developer Tools () launchpad menu, click Transform Templates, and then in the list, click Job to WorkOrder Update Template.
2. In the Transform Templates list view, in the top left corner, click Create (), and create a new Transform Template record with the following settings:
Field
Value
Name
Init Sync Partner
Mapping Object
Partner
Action
Create or Patch
Identifier
init_sync_partner
Field Mappings
Code to create a new record of the relevant custom object with the mapped fields, for example:
{
"io_uuid": "concat('external-',Id)",
"svmx_name": "Name"
}
3. On the Developer Tools () launchpad menu, click Initial Sync Actions, and then in the top left corner, click Create ().
4. Create a new Initial Sync Action record with the following settings:
Field
Value
Query URL
The URL used by Service Board to send REST API calls to Salesforce.
Transform Rules
Rules must use the newly created transform template, for example:
[
{
"id": "init_sync_partner"
}
]
5. To disable automatic reference resolution, in Direct Execution, execute the following Groovy code:
java.lang.System.setProperty('disable_ondemand_sync', 'true')
com.servicemax.dc.operation.integration.sync.OnDemandSyncService.refreshDisableFlag()
To re-enable automatic reference resolution later on, execute the same code and replace 'true' with 'false'.
* 
Automatic reference resolution should be disabled only before go-live during initial Salesforce-to-Service Board data sync. Do not disable automatic reference resolution while real-time sync is in progress in production tenants.
For more information:
Was this helpful?