Overview
Enrichment fetches additional data for each datapoint returned by the main Extract phase. For every extracted record, RWS Integration makes one or more secondary API requests and attaches the responses to the datapoint, so the rest of the integration can combine fields from both the original extraction and the enrichments. The flow becomes Extract → Enrichment → Transform → Load.When to use
Use enrichment when the main extraction returns records that are missing details available from a separate endpoint, for example fetching comments for a post, line items for an order, or address details for a customer keyed by an ID in the main list.Configuration
Each enrichment is defined by:
A query parameter pairs a value with a name. The path can then reference that name as
{{ name }}. The value can be defined in two ways:
A
Fixed value may embed {{ ... }} placeholders that are interpolated from the main extraction datapoint or another enrichment, e.g. {{ id }}. See Dynamic Parameters for more information.
Referencing other enrichments
By default every enrichment runs against the primary extraction datapoint. An enrichment can also depend on another enrichment’s response, which is useful when one request returns an ID needed to build the next request. Enable Has another enrichment as a dependency? and set the Enrichment name to the enrichment it depends on. You can then reference that enrichment’s response fields using dot notation:comments returns a post’s comments, a dependent enrichment can use its fields in query parameter values:
Dependent enrichments run after the enrichment they reference, so its data is available when the request is built.
When the request comes back with an error
The HTTP response with error status option controls what happens when an enrichment request comes back with an error status (HTTP 4xx or 5xx):
Choose Ignore error when the enrichment is optional and you would rather deliver partial data than stop the integration.
Accessing enrichment data
Enrichment responses are exposed in other sections of the integration by their enrichment name:comments returning an array:
Related
Dynamic Parameters
Interpolate values into paths, headers, and request bodies
Integration with multiple extractions
Step-by-step guide to building an enrichment integration