DCG Troubleshooting

Troubleshooting helps you resolve errors you can encounter while using the Digital Commerce Gateway.

The documentation in this section applies only to customers who have purchased the Digital Commerce Gateway license. The instructions provided don't work without the Digital Commerce Gateway license.

Attempt to reproduce your call with a simple client, such as Curl or Postman. The following example uses the Curl client on the command line (Mac OS X).

Ensure you can successfully connect to the application.

To obtain the OAuth2 JWT, review the DCG Oauth2 GuideDCG OAuth2 Setup and Usage.

Depending on the returned HTTP status code, the error can result from the client configuration, the DCG deployment, or the data itself.

The DCG application is properly configured and working. If the body contains an error, then the issue lies in the configuration of products, offers, and other products in Salesforce.

Access denied. The credentials are invalid for this endpoint. Refer to the DCG OAuth2 Setup and Usage,

If you receive code 403 from the DCG application, it generally means that there’s a problem with the configuration of your client. It can be one of the following:

  • Wrong URL / path

  • Missing or misspelled headers

  • Client IP outside access list when allow list has been configured (endpoints are opened to the world by default).

HTTP error code 429 is linked to a specific use case of DCG where the exact same call is made multiple times in parallel (same payload, method, and URL within 20 seconds) and the data is not cached on the DCG platform. When this situation happens, only the first request is processed and forwarded to the Salesforce Org. The other requests are put in waiting mode. If the forwarded request to Salesforce fails, it returns an HTTP error code 500 with the description of the error in the body.

The other waiting requests, however, do not have access to the error context except for data still missing from the cache. At this point, the requests return Error Code 429 with the message, "Retry after some time". The waiting time is no more than 20 seconds for each waiting request.

To solve this issue, it is necessary to identify and correct the initial request that returns the HTTP error code 500 (see the section below on Error Code 500). Once this request is fixed and returns a 200, then the requests returning Error Code 429 cease.

These codes generally indicate an issue with the DC API request itself or the data sets retrieved. The following sections describe the most common setup-related error messages with typical resolution actions. If the error message isn’t listed, and the issue isn’t self-explanatory, feel free to contact Customer Support or Professional Services.

  • case: {"message"}: There’s an issue with DCG Setup. Contact Customer Support.

  • case: invalid_client - invalid client credentials: The JWT public certificate in the Salesforce Connected Application doesn’t match the private key used by DCG.

    Solution: Ensure you’ve uploaded the correct public certificate for the environment (check issuer and expiration date). You can ask Customer Support to resend you the public certificate if you’re not sure.

  • case: invalid_grant - invalid assertion: The JWT public certificate is missing from the Salesforce Connected Application. Retrieve the public certificate sent by the Salesforce Customer Support team and add it to the connected application. Refer to the DCG Setup guide.

    Sample Message:

  • case: invalid_grant - user hasn't approved this consumer.

    This error can have one of the following causes:

    • The Salesforce User username is invalid (for example, a typo in the username or spaces in the username) or the Salesforce Org type is incorrect (sandbox/test vs standard/login). Ensure the username and Salesforce Org type communicated are correct.

    • The Connected Application hasn’t been properly configured. See: Preferred method: OAuth policy configuration for the Connected App.

    Sample Message:

  • case: invalid_grant - audience is invalid: The OAuth2 JWT server URL is incorrect: contact Customer Support to confirm the Salesforce Org type and domain configuration. Also, see:

    Sample Message:

  • case: invalid_client_id - client identifier invalid: This case can occur from a Salesforce Org Sandbox Refresh. If you performed a refresh, follow the instructions in DCG Connected App Setup and open a ticket with the Salesforce Industries support team to request the reintegration.

    Other than an org refresh, this case means there is an internal issue with the DCG applications configuration, so contact customer support.

    Sample Message:

  • case: HTTP ERROR 404 - Could not find a match for URL: The DCG application is misconfigured. Contact Customer Support to review the CME package installation method and Salesforce Organization type.

    Sample Message:

The DCG application is bound by multiple timeouts. The main one is the API Request Timeout of 29 seconds. No request to the DCG API takes more than 29 seconds to complete (whether successful or not).

The other timeouts to be aware of are described in the following table.

API Request TimeoutThe API Request Timeout is 29 seconds and can’t currently be changed for the DCG endpoints.
Salesforce query timeoutThe Salesforce query timeout from the Salesforce org side is 120 seconds (SOQL QUERY_TIMEOUT). It can’t be modified. The Salesforce query timeout from the DCG side is 25 seconds by default and can be changed by filing a ticket with Customer Success.
Request processing timeoutFor production (or other performance-optimized) API environments, the timeout of the processing of a request is 30 seconds. For non-production API environments, the timeout for processing of a request is 299 seconds (~5 minutes). Even if an API request times out at 29 seconds, the processing of that request can continue. But it's bound by the Salesforce query timeout.