Webhook Filtering
By default, a webhook endpoint receives events from all agents in your account. Agent filtering lets you scope an endpoint to only receive events from a specific agent.Why Filter by Agent?
Common scenarios:- Multi-CRM setup different agents serve different CRMs, each needs its own webhook
- Team separation sales and support agents route to different backends
- Testing point test agent events to a staging endpoint without affecting production
Setting Up Agent Filtering
Set theagentId field when creating a webhook endpoint:
agent_sales_qualifier agent.
Example: Multi-CRM Setup
Creating Multiple Filtered Endpoints
You can create as many filtered endpoints as needed:Catch-All Endpoint
Create an endpoint withoutagentId to receive events from all agents:
Updating an Existing Endpoint’s Filter
Change the agent filter on an existing endpoint:agentId to null to remove the filter and receive events from all agents.
Combining with Event Type Filtering
Agent filtering works alongside event type filtering. The endpoint only receives events that match both criteria:- Event type is in the
eventTypesarray AND - The event’s agent matches the endpoint’s
agentId(or no agent filter is set)
Best Practices
- Use filtered endpoints for production integrations to avoid processing irrelevant events
- Keep a catch-all endpoint for monitoring and debugging
- Name your endpoints descriptively (use the
descriptionfield) so it’s clear which agent maps where - When retiring an agent, remember to delete or update its webhook endpoint