AgentsDataMap

fallback_output

View as MarkdownOpen in Claude

Set a top-level fallback output used when no webhook or expression matches.

Parameters

result
FunctionResultRequired

A FunctionResult defining the fallback response.

Returns

DataMap — Self for method chaining.

Example

1from signalwire import DataMap, FunctionResult
2
3dm = DataMap("get_weather")
4dm.webhook("GET", "https://api.weather.com/v1/current?q=${args.city}")
5dm.output(FunctionResult("Weather: ${response.current.condition.text}"))
6dm.fallback_output(FunctionResult("Weather service is currently unavailable."))