integrations

simulateOutboundMapping

Changed on

Preview a poll delivery's jsonata_expression without saving or enqueueing anything. The expression is checked and evaluated exactly as at enqueue time: the same length, syntax and binding checks, the same $env/$mapValue/$mapKey bindings resolved server-side from the org's non-secret environment variables and key/value maps, the same evaluation limits, and the same rule that the output must be a JSON object.

Provide exactly one input: payload (an event to map as-is), or event_id (with event_catalog_event) to load a historical event-catalog event and hydrate it exactly as enqueue does — the preview is then exact, and the hydrated event is echoed as input.

Mapping failures are a 200 with valid: false and an error; 4xx is reserved for malformed requests. Requires the integration:view grant.

post/v1/integrations/{integrationId}/outbound/mapping-simulation

Request

  • Base URL
    https://integration-toolkit.sls.epilot.io
  • URL
    https://integration-toolkit.sls.epilot.io/v1/integrations/{integrationId}/outbound/mapping-simulation
  • Auth
    HTTP bearer

Path parameters

integrationIdstring uuid required

The integration ID

Request body

jsonata_expressionstring required

The poll mapping expression to preview

payloadobject

A standardized event-catalog event to map as-is

event_idstring

Id of a historical event-catalog event to load, hydrate and map

event_catalog_eventstring

Event-catalog event name of event_id (required with event_id)

Example request

{
  "jsonata_expression": "{ \"contract_number\": contract.contract_number, \"status\": $mapValue($env.erp.statuses, contract.status) }",
  "event_catalog_event": "contract.updated"
}

Response

Simulation outcome (mapping failures included)

validboolean required

Whether the expression produced a deliverable payload

outputobject

The payload a consumer would receive — present when valid

mapping_versionstring required

The mapping_version messages mapped by this expression carry

inputobject

The hydrated event the expression ran against — present when event_id was used

Example response

{
  "mapping_version": "3f2a9c1b7d4e8f60"
}

Changes