Skip to content
SEMROI
Case study · AI-powered CRM automation

Kommo CRM lead routing by shift, managed by an AI agent

We turned Kommo CRM lead routing into a shift system the sales manager runs by writing to an AI agent. Our client is a health tourism clinic in Türkiye. Leave, a sick day or someone leaving the team now takes one message: the agent changes the rule, deploys it, checks it live and reports back. All 13 routing changes in about three months were made this way.

Client
A health tourism clinic in Türkiye
Sector
Healthcare · Health tourism
Market
Türkiye
Duration
Aug 2026 – ongoing
Interface
Chat with an AI agent; no code, no dashboard
Our roles
Shift rules, Kommo integration, setting up and running the AI agent
  • Kommo CRM
  • Lead routing
  • AI agent
  • CRM automation
  • Sales management
checks: an exact match with the 224-day shift rota
1,124
routing changes in about three months, all via the agent
13
exception types: leave, sickness, handover, exit, time slot
5
webhook response to Kommo; its retry limit is 2 s
~0.5 s
leads routed to the rep who left the team
0

Sources: shift rules and change records, Aug – Nov 2026. Response time measured live. Lead volumes are not shared.

Challenge

Why did the shift plan break every week?

A health tourism clinic in Türkiye answers patients who come from abroad. The team uses Kommo as its healthcare CRM; leads arrive from WhatsApp, ad forms and the website. The shift plan lived in the sales manager's spreadsheet, but real life didn't fit it: someone goes on leave, someone falls ill, someone leaves. Every change had to reach routing the same day.

What we had to do
  • Turn the rota into a rule that sends every lead to the right personMatches the rota
  • Make leave, sickness and exits manageable without knowing codeWith one message
  • Keep each patient with one rep and share the good hours fairlyHourly and rotating
  • Stop Kommo's retries from pulling leads backResponse in ~0.5 s
  • Leave and sick days broke the plan

    When a rep went on leave or fell ill, their leads had to go to someone else that day. Someone had to remember it and enter it into the system.

  • A rep who left could keep receiving leads

    When someone left the team, the plan had to be rebuilt. If a gap slipped through, a new patient would land with someone who was no longer there.

  • The good hours always went to the same person

    Of the two reps sharing the day shift, one always got the busier hours. A gap that looks small in a single week grew over the months.

  • One patient, two reps

    Patients often fill in a form and message on WhatsApp minutes later. With leads handed out in turn, the same patient could land with two different reps.

  • Retries pulled leads back

    Kommo resends a notification when it gets no response within 2 seconds. Late retries pulled a lead already handled back to the first stage, sometimes to another rep.

Run by chat

Agentic AI: the manager writes, the agent acts

The interface is a chat: no code, no dashboard. Whoever runs the team writes the change in plain words; the AI agent applies it, checks it and reports back.

“Send every lead that comes in between 1:35 pm and 6:00 pm today to one rep.”

How we workSEMROI built the agent. We build agentic processes for you too: we can run them for you, or hand them over to your team.AI agent development
Shift agent
message → rule → deploy → check
Works in any harness
  1. 01
    The sales manager writes the requestMessage
    message(off: A, to: B, when: tomorrow)
  2. 02
    The agent picks the right exception typeSelected
    exception = handover(A → B, tomorrow)
  3. 03
    Adds the rule and logs it with a reasonSaved
    rota.add_exception(handover, A → B)
  4. 04
    Deploys the changeLive
    deploy → live
  5. 05
    Checks it liveVerified
    router.health_check → ok
  6. 06
    Reports the result to the sales managerReported
    notify(manager, A → B, tomorrow)

Every change is stored as a dated record with its reason.

How it works

Every new lead goes to whoever is on shift that minute

When a new lead opens in Kommo, the system answers Kommo first, then works out who is on shift that minute. Exceptions take precedence over the plan; the lead lands in that person's pipeline at the first-contact stage.

Lead sources
  • WhatsApp
  • Ad forms
  • Website
Shift layer
  1. Answers Kommo first
  2. Works out this minute's shift
  3. Applies the exceptions
  4. Assigns the lead to a rep
Result
  • AssignedThe on-shift rep's pipeline, first-contact stage
  • RetryIf the lead has already moved on, it is left alone and only logged
  • LogEvery decision as a Turkish log line the team can read

The shift rule is generated from the sales manager's 4-week rota; it matched the 224-day plan exactly in 1,124 checks.

