API Troubleshooting
Use the table in this topic to diagnose problems that occur when executing the Digital Commerce APIs.
Problem Area | Possible solution |
---|---|
getOffers API returns null result. |
|
getOffers API returns "attempt to dereference null object" error. |
|
getOfferDetails API returning "attempt to dereference null" error. |
|
getOfferDetails API not returning the PriceResult node. |
|
getOfferDetails API fails with no error in response. | 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. |
getOfferDetails API not returning the result node. | 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. |
GetOfferDetails API returns "Invalid context input for context key" | 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 cachedapiresponsec table. |
The getOfferDetails batch job returns the following error: Too many SOQL queries. | Check the value of the batchSize parameter. Go to the Vlocity API Metadata tab, and select the record whose API name is GetOfferDetails. Ensure the value is set as follows: |
ConfigureOffer API returning "attempt to dereference null" error. | Ensure that the CacheAPIFields custom setting has been set to true. CacheAPIFields is not required for CME 103.1.14 and later versions. |
ConfigureOffer API returning "attempt to dereference null" error for a promotion. | Ensure that the CacheAPIPartialConfigure custom setting is set. |
The API cache batch jobs are not creating any batch records. | Ensure that the following jobs have been run: Interface Implementation Maintenance (Restore) Interface Implementation Maintenance (Merge) The above jobs are run by navigating to Vlocity CMT Administration > Maintenance Jobs. |
The GetPrices batch job is not running any batch records. | Ensure that you have added a default price list to the catalog. |
The Add To Basket API returns the following error: error: VLC-PPLAN-ERR-001 No custom setting value found for DefaultPricingPlan". |
|
The Add To Basket API returns a time out error. | Run the following query: 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. |
The Add To Basket API fails withError: ‘null input to JSON parser’, Or GetOfferDetails returns an empty response for a specific product. | Check and delete all attributes (JSONAttribute) from ‘Virtual Item’ products used as part of product hierarchies. JSONAttribute is not supported for Virtual Items and should not be used. |
The API cache batch jobs are not populating the cache or the Digital Commerce APIs are returning null results. | Ensure that the CachedAPIResponsec.Typec pick list values are up to date. See the lists below: The following values are new for CME Fall '18 :
The following values currently exist in CME Winter '19:
The following values are new in CME Winter '19:
The following values currently exist in the CME Summer '19:
The following values are new in CME Summer '19:
|
Error Code: INVOKE-200, Unable to process basket operation | 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 Post-Upgrade Steps for Winter '19 to Summer '19 for Salesforce Industries Communications, Media, and Energy. |
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. | 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. |