Incoming Webhook

Load data from your CRM or system when the phone rings and use it as variables in the greeting and prompt. Request, response, fallback values and statistics.

With the Incoming Webhook, your agent knows who's calling as soon as the phone rings. bhomy sends the caller's number to your URL, your system responds with data such as the name, customer number or last order, and the agent uses it as variables. That way it greets regular customers by name or knows the status of an order.

How it works

  1. A call comes in.
  2. bhomy sends a request with the call data to your URL.
  3. Your system looks up the caller and responds with a JSON object.
  4. Every field of the response is available as a variable, such as {{name}}.
  5. The agent greets the caller with the values from your response.

The webhook runs on inbound calls. For outbound calls, you pass the data directly in the context of the Outbound API.

Setting it up

  1. Open your agent and stay on the Personality tab.
  2. Open the Incoming Webhook section and switch on Webhook enabled.
  3. Choose the Method: POST or GET.
  4. Enter the Webhook URL, such as the production URL of an n8n webhook.
  5. Set the Timeout (ms). 3,000 to 5,000 milliseconds is recommended.
  6. Optional: enter HTTP Headers, such as Authorization with a secret token.
  7. Optional: define a Request Body Template. If you leave it empty, bhomy sends all available variables.
  8. Set Fallback Values in case your system doesn't respond.
  9. Check everything with Test webhook › Send test and save.

The request

Without your own template, bhomy sends these fields. With POST as JSON in the body, with GET as query parameters:

FieldContent
callIdunique ID of the call
fromNumbercaller's number in E.164 format
toNumbernumber called, in E.164 format
roomNameinternal identifier of the conversation session
participantIdentityinternal identifier of the caller in the session
assistantIdID of your agent
assistantNamename of your agent
{
  "callId": "call_8f2a1c",
  "fromNumber": "+491701234567",
  "toNumber": "+494012345678",
  "roomName": "call-8f2a1c",
  "participantIdentity": "sip_+491701234567",
  "assistantId": "6a90…",
  "assistantName": "Front desk Dr. Sommer"
}

With your own Request Body Template, you define the structure yourself and insert the fields as placeholders, for example:

{ "phone": "{{fromNumber}}", "line": "{{toNumber}}", "source": "bhomy" }

The response

Respond with status 200 and a flat JSON object. Every field becomes a variable:

{
  "name": "Anna Berger",
  "customer_number": "K-10442",
  "last_appointment": "12 October",
  "open_invoice": "no"
}

In the prompt and greeting, you use the values with double curly brackets:

Greeting: Hello {{name}}, thank you for calling. How can I help?

Timing and fallback values

The greeting waits until your webhook has responded. If your system doesn't respond with 200 or not within the timeout, bhomy tries 2 more times after a short pause. If that doesn't work either, the conversation starts with the Fallback Values. Each fallback value also applies if your response doesn't contain a field.

VariableFallbackGreeting without a response
namethere"Hello there …"

Under Missing Fallback Values, the dashboard lists every variable that appears in the prompt or greeting and has no fallback. Without a fallback and without a response, bhomy removes the placeholder.

Security

PointRecommendation
AuthenticationCheck a secret header in your system, such as Authorization: Bearer …. There are no fixed IP addresses, as the agent calls from the cloud
EncryptionUse an HTTPS address
Data minimisationOnly respond with fields the agent needs in the conversation. The agent can tell the caller anything in the response

Statistics and recent calls

Under Webhook Statistics, you see the number of calls, success rate, average response time and errors for the last 24 hours. Recent Webhook Calls shows each call individually. The statistics fill up from the first real call. If there are many errors, see Problems with webhooks.