Skip to main content

data_map.webhooks

NameTypeDescription
webhooksobject[]An array of objects that define external API calls.
webhooks.expressionsobjectA list of expressions to be evaluated upon matching.
webhooks.urlstringThe endpoint for the external service or API.
webhooks.headersobjectAny necessary headers for the API call.
webhooks.methodstringThe HTTP method (GET, POST, etc.) for the API call.
webhooks.outputobjectDefines the format or structure of the response from the API.
webhooks.output.actionobject[]A list of actions to be performed upon matching.
webhooks.output.responsestringA static response text or message based on the outcome of the API call.

Valid actions for output.action

NameTypeDescription
SWMLobjectA SWML object to be executed.
saystringA message to be spoken by the AI agent.
stopbooleanWhether to stop the conversation.
toggle_functionsobject[]Whether to toggle the functions on or off.
toggle_functions.activebooleanWhether to activate or deactivate the functions. Default is true
toggle_functions.functionobject[]A list of functions to toggle.
back_to_back_functionsbooleanWhether to execute functions back to back. Default is false
set_meta_dataobjectA JSON object containing any metadata, as a key-value map.
playback_bgobjectA JSON object containing the audio file to play.
playback_bg.filestringURL or filepath of the audio file to play.
playback_bg.waitbooleanWhether to wait for the audio file to finish playing before continuing. Default is false
stop_playback_bgbooleanWhether to stop the background audio file.
user_inputstringused to inject text into the users queue as if they input the data themselves.
context_switchobjectA JSON object containing the context to switch to. Default is not set.
context_switch.system_promptstringThe instructions to send to the agent. Default is not set.
context_switch.consolidatebooleanWhether to consolidate the context. Default is false
context_switch.user_promptstringA string serving as simulated user input for the AI Agent. During a context_switch in the AI's prompt, the user_prompt offers the AI pre-established context or guidance. Default is not set