What we did

How we built Kommo CRM lead routing by shift

First we made the routing itself solid, then we turned every real-life situation into an exception type. Today, when the sales manager asks for a change, the agent knows which type it needs; nobody touches the code.

Work stepsAug – Nov 2026

Built on the clinic's existing Kommo account, and running there.

  1. From rota to rule

    The sales manager's shift rota became a rule

    • We turned the four-week rota into a rule that works out who is responsible for every minute: night, the day pair and evening, including weekend handovers and public holidays.
    • Before going live we compared the rule with the rota day by day: 1,124 checks over 224 days, every one an exact match.

    OutcomeThe rota and the routing in Kommo now say the same thing.

  2. Fair hours

    One patient, one rep; the good hours take turns

    • The two reps sharing the day shift take leads hour by hour, not in turn. A patient who fills in a form and messages on WhatsApp minutes later lands in the same hour, so with the same person.
    • The owner of the odd hours swaps every 28 days, so the busy hours never stay with one person. Monday 00–18 splits exactly: 9 odd and 9 even hours.

    OutcomeThe split is even; no patient is divided between two reps.

  3. Five exception types

    Leave, sickness and exits are now one record each

    • Five exception types for five real-life cases: a time window to the minute, a full day, day shift only, handing one person's leads to another, and an interim rota when the team shrinks.
    • Each is a one-line record. The sales manager writes "A is off tomorrow"; the agent picks the right type, adds it, deploys it and checks it live.

    Outcome13 routing changes in about three months, all made by writing to the agent.

  4. Retries

    Kommo gets an answer in half a second; the lead stays put

    • Kommo resends a notification 5 and 15 minutes later when it gets no response within 2 seconds. The system used to respond in 1.5–3 seconds; retries pulled handled leads back to the first stage.
    • Now it responds first (about 0.5 s) and does the work in the background. Before touching a lead it checks whether the lead has moved on; if so, it only logs the retry.

    OutcomeRetries no longer pull leads back or hand them to another rep.

  5. Team change

    From four people to three, with no lead to the leaver

    • When a rep was leaving, no leads went to them in their last two weeks; the rest of the team covered their day hours.
    • Then a three-person interim rota was set up: everyone rotates week by week between day, night and evening. It has no end date on purpose; it runs until the new plan arrives.
    • The new rota was also exported as a shift spreadsheet the team can read.

    OutcomeThe team got smaller; not one lead was routed to the rep who left.

  6. Forms and alerts

    Web forms in a sheet, the sales moment in an alert

    • Leads that arrive by email from the website form are written to a spreadsheet automatically within a minute; the country is taken from the phone number.
    • When a lead in any pipeline reaches the flight ticket stage, management gets an instant alert, never twice for the same lead.

    OutcomeNobody copies form leads by hand or misses the moment of sale.

Work stepsAug – Nov 2026
01From rota to rule

The sales manager's shift rota became a rule

  • We turned the four-week rota into a rule that works out who is responsible for every minute: night, the day pair and evening, including weekend handovers and public holidays.
  • Before going live we compared the rule with the rota day by day: 1,124 checks over 224 days, every one an exact match.

OutcomeThe rota and the routing in Kommo now say the same thing.

02Fair hours

One patient, one rep; the good hours take turns

  • The two reps sharing the day shift take leads hour by hour, not in turn. A patient who fills in a form and messages on WhatsApp minutes later lands in the same hour, so with the same person.
  • The owner of the odd hours swaps every 28 days, so the busy hours never stay with one person. Monday 00–18 splits exactly: 9 odd and 9 even hours.

OutcomeThe split is even; no patient is divided between two reps.

03Five exception types

Leave, sickness and exits are now one record each

  • Five exception types for five real-life cases: a time window to the minute, a full day, day shift only, handing one person's leads to another, and an interim rota when the team shrinks.
  • Each is a one-line record. The sales manager writes "A is off tomorrow"; the agent picks the right type, adds it, deploys it and checks it live.

Outcome13 routing changes in about three months, all made by writing to the agent.

04Retries

Kommo gets an answer in half a second; the lead stays put

  • Kommo resends a notification 5 and 15 minutes later when it gets no response within 2 seconds. The system used to respond in 1.5–3 seconds; retries pulled handled leads back to the first stage.
  • Now it responds first (about 0.5 s) and does the work in the background. Before touching a lead it checks whether the lead has moved on; if so, it only logs the retry.

