Issue
Your org uses Communications Cloud Contract Lifecycle Management (CLM) with DocuSign eSignature (vlocity_cmt managed package). The scheduled Apex class ContractEnvelopeStatusScheduler polls DocuSign for the status of sent envelopes and updates the related Salesforce records. This job can fail when many envelopes are updated at the same time.
Symptoms
vlocity_cmt.ContractEnvelopeStatusScheduler.doDocuSignEnvelopeUpdates fails.vlocity_cmt:Too Many SOQL Queries:201Root Cause
The job hits the Apex governor limit on SOQL queries for each transaction. For asynchronous Apex, such as a scheduled job, the limit is 200 SOQL queries, so the 201st query fails.
The ContractEnvelopeStatusScheduler processes envelopes one at a time. For each envelope, it gets the signed document from DocuSign and then updates several Salesforce records based on the envelope status. Depending on the status, each envelope uses about 3–5 SOQL queries. Because the query count grows with every envelope in the run, a large batch (for example, 300 or more envelopes) goes over the SOQL query limit, and the transaction fails with "Too Many SOQL Queries: 201".
This is a documented limitation: the scheduled job can fail when a large number of envelopes are updated in the same timeframe. The fix is to keep the number of envelopes in each run small.
Lower the number of envelopes that each scheduler run must process. To confirm the cause first, follow the checks below.
Confirm the cause
ContractEnvelopeStatusScheduler run.vlocity_cmt:Too Many SOQL Queries:201. If you see a different error, this article doesn't apply. Look up that error instead.Fix: Lower the envelope count for each run
Workaround: Update a single envelope manually
If an important contract document needs its status now, open the contract document and click the Update Envelope Status action. This gets the latest status of that one envelope from DocuSign without waiting for the scheduled job. The action is available only when the contract status is Awaiting Signature.
If the error persists
ContractEnvelopeStatusScheduler are active.004634137

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.