The On Request enrichment
Information about an enrichment you shouldn't use.
Important:
The On Request enrichment is almost never a recommended pattern. This enrichment type can make configuration performance dependent on outside systems and result in a less than ideal end user experience. Consult
Customer Success about other ways to achieve your desired outcome.
The On Request enrichment enables the same capabilities as the On Configure/Reconfigure Enrichment, except that it is called after each field change to any field in the enrichment.
In this enrichment, all external API calls time out after five seconds.
General guidelines:
- Wrap external APIs in validation logic to ensure that they are only called when absolutely necessary.
- Always validate all data required to run an API before you directly call the API.
- Use ogic to limit running external APIs.
- Make sure that any API called in an on request enrichment is able to fully run and respond quickly.
// Here we use a boolean field to delay the running of additional code if (cfgRequest.runOnRequest == true) { cfgRequest.onRequestTextField.value = "On Request Ran"; }p cfgRequest.runOnRequest = false; - Avoid non-performant or long-running APIs.