OutcomeRetries no longer pull leads back or hand them to another rep.

05Team change

From four people to three, with no lead to the leaver

  • When a rep was leaving, no leads went to them in their last two weeks; the rest of the team covered their day hours.
  • Then a three-person interim rota was set up: everyone rotates week by week between day, night and evening. It has no end date on purpose; it runs until the new plan arrives.
  • The new rota was also exported as a shift spreadsheet the team can read.

OutcomeThe team got smaller; not one lead was routed to the rep who left.

06Forms and alerts

Web forms in a sheet, the sales moment in an alert

  • Leads that arrive by email from the website form are written to a spreadsheet automatically within a minute; the country is taken from the phone number.
  • When a lead in any pipeline reaches the flight ticket stage, management gets an instant alert, never twice for the same lead.

OutcomeNobody copies form leads by hand or misses the moment of sale.

What we learned

  1. The interface can be a chat

    The person running the shifts does not need to learn a dashboard. Because the rules live as data, "A is off tomorrow" becomes a safe, one-line change. The agent applies it, checks it and reports back.

  2. Prove it against the old spreadsheet before going live

    If a team trusts a spreadsheet, the new system must first give the same answer. Here we tested the rule against the rota with 1,124 checks over 224 days; the trust came from that match.

  3. Route by patient, not by message

    If the same person writes on two channels minutes apart, routing in turn splits one conversation in two. Hour-by-hour routing keeps the patient with one rep; rotating hours keep the split fair.

  4. Answer the webhook first

    Systems like Kommo resend a notification when they don't get a quick response. Answering first, doing the work in the background and checking a lead's state before touching it makes late retries harmless.

  5. Plan exits as open-ended

    We gave the interim rota no end date; it runs until the new plan arrives. That way a forgotten date is never enough to send leads to someone who has left.

FAQ

Questions about Kommo CRM lead routing

For definitions, see what agentic AI is; for applications, AI agent examples.

  • How do you automate Kommo CRM lead routing?

    When a new lead opens in Kommo, a webhook tells the routing system. The system works out who is on shift that minute and assigns the lead to that rep's pipeline. The rules come from the shift plan; exceptions such as leave or sick days take precedence. So no lead waits for someone who is off.

  • How does an AI agent manage lead routing in Kommo?

    The sales manager writes the request in plain words: "A is off tomorrow, send their leads to B." The AI agent picks the right exception type, adds the rule, deploys it, checks it live and reports back. No code or dashboard needed. In this project, all 13 changes in about three months were made this way.

  • If the same patient writes on two channels, do they get two reps?

    They can if leads are handed out in turn. Here, the two reps sharing the day shift take leads hour by hour; a patient who fills in a form and messages on WhatsApp minutes later lands in the same hour, so with the same person. Kommo's duplicate check by phone number is on too.

  • Why does Kommo send the same webhook again?

    Kommo resends a notification 5 and 15 minutes later when it gets no response within 2 seconds. If the receiver responds only after finishing its work, a late retry can pull the lead back to the first stage. The fix: respond first, work in the background and check whether the lead has moved on before touching it.

  • Can Kommo give WhatsApp leads to whoever is on shift automatically?

    Yes. In a team that uses Kommo as its WhatsApp CRM, a new WhatsApp lead can be assigned to the rep on shift the moment it opens. Here the rule is generated from a four-week rota, with public holidays defined in advance. The rep finds the lead in their own pipeline at first contact; nobody sorts leads by hand.

  • How does lead distribution change when a rep leaves?

    In this project, no leads went to the departing rep in their last two weeks; the rest of the team covered their day hours. Then a three-person interim rota was set up. It has no end date on purpose and rotates until the new plan arrives. So a forgotten date never sends a lead to someone no longer on the team.

  • How does agentic AI work in a sales team?

    In this team, people decide and the agent acts. The sales manager says who gets leads and when; the agent writes the rule, deploys it, verifies it live and keeps every change as a dated record with its reason. The team learned no new dashboard; the only new habit is writing a message to the agent.

Is your shift plan not showing up in Kommo?

We build agentic processes and AI agents for business. Tell us about your shifts and lead sources; we set it up, and your team runs it by chat.

One prompt to an AI agent unrolls a sales report scroll with rep scorecards A and B and a 9-step funnel; seal reads 07:00
Next case study · Sales reporting
Sales reporting with AI for a clinic's sales team