Quick overview
This workflow receives customer support requests via a webhook, normalizes the payload, and uses an OpenRouter-powered orchestrator agent to route the request to a Billing, Technical, or Account specialist agent. It then returns a structured JSON reply to the caller or escalates to human review.
How it works
- Receives a POST webhook request containing a customer’s tier and message.
- Normalizes the incoming payload into consistent fields (requestId, customerId, customerTier, message, email, timestamp).
- Uses an OpenRouter chat model with an orchestrator agent to choose exactly one specialist (billing, technical, or account) and pass the full request to that agent tool.
- Parses the orchestrator’s JSON output into a consistent response object and flags whether routing succeeded.
- If parsing/routing fails, prepares an escalation payload for human review; otherwise keeps the specialist response.
- Responds to the webhook caller with JSON including the requestId, chosen specialist, customer-facing message, action taken, and routing reasoning.
Setup
- Add an OpenRouter API credential and select it for the orchestrator and each specialist chat model.
- Activate the workflow and copy the production webhook URL from the Webhook trigger.
- Configure your source system to POST to the webhook URL with fields like customerTier and message (optionally requestId, customerId, and email).