Mapping to your schema
Two step functions do the work, both documented in full on Step Functions:Use
version: "2" for both map_fields and typecast.Give the agent your target schema
Your target schema is the thing you’d otherwise restate for every provider you map, so write it down where the agent can read it:Checklist
Before publishing a connector with a defined output schema, verify:Schema definition
Schema definition
- Target schema documented before building
- All required fields identified
- Field types specified (string, number, enum, datetime_string)
- Enum values defined with mappings
Field mapping
Field mapping
-
fieldConfigsmap all schema fields -
targetFieldKeyuses your schema names, not the provider’s - Nested paths verified against the actual response
- Enum mappings handle every provider value plus a default case
Pagination
Pagination
-
cursor.enabled: truefor list actions -
dataKeypath verified with--debug -
nextKeypath verified with--debug -
result.nextreturns the cursor for the next page - Tested against the first page, next page, last page, and empty results
Steps
Steps
-
map_fieldsstep withversion: "2" -
typecaststep withversion: "2" - Correct
dataSourcereferences between steps
Related
Build Workflow
The build and debug loop this fits into.
Step Functions
Full reference for
map_fields, typecast, and the rest.Expression Syntax
JSONPath and JEXL for the expressions in your mappings.