---
schema_version: "1"
id: 355a57210d784e05bebefb048519422505122c201ba51b4c71984f63ff4e5b16
title: API Troubleshooting
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/industries/cme/guides/comms-t-api-troubleshooting.md
canonical_url: https://developer.salesforce.com/docs/industries/cme/guide/comms-t-api-troubleshooting.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 33624ec22b4faec6e13c8fcc622c8c3c7785a793ee9c8791b609effc07293c36
products:
  - Communications, Media, Energy and Utilities APIs (Managed Package)
  - Industries Developer Documentation
---
# API Troubleshooting

Use the table in this topic to diagnose problems that occur when executing the Digital Commerce APIs.

<sfdocstbl><table><col /><col /><thead><tr><th><p>Problem Area</p></th><th><p>Possible solution</p></th></tr></thead><tbody><tr><td><p>getOffers API returns null result.</p></td><td><ul><li><p>Ensure that the ContextEligibilityGenerator and GetPrices jobs have been run.</p></li></ul></td></tr><tr><td><p>getOffers API returns "attempt to dereference null object" error.</p></td><td><ul><li><p>Ensure that all context rules are configured correctly.</p></li><li><p>Ensure that the Context dimension name and code are the same. (Only applicable for CME Fall '18 .)</p></li></ul></td></tr><tr><td><p>getOfferDetails API returning "attempt to dereference null" error.</p></td><td><ul><li><p>Ensure that all of the products in the hierarchy are active.</p></li><li><p>Ensure that the Product Hierarchy maintenance job has been run.</p></li><li><p>Ensure that the GetOffersHierarchyHelper and GetPrices jobs have been run.</p></li></ul></td></tr><tr><td><p>getOfferDetails API not returning the PriceResult node.</p></td><td><ul><li><p>Ensure that the GetPrices job has been run.</p></li><li><p>Ensure that the offer has both one-time and recurring prices defined.</p></li></ul></td></tr><tr><td><p>getOfferDetails API fails with no error in response.</p></td><td><p>Ensure that virtual products do not have any attributes assigned. Assigning attributes to virtual products results in unpredictable results when calling the Digital Commerce APIs.</p></td></tr><tr><td><p>getOfferDetails API not returning the result node.</p></td><td><p>This error is likely caused by your product not having a price list entry or your catalog does not have a Price List defined in the vlocity_cmt_DefaultPriceListId_c field.</p></td></tr><tr><td><p>GetOfferDetails API returns "Invalid context input for context key"</p></td><td><p>This error is returned when the user passes an invalid context parameter in the URL, or when the context key of cartContext, eligibilityContext, or groupContext has expired in the cachedapiresponse**c table.</p></td></tr><tr><td><p>The getOfferDetails batch job returns the following error: Too many SOQL queries.</p></td><td><p>Check the value of the batchSize parameter. Go to the Vlocity API Metadata tab, and select the record whose API name is <strong>GetOfferDetails</strong>. Ensure the value is set as follows:</p> <codeblock>{batchSize":1"}</codeblock></td></tr><tr><td><p>ConfigureOffer API returning "attempt to dereference null" error.</p></td><td><p>Ensure that the <a>CacheAPIFields</a> custom setting has been set to true. CacheAPIFields is not required for CME 103.1.14 and later versions.</p></td></tr><tr><td><p>ConfigureOffer API returning "attempt to dereference null" error for a promotion.</p></td><td><p>Ensure that the CacheAPIPartialConfigure custom setting is set.</p></td></tr><tr><td><p>The API cache batch jobs are not creating any batch records.</p></td><td><p>Ensure that the following jobs have been run:</p> <p><strong>Interface Implementation Maintenance (Restore)</strong></p> <p><strong>Interface Implementation Maintenance (Merge)</strong></p> <p>The above jobs are run by navigating to <strong>Vlocity CMT Administration</strong> > <strong>Maintenance Jobs</strong>.</p></td></tr><tr><td><p>The GetPrices batch job is not running any batch records.</p></td><td><p>Ensure that you have added a default price list to the catalog.</p></td></tr><tr><td><p>The Add To Basket API returns the following error: <strong>error: VLC-PPLAN-ERR-001 No custom setting value found for DefaultPricingPlan</strong>".</p></td><td><ul><li><p>Check the Implementation for "PricingInterface."</p></li><li><p>If the Active Implementation is "PricingPlanService," then verify that "Default Pricing Plan" exists in EPC and that it is active. Check whether the CPQ Configuration custom setting <strong>Name = DefaultPricingPlan</strong> and <strong>Value = DEFAULT_PRICING_PLAN</strong> exist.</p></li></ul></td></tr><tr><td><p>The Add To Basket API returns a time out error.</p></td><td><p>Run the following query:</p> <codeblock>SELECT count() FROM vlocity_cmt**OrderPriceAdjustment**c where vlocity_cmt**OrderItemId**c = null and vlocity_cmt**Source**c = 'Agent';</codeblock> <p>The above query should not return any rows. If the query returns rows, it is invalid data. Please investigate why these records are generated and remove them.</p></td></tr><tr><td><p>The Add To Basket API fails withError: ‘null input to JSON parser’,</p> <p>Or GetOfferDetails returns an empty response for a specific product.</p></td><td><p>Check and delete all attributes (JSONAttribute) from ‘Virtual Item’ products used as part of product hierarchies.</p> <p>JSONAttribute is not supported for Virtual Items and should not be used.</p></td></tr><tr><td><p>The API cache batch jobs are not populating the cache or the Digital Commerce APIs are returning null results.</p></td><td><p>Ensure that the CachedAPIResponse**c.Type**c pick list values are up to date. See the lists below:</p> <p>The following values are new for CME Fall '18 :</p> <ul><li><p>item</p></li><li><p>itemDetails</p></li><li><p>priceResult</p></li><li><p>catalogCtxEligibilityResult</p></li><li><p>cartContext</p></li><li><p>eligibilityContext</p></li><li><p>hierarchyResult</p></li><li><p>itemConfig</p></li><li><p>orderConfiguration</p></li></ul> <p>The following values currently exist in CME Winter '19:</p> <ul><li><p>item</p></li><li><p>itemDetails</p></li><li><p>priceResult</p></li><li><p>catalogCtxEligibilityResult</p></li><li><p>cartContext</p></li><li><p>eligibilityContext</p></li><li><p>hierarchyResult</p></li><li><p>itemConfig</p></li><li><p>orderConfiguration</p></li></ul> <p>The following values are new in CME Winter '19:</p> <ul><li><p>dataProfileResultItem</p></li><li><p>ruleSetCombinationResultItem</p></li><li><p>catalogCtxQualificationMap</p></li></ul> <p>The following values currently exist in the CME Summer '19:</p> <ul><li><p>item</p></li><li><p>itemDetails</p></li><li><p>priceResult</p></li><li><p>catalogCtxEligibilityResult</p></li><li><p>cartContext</p></li><li><p>eligibilityContext</p></li><li><p>hierarchyResult</p></li><li><p>itemConfig</p></li><li><p>orderConfiguration</p></li><li><p>dataProfileResultItem</p></li><li><p>ruleSetCombinationResultItem</p></li><li><p>catalogCtxQualificationMap</p></li></ul> <p>The following values are new in CME Summer '19:</p> <ul><li><p>groupContext</p></li><li><p>basketWrapper</p></li><li><p>assetReferenceKey</p></li></ul> <pre> <p>Digital Commerce APIs use the CachedAPIResponse**c custom object to cache responses. Like other custom objects, CachedAPIResponse\_\_c can store records until the org's data storage limit is reached.</p> </pre></td></tr><tr><td><p>Error Code: INVOKE-200, Unable to process basket operation</p></td><td><p>Ensure that you followed the Post Install Steps for CME Summer '19. Specifically, the section about adding the picklist values for the CachedAPIResponse object. For details, see <a>Post-Upgrade Steps for Winter '19 to Summer '19 for ​Salesforce Industries Communications, Media, and Energy</a>.</p></td></tr><tr><td><p>When the Vlocity API Metadata record or records return a null API Name field value and/or a null API Parameter field value, you will see a 500 response with an attempt to de-reference a null object in the response body.</p></td><td><p>Ensure that you check all the Vlocity API Metadata records, and delete the ones that have a null API Name or a null API Parameter name.</p></td></tr></tbody></table></sfdocstbl>
