Skip to content

docs(integration-toolkit): inbound payload format - #197

Merged
karlrank merged 4 commits into
mainfrom
docs/inbound-payload-format-2
Nov 27, 2026
Merged

karlrank merged 4 commits into
mainfrom
docs/inbound-payload-format-2

Conversation

@karlrank

@karlrank karlrank commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

What

Documents the new optional payload_format option ("1.0" | "2.0") on inbound use cases of the Integration Toolkit (API 1.65.0).

  • New page integrations/integration-toolkit/inbound/payload-format:
    • what the root ($) of a mapping is with 1.0 and with 2.0
    • the 2.0 envelope { kind, body, raw, original_request } and the five kinds, with examples per source
    • setting the option: absent means 1.0, no default is written into stored configurations, ignored in direct mode, not available to file imports, up to 5 minutes to take effect
    • matching the entity a managed call was made for with "unique_ids": ["_id"] and _id from original_request, with a company register lookup over an XML API as the worked example
    • pitfalls: $substringAfter/$substringBefore return the whole input when the tag is missing, string functions fail on a null raw, XML escapes are not decoded, an id that no longer exists creates an entity, and only responses below 400 are routed
    • text sent with format json that does not parse: refused with 1.0, raw with 2.0, so a 2.0 mapping checks kind
    • moving a use case from 1.0 to 2.0 (including managed call responses queued before the switch, which read like pushed events), and simulating a managed call's response with the new original_request field of the v2 mapping simulation
  • Links to the new page from Configuration (inbound use case options, managed call fields, mapping schema), Unique Identifiers (_id), Mapping and the Overview.
  • Fix: the managed call response_mapping example used data.full_name, but its input is { response, original_request }. The example now reads response.data.full_name, and the field table says what the input is.

The worked example's mapping was run through the toolkit's real extraction code (unique identifiers and entity updates) for a found response, a not-found response, an empty response and the simulation path.

Integration Hub text

The page names the Hub's Payload format setting (General card) and the Original request (optional) field on the Test tab. That UI is in an open, unmerged Integration Hub MR. Merge this PR after the Hub change ships, or drop commit 95dd0a4 first if the docs go out before it.

Not changed

  • CHANGELOG.md: written by the "epilot CI" changelog job from the API spec, so the entry will come from there.
  • API reference: the Integration Toolkit spec is loaded from https://docs.api.epilot.io/erp-integration.yaml (redoc.config.js), not kept in this repo.

Checks

  • npm run build passes (Node 20, as in CI). The [ERROR] The image at …svg can't be read lines come from existing SVGs that this PR does not touch.
  • Anchors used by the new links exist in the built pages.

🤖 Generated with Claude Code

Karl Rankla added 4 commits November 26, 2026 20:52
New Payload Format page for the payload_format option of inbound use
cases: what the root of a mapping is with 1.0 and 2.0, the 2.0 envelope
(kind, body, raw, original_request), matching the entity a managed call
was made for by _id from original_request with a company register
lookup example, JSONata pitfalls with raw, moving a use case from 1.0
to 2.0, and simulating a managed call's response with original_request.

Linked from the inbound use case options and the managed call fields
in Configuration, the _id identifier, the Mapping page and the
overview. Also corrects the managed call response_mapping example: its
input is { response, original_request }.
A managed call's inbound event is never stored for replay, so the caution described a case that cannot occur. A replayed event is mapped with the same envelope as the first time.
File imports cannot use payload format 2.0; text sent with format json that does not parse is raw under 2.0 (1.0 refuses it), so a 2.0 mapping should check kind; and a managed call response queued before switching to 2.0 is read like a pushed event.
Names the Payload format setting on the use case's General card and the Original request field on the Test tab. Depends on the Integration Hub change that adds them; drop this commit if the docs ship first.
@karlrank
karlrank merged commit f2cdfcc into main Nov 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant