How we handle GDPR data-subject requests on a deadline
Legal
The lead-routing agent we run on Kortix — every 15 minutes it scores each new HubSpot lead, assigns it to the right rep by territory, segment, or round-robin, and notifies the rep in Slack, flagging anything ambiguous for a human instead of guessing.
A new inbound lead is worth the most in the first few minutes after it lands. Every minute it sits unassigned is a minute a rep isn't calling it, and the minute it does get routed still depends on someone checking the queue, knowing which territory owns which region, and remembering whose turn it is in the rotation. That's a lot to ask of a manual process running every fifteen minutes, all day.
We run a lead-routing agent on Kortix that does exactly that check, every 15 minutes: read HubSpot for new leads, assign each one to the right rep, notify them in Slack, and flag anything it can't confidently route for a human. It never deletes or merges a lead — assignment and notification are the only actions it takes.
Routing rules live in more than one place: territory boundaries by region, segment specialists by company size or industry, and a round-robin pool for whatever's left over. A rep checking the lead queue has to hold all of that in their head, get it right every time, and still do it fast enough that the lead is still warm when the notification lands.
The common fallback is a static routing workflow inside the CRM — a fixed if/then chain that breaks the moment a territory is split, a rep goes on leave, or a lead doesn't cleanly fit one bucket. Those leads get stuck in a queue, silently misrouted to whoever built the workflow's default, or followed up on days later once someone notices. None of that is fast, and none of it flags the leads that most need a human's judgment.
On Kortix, a cron fires an agent every 15 minutes. It spawns a fresh session with scoped access to HubSpot, reads every new inbound lead that hasn't been routed yet, scores it for intent, matches it against the territory and segment rules, and falls back to whichever rep in the round-robin pool has taken the fewest leads so far this week. It assigns the HubSpot owner, posts a notification to the rep's Slack channel, and calls out anything high-intent so it gets worked first. A lead it can't confidently route — missing territory data, no segment match, a genuine tie — goes to a separate Slack channel for a human to assign by hand. It never deletes or merges a lead.
Open your Kortix workspace, start a new session, paste this prompt and send it. The agent writes the agent file, the routing rules skill and the 15-minute trigger, and opens a change request for you to review. Prefer clicks? Choose Use this template instead.
Set up a lead routing agent in this workspace.
Create the agent agents/lead-routing.md. Its job is to assign each new HubSpot lead to the right rep and notify the rep in Slack. It may use the HubSpot connector and post to Slack.
Create the skill skills/lead-routing-rules/SKILL.md with these rules:
Add a cron trigger lead-routing-sweep to kortix.yaml. It runs the lead-routing agent every 15 minutes with the prompt "Load the lead-routing-rules skill and run one complete lead-routing sweep."
Tell me which of these connectors are not connected yet.
Open a change request with all of it. Do not merge it.
Open Connectors in your workspace and connect your CRM and Slack. Credentials are brokered server-side and never enter the agent's machine.
Scores each new lead and writes the assigned owner.
Notifies the assigned rep and escalates ambiguous leads.
Merge the change request, then start a session with the lead-routing agent and send this prompt. Check each owner and routing reason before you let the schedule take over.
Run one lead-routing sweep on HubSpot.
The change request added this trigger to kortix.yaml. From now on the agent
runs every 15 minutes, each run in a new session on its own cloud computer.
To change the time, edit the cron line, or open Triggers in the workspace.
triggers:- slug: lead-routing-sweep name: Lead routing sweep on: cron: "0 */15 * * * *" run: agent: lead-routing prompt: Load the lead-routing-rules skill and run one complete lead-routing sweep.The agent assigns a lead only when a rule resolves it. A lead with missing data, a gap in the territory map or an empty round-robin pool goes to #sales-ops with what the agent checked, and a person assigns it in HubSpot. The agent writes only the owner and the routing status. It never deletes or merges a record.
Each sweep ends with one post per lead in Slack. This is what a run looks like in the session:
Routed 5 new leads: 2 by territory, 2 by segment and 1 by round-robin. 2 of them are flagged high-intent. 1 lead had no region, size or industry, so it is waiting in #sales-ops for a person to assign.
Once it works, paste any of these into the same session.
When a rep asks in #sales-routing why a lead came to them, reply in the thread with the rule that matched and the fields it used.
Every Friday at 16:00, post each rep's count of routed leads this week and the number of flagged leads to #sales-ops.
Before you assign a round-robin lead, skip any rep marked out of office in memory, and say so in the routing reason.
The agent writes to the lead record, so its write access is narrow and its escalation path is explicit:
Leads that used to sit in a queue waiting for someone to notice now land on the right rep's desk within 15 minutes, tagged with why they were routed there and whether they need to be worked first. The agent assigns and notifies; a human still owns every lead it can't confidently place.