Skip to content
KiweelyKiweelyKiweely

How do I stop Orchestrate JSONPath from corrupting WIDs with spaces?

Keep WID Create Values bindings to one JSONPath block—never blank string prefixes. Use stringAtJsonPath for ids; reserve multi-block joins with spaces for display names only.

  • Checked against Workday on
  • Applies to Workday Orchestrate Create Values and JSONPath
  • 2 min read
  • Published
  • By Kiweely
On this page

Stop WID corruption from whitespace by never building reference ids with multi-block string concatenation. Workday’s Create Values step is the right tool for joining a first and last name with a space. It is the wrong place to park an empty String block in front of a Workday ID.

Build rule for reference ids

Value type Create Values pattern
Value typeDisplay name, label, message Create Values patternMultiple blocks; spaces between parts are intentional
Value typeWID, reference id, API path segment Create Values patternOne block only: prior-step value or stringAtJsonPath
Value typeOptional missing field Create Values patternPrefer stringAtJsonPathOrEmptyString or a documented default without leading or trailing spaces

Workday’s employee-data sample creates workerID by selecting the API response and applying stringAtJsonPath with path $.id. Copy that pattern for every id you later put in a Worker, Organization, or similar reference.

Prevention checklist for new orchestrations

  1. When you add a Create Values key for an id, add exactly one value block.
  2. Bind it with stringAtJsonPath (or the raw prior-step string) to a path that returns the id, such as $.id.
  3. Do not insert a blank String block “for formatting.” There is nothing to format on a WID.
  4. Keep display-name concatenations on separate keys (fullName, title) so editors never reuse that pattern on id keys.
  5. Before the first API step that emits a reference, map or log the resolved id and assert it has no leading or trailing whitespace.
  6. After any edit to that Create Values step, re-check the resolved value—not only the expression tree.

JSONPath hygiene

Use supported paths from Workday’s JSONPath support table ($.id, $.data[0].id, and similar). Avoid unsupported forms that return unexpected empties and push you toward hand-typed defaults. If you need a default when the path is missing, Workday documents stringAtJsonPathOrEmptyString and typed …WithDefault helpers—set defaults to empty or to a known valid id, never to a string that begins with a space.

Group independent Create Values keys separately from dependent ones so Orchestrate can process independent pairs in parallel, as Workday recommends. That also keeps id extraction visually separate from name joining in the canvas.

If a WID already fails at runtime with a leading space, use the symptom guide to remove the blank concatenation block and confirm the payload.

Frequently asked questions

Should I trim WIDs in a later step?

Prefer not introducing whitespace. Bind the id with a single Create Values block. Trimming can hide a bad concatenation that will return the next time someone edits the step.

Which JSONPath function should I use for a WID string?

Workday documents stringAtJsonPath for string fields. stringAtJsonPathOrEmptyString returns an empty string when the path is missing, which is safer than a spaced default.

Can Create Values process dependent keys in parallel?

Workday says independent key/value pairs can process in parallel; dependent pairs process sequentially. Group WID extractions that do not depend on each other separately from display-name joins.

Sources checked

Let Workday check the work.

Kiweely writes WQL and builds orchestrations in your own tenant, and Workday, not Kiweely, says whether they passed.

Get the next guide in your inbox.

One email a month with new guides and one Extend tip. Nothing else.

We’ll email you once to confirm. Unsubscribe in one click from any issue.