Start a conversation

getOEData Method Fails with "Illegal Value for Primitive" Error

Symptom

A custom class calling cssmgnt.API_1.getOEData(configIds) throws an "illegal value for primitive" error. This prevents order generation or other processes that depend on OE (Order Enrichment) data.

Cause

An Order Enrichment attribute defined as a primitive type (e.g., String) contains an array or object value instead of a simple primitive value. When the system attempts to parse the OE data, it encounters the type mismatch and throws an error.

This typically happens when an OE attribute is populated by an integration or plugin that sets a complex value (array/object) on what should be a simple string field.

Resolution

Step 1: Identify the failing configuration

From the error log or stack trace, identify the Product Configuration ID causing the failure.

Step 2: Examine the OE data in Solution Console

Open the basket in the Solution Console and navigate to the Order Enrichment tab. Look for attributes that display unusual values (e.g., comma-separated lists where a single value is expected).

Step 3: Identify the problematic attribute

Look for primitive type attributes (String, Number) that contain array values. For example:

{
  "name": "Proposed backhaul (From Fetch Price)",
  "type": "String",
  "value": ["HKCC-HKMI(U)", "FGCC-TPEI(U)"],
  "displayValue": ["HKCC-HKMI(U)", "FGCC-TPEI(U)"]
}

A String attribute should have a single string value, not an array.

Step 4: Correct the attribute value

Update the attribute to contain a single primitive value appropriate for its type. This can be done through the Solution Console OE editor or by updating the source integration/plugin that populates the value.

Step 5: Retry the operation

After correcting the attribute value, retry getOEData or the order generation process.

Additional Notes

  • This error can occur on any OE attribute where the stored value type does not match the declared attribute type
  • The Solution Console OE editor is the easiest way to inspect and correct individual OE attribute values
  • If the problematic value is being set by an integration, fix the integration to send primitive values for primitive-type attributes
Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Priyanka Bhotika

  2. Posted

Comments