Workday errors in plain English.

Submit an Error
errors / orchestrate / orchestrate-json-date-yucatype-string-expected

Orchestrate JSON Payload Fails: Expected YucaType String, Found PalaType DateType

✓ Verified Orchestrate 2 lookups
The error Expression must use valid type: expected YucaType String, but 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

  1. 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.
  2. 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.
  3. 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.
  4. 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.
⚡ Quick fix

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.

✓ Permanent fix

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.

Was this helpful?

Related errors