Overview:
The following article details common SFDC CRM-related errors that may appear in Veeva Product to Product or Internal Veeva CRM Integration jobs.
The errors can occur intermittently in these example areas:
- Engage Attendance Tracking (Engage Reporting Processes)
- Multichannel Cycle Plan (MCCP) Job - Calculation
- Veeva Align and Veeva CRM Integration - Push to CRM
- Veeva CRM and Veeva Vault Integration - CLM / Approved Email
- Offline Syncing
Root Cause:
These common errors and their root causes are as follows:
1. INVALID QUERY LOCATOR
- In the event this error appears, it is due to the CRM Integration or Connection User in use for too many CRM-Related jobs.
This involves any Veeva related Multichannel Engine related jobs, custom integration, apex jobs or any integration jobs accessing Veeva CRM such as the Push to CRM process of Veeva Align
2. Apex CPU Time Limit Exceeded
In Veeva Environments, this error may indicate the following causes:
- There are in-progress, stalled Bulk jobs in the Bulk Data Load Jobs tab
- The affected CRM Connection or Integration user who runs the job has too many Permission Sets assigned
- This issue may be caused by unoptimized custom solutions, and customization, including custom triggers, workflows, and process builders. (For example, too many queries are executed at the same time)
3. Your Query Request is Running for Too Long
-
In the event this occurs during offline syncing, navigate to Error: Your query request was running for too long - During Veeva CRM Sync
It is recommended to review the following Article in the event the Call object is affected. - In case, this error appears in the Veeva Multichannel tabs, such as the Engage Attendance Tracking tab, this can indicate existing configuration or record-related errors.
- The cause of this error may be traced back to the high amount of records of a particular object the affected functionality tries to select with a specific SOQL query.
- The error can be traced back to network connection issues
- Overall Org performance may be identified as the potential culprit which results in the timeout of the query. Apart from Salesforce-related degradation, another factor in the performance is in-progress SOQL queries. In the event, a large-scale custom integration job is scheduled, and it has stalled or stuck SOQL-related Bulk API query or operation (job), this may result in experiencing this error.
For example, an aborted Align Import from CRM job - encountering this error - can be fixed by running the timing-out SOQL query multiple times in Veeva CRM. When the query is successful in Veeva CRM once, a new Import from CRM job will be successful as well in Align.
4. ExceededQuota:ApiBatchItems Limit exceeded.
This error implies that the maximum limit of total batches (Bulk API) in 24 hours has been exceeded. This is due to the scenario when too many Bulk API jobs were executed and running at the same time, or there are fewer running Bulk API jobs processing a large amount of data.
The following article presents an example within the MCCP Admin tab:
In case, this limit is exceeded, this error may occur with any jobs which use Bulk API.
Note #1: The SFDC articles and threads below explain the error from the perspective of SFDC.
Note #2: In some cases, the CRM Integration User is referred to as the CRM Connection User.
Solution:
1. INVALID QUERY LOCATOR
- Set up more CRM Integration users and associate each of them with each job. Splitting the jobs between two or more users instead of one might resolve the error.
2. Apex CPU Time Limit Exceeded
- Abort any stuck Bulk API jobs in the Bulk Data Load Jobs tab if present.
- Remove the Permission Sets of the affected user and reorganize the permissions.
- Revise the custom solutions and customization. Debugging custom solutions is not within the scope of Veeva Product Support. See Veeva Support Ticket Priority and Service Level Agreement (SLA)
3. Your Query Request is Running for Too Long
- In the event this occurs during offline syncing, navigate to Error: Your query request was running for too long - During Veeva CRM Sync.
It is recommended to review the following article: How is Call Chunking Used to Improve CRM Query Performance? in the event the Call object is affected.
- Resolve any existing configuration errors and data-related errors related to the affected functionality.
- Remove / Archive any unneeded records of the affected object.
- Be sure to sync with a stable Internet connection.
- Navigate to Setup --> In the quick menu, Type --> Bulk Data Load jobs.
Analyze the Bulk API, CPU, IO, and Disk usage.
In the event, these values are unusually high compared to other contemporary SFDC orgs, this may cause the issue.
Be sure to check any jobs which are in progress. In the event they are stalling or stuck, take the necessary measures to abort or close them. Revise the custom integration.
Note: In the event, the affected SOQL query is executed multiple times, this can temporarily resolve the error due to the Salesforce caching mechanism.
4. ExceededQuota:ApiBatchItems Limit exceeded
- After 24 hours the Bulk API count resets itself.
Wait 24 hours and attempt to run the job again. Try executing each Bulk API job at a different time.
Related Documentation:
Salesforce Documentation:
- Invalid Query Locator
- Apex CPU Time Limit Exceeded
- Your Query Request is Running for Too Long
- ApiBatchItems Limit Exceeded
Knowledge Article Base:
- Error: Your query request was running for too long - During Veeva CRM Sync
- Error: ExceededQuota: ApiBatchItems Limit Exceeded in the Multichannel Cycle Plan Admin Console in Veeva CRM
- How is Call Chunking Used to Improve CRM Query Performance
- Veeva Support Ticket Priority and Service Level Agreement (SLA)