Server SDKs
Build AI agents, control calls, send messages, and more
Set a top-level fallback output used when no webhook or expression matches.
A FunctionResult defining the fallback response.
FunctionResult
DataMap — Self for method chaining.
DataMap
1import { DataMap, FunctionResult } from '@signalwire/sdk';23const dm = new DataMap('get_weather');4dm.webhook('GET', 'https://api.weather.com/v1/current?q=${args.city}');5dm.output(new FunctionResult('Weather: ${response.current.condition.text}'));6dm.fallbackOutput(new FunctionResult('Weather service is currently unavailable.'));