Initial Sync Known Errors
Incomplete Work Order Sync to Service Board
If the Job and Work Order count from initial sync test results do not match, the cause is typically that status mapping settings in transform templates do not properly map to Max. Another typical reason for this issue is that no default status is specified to be used when mappings are missing.
In the application logs, the following warning messages appear:
2019-06-04 14:07:44,108 WARN [Data Sync] [pool-28-thread-2 - svmx_init_sync_job] The status of job record a1g2E000007I3T0QAK is not set, will not be init-synced. 2019-06-04 14:07:44,110 WARN [Data Sync] [pool-28-thread-2 - svmx_init_sync_job] The status of job record a1g2E000007I3aYQAS is not set, will not be init-synced.
Work Order Sync Fails to Create Job Requirement
If Job Requirement records are not properly created in Service Board during initial or real-time sync, the reason can be invalid JSON syntax in the Skill Set field in Salesforce Work Order records, which generates an error, for example:
189-thread-1 - svmx_sfdc_sync_to_dc_with_emp - svmx_sync_job_update_event - svmx_auto_maintain_job_requirements] Failed to create Job Requirements due to invalid Skill Set value: groovy.json.JsonException: expecting '}' or ',' but got current char 'S' with an int value of 83??The current character read is 'S' with an int value of 83?expecting '}' or ',' but got current char 'S' with an int value of 83?line number 1?index number 23?
The cause of this error is that the Skill Set field in a Salesforce Work Order record is configured with JSON that includes an extra quote (") character in the skillName code line:
{"skillName":"453564179151 - IV DSPL 19" Medical Grade w Touch New"}
Error 1
2019-09-09 04:54:59,073 ERROR [Data Sync] [pool-1190-thread-11] Validation Failed for svmx_installed_product record: object: svmx_installed_product | record ID: 81efcd5f-645c-467b-9c47-36d9a84ec23e | record identifier: 71252647 external id: a2W0L000009ujnWUAQ because of errors: Field : dev_priority[Inactive option ae945fa257354486c93ebdba9bd4e2147 cannot be assigned to field Priority.]
In the example, option ae945fa257354486c93ebdba9bd4e2147 is inactive on the SFDC side. Before initial sync runs, you must activate this field option on the Salesforce side, or bypass validation of the associated field (dev_priority in the example) on the Service Board side.
To bypass validation on the Service Board side:
1. In
Max Designer, on the
Developer Tools (
) launchpad menu, click
Fields, and then in the list view, open the relevant field of the
Installed Product object (for example,
Priority).
2. On the record page, on the
Overview tab, select the
Bypass Data Validation check box, and then click
Save and Close (
).
3. On the
Development Actions (
) launchpad menu, click
Synchronize.
Error 2
(RuntimeError) Error when calculating field svmx_appointment.test_priority: Error while setting value to the field: Priority. Error getting Option canonical value from UUID, couldn't find option with value:TEST_Option
In the example, the test_priority field is a calculated field with the Option List data type. During initial sync, records that have this field with a calculated value that is not Option trigger this error. To resolve the issue, you must manually add the value before initial sync runs.
To manually add values to calculated fields:
1. In
Max Designer, on the
Developer Tools (
) launchpad menu, click
Fields, and then in the list, open the
Priority field used by the
Appointment object.
2. On the
Option for Option List Field tab, configure the relevant
Option value, and then in the top left corner, click
Save (
).
3. On the
Development Actions (
) launchpad menu, click
Synchronize.
Error 3
([{"exception":"java.lang.RuntimeException: com.servicemax.dc.exception.IntegrationException: Request failed with url /services/data/v47.0/query?q=select+LanguageLocaleKey,TimeZoneSidKey+from+Organization, the status is 401 Response is: [{\"message\":\"This session is not valid for use with the REST API\",\"errorCode\":\"INVALID_SESSION_ID\"}]",
This error occurs when the Salesforce integration user profile configured in System Settings does not have access to Service Board.
To grant access to Service Board:
• In Salesforce, edit the integration user's profile or permission set to grant access to the Service Board connected app.
Error 4
java.util.concurrent.ExecutionException: groovy.text.TemplateExecutionException: Template execution error at line 1:...
Caused by: java.lang.NullPointerException: Cannot get property 'SVMX_xxx__c' on null object
... 17 more
This error occurs when custom fields are added to the Custom Field Mappings field of the transform template associated with the relevant initial sync action, but are not added to the Query URL field of the related initial sync action.
To resolve Error 4:
1. In the relevant Initial Sync Action record, in the Query URL field, add the missing custom field.
2. Run an initial sync test to check if the configured initial sync action query code has other issues before you re-run initial sync.
Error 5
Request failed with url /services/data/v49.0/query/01g4F00000kNqa0QAC-477000, the status is 400 Response is: [{"message":"invalid query locator","errorCode":"INVALID_QUERY_LOCATOR"}]
This error occurs when Salesforce users have more than 10 query cursors open at the same time. This hard-coded limit cannot be increased. For more details, see
https://help.salesforce.com/articleView?id=000323582&language=en_US&type=1&mode=1To resolve Error 5:
• Do any of the following:
◦ Reduce the Record Fetch Size value, which might help Service Board request records from Salesforce more frequently.
| This value also depends on the Service Board load. |
◦ Increase the Processing Threads value so that Service Board opens more data-processing threads to process data, which can shorten Salesforce request times.
◦ If the Query URL SOQL code includes OR or IN queries, split the conditions to create multiple Initial Sync Actions. If any sync action fails, you can then rerun only the initial sync for the relevant record without the need to sync all records again, for example:
/services/data/@{SFDC_RESTAPI_VER}/query?q=select+id,GS_Preferred_Level__c,OwnerId,name,+SVMXC__Group_Member__c+,+SVMXC__Preference_Type__c+,SVMXC__Company__c,SVMXC__Component__c,SVMXC__Site__c,CreatedById+from+SVMXC__Resource_Preference__c+where+SVMXC__Group_Member__c+!=NULL+AND+SVMXC__Component__r.GS_Installed_At_Country__c+IN+('France','Uruguay')
You can rewrite the Query URL code to create two actions as follows:
/services/data/@{SFDC_RESTAPI_VER}/query?q=select+id,GS_Preferred_Level__c,OwnerId,name,+SVMXC__Group_Member__c+,+SVMXC__Preference_Type__c+,SVMXC__Company__c,SVMXC__Component__c,SVMXC__Site__c,CreatedById+from+SVMXC__Resource_Preference__c+where+SVMXC__Group_Member__c+!=NULL+AND+SVMXC__Component__r.GS_Installed_At_Country__c+IN+'France'
/services/data/@{SFDC_RESTAPI_VER}/query?q=select+id,GS_Preferred_Level__c,OwnerId,name,+SVMXC__Group_Member__c+,+SVMXC__Preference_Type__c+,SVMXC__Company__c,SVMXC__Component__c,SVMXC__Site__c,CreatedById+from+SVMXC__Resource_Preference__c+where+SVMXC__Group_Member__c+!=NULL+AND+SVMXC__Component__r.GS_Installed_At_Country__c+IN+'Uruguay'
Error 6
2019-06-04 14:07:44,108 WARN [Data Sync] [pool-28-thread-2 - svmx_init_sync_job] The status of job record a1g2E000007I3T0QAK is not set, will not be init-synced.
2019-06-04 14:07:44,110 WARN [Data Sync] [pool-28-thread-2 - svmx_init_sync_job] The status of job record a1g2E000007I3aYQAS is not set, will not be init-synced.
This error appears in application logs when Initial Sync Jobs or a custom initial sync action for the Job object runs, but Job records are not properly synched to Service Board. The issue is triggered in cases where Job records have no Status field value for one of the following reasons:
• The SVMXC__Dispatch_Status__c and SVMXC__Order_Status__c fields are not configured in the Query URL field of Initial Sync Jobs or a custom initial sync action for the Job object.
• SVMXC__Dispatch_Status__c and SVMXC__Order_Status__c field values do not meet the conditions specified in the mappingStatus transform function. For example, in the following field mapping configuration, if the value of SVMXC__Dispatch_Status__c is Completed and the value of SVMXC__Order_Status__c is Assigned, the conditions specified in the mappingStatus transform function are not met, and no svmx_workflow field value is set.
"svmx_workflow": "mappingStatus(SVMXC__Dispatch_Status__c, SVMXC__Order_Status__c, [[\"StatusOne\": \"New\",\"StatusTwo\":null, \"MappedStatus\":\"New\"],[\"StatusOne\":\"Assigned\",\"StatusTwo\":\"Open\", \"MappedStatus\":\"Dispatched\"],[\"StatusOne\": \"Assigned\",\"StatusTwo\":\"Closed\", \"MappedStatus\":\"Closed\"]])"
To resolve the error, check that the SVMXC__Dispatch_Status__c and SVMXC__Order_Status__c fields are configured in the Query URL field of Initial Sync Jobs or the relevant custom initial sync action for the Job object, and that the values of these two fields meet the conditions specified in the mappingStatus transform function.
Error 7
This error occurs during initial sync for objects with very high data volumes and multiple Relationship fields. In some cases, initial sync speed can slow significantly, and a DeadlockLoserDataAccessException error appears in the backend log, for example:
Transaction was not committed, because of org.springframework.dao.DeadlockLoserDataAccessException: PreparedStatementCallback; SQL [insert into core_account(io_path,core_account_type,io_created_by,io_package,core_industry,core_fax,io_updated_by,io_custodian,io_active,io_release_status,core_phone,core_name,core_account_number,io_private,core_address_street,io_short_description,io_custodian_change_policy,core_address_city,io_release,io_update_version,core_address_geocode,esmx_country,io_external_id,io_created_on,io_uuid,core_address_postal_code,core_website,core_parent_account,core_employees,core_primary_contact,io_updated_on,io_description,core_address,io_deleted,io_application,io_documentation,core_address_country,core_address_state,io_owner,svmx_preferred_technician) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)]; ERROR: deadlock detected? Detail: Process 29332 waits for ShareLock on transaction 51600659; blocked by process 29616.?Process 29616 waits for ShareLock on transaction 51600634; blocked by process 29332.? Hint: See server log for query details.? Where: while inserting index tuple (507,37) in relation \"u_12261576dbda434e998110113cc43d68_ce6209e1cfc9474d9e2cacb39331\";
This issue is caused when initial sync runs in parallel in back-end operations. When records in different threads reference the same master object record that is not in Service Board, on-demand sync of the relevant Salesforce master object record is triggered. In cases where this occurs simultaneously in multiple threads, the DeadlockLoserDataAccessException error appears and triggers Service Board to retry initial sync, and sync speed is very slow.
To resolve this error, in the relevant Initial Sync Action record, reduce the configured Record Fetch Size and Processing Threads field values, for example, 300 for Record Fetch Size and 3 for Processing Threads.
For more information: