Orchestrate JSON Payload Fails: Expected YucaType String, Found PalaType DateType
What it means
An Orchestrate workflow is trying to build a JSON payload for an outbound API call and one of the fields is a Date value. The JSON builder only accepts String, Boolean, or Number typed values, so passing a raw Date field directly into the payload fails type validation before the request is ever sent.
Troubleshooting
- Open the failing step's expression editor and identify which field in the Create JSON step is bound directly to a Date-typed model field.
- Confirm the error text names the field's underlying type as PalaType DateType and the expected type as YucaType String, this combination always means a raw date object was passed where a string was expected.
- Check whether the field was passed as-is (e.g. date-now) versus converted (e.g. date-now.toString()), since only the converted form is accepted by the JSON builder.
- Test the fix in isolation by building a minimal JSON payload with just the date field before re-adding the rest of the payload, to confirm the conversion is what resolves the error.
Call .toString() on the date field's expression before it goes into the Create JSON step; this casts the date to the string format the JSON builder expects.
Standardize on always converting Date and DateTime model fields to string with an explicit .toString() (or a documented date-formatting helper) anywhere they are consumed by a JSON payload builder, so this type mismatch doesn't resurface each time a new orchestration touches a date field.