Agent setup guide
Salesforce Lead Router
Routes each new Salesforce lead by your territory rules, round-robin within each pool, and DMs the rep.
What it does
Routes each new Salesforce lead by your territory rules, round-robin within each pool, and DMs the rep.
- Starts from each new Salesforce Lead (checked on your plan's schedule interval).
- AI matches it to a territory or segment from your written rules (country, size, industry, source) and sets Hot / Warm / Cold from your rating rules.
- Shares leads round-robin within each pool: it remembers who got the last lead in each pool.
- Updates the Lead's Owner and Rating in Salesforce and DMs the new owner a summary in Slack.
- Unclear leads (no rule matches, missing data) wait in Reviews for a sales ops person; you can switch on review for every lead.
What it needs
- A paid plan (agents run live on paid plans).
- An AI provider key (Settings → AI Providers).
- Salesforce (with API access) and Slack, connected in Settings → Integrations.
- Your reps' Salesforce User Ids and emails (their Slack emails must match).
What it doesn't do
- It never reassigns a lead a rep already owns: only leads owned by a queue or an owner you list as “not routed yet”.
- It routes by your written rules only: no outside enrichment or company lookup.
- It doesn't check reps' working hours, capacity or time off.
- It doesn't convert leads, create tasks or email the lead.
Availability and plans
Available
Its workflow is built and tested, and every app it needs is live. You can get it and set it up now.
Included free on the Enterprise plan; on other paid plans it's a one-time purchase per workspace (the price is on the Agents page). The Agents page in the app always shows its current status.
Before you start
- A paid plan: agents run live, and the Free plan only runs Dry Runs.
- An AI provider key (OpenAI, Anthropic, Google and more) in Settings → AI Providers. AI usage is billed by your provider.
- These apps, connected in Settings → Integrations: Salesforce and Slack.
- The app it watches, connected in Settings → Integrations (the agent starts from an app event).
- About 20 minutes.
Set it up step by step
Get the agent first (buy it, or it's already yours when your plan includes it), then in Agents → My agents press “Set up this agent”. That creates the agent's workflow in your workspace (it counts towards your plan's workflow limit) and opens the canvas with a setup checklist above it. Each item links to the exact place to go and ticks itself off when it's done.
1. Connect your AI provider
The AI steps run on your own key (OpenAI, Anthropic, Google and more). Add one in Settings → AI Providers.
2. Connect Salesforce
Connect your Salesforce org (Settings → Integrations → Salesforce). It needs API access (Enterprise edition or above).
3. Connect Slack
Connect the Slack workspace your reps use (Settings → Integrations → Slack).
4. Write your routing rules
Open “Apply your routing rules” and replace the placeholder with your pools, reps (email + Salesforce User Id) and rating rules.
| Setting | What to enter | In step |
|---|---|---|
| Your routing rules | Replace the placeholder with your territories or segments, the reps in each in round-robin order (name, email, Salesforce User Id starting with 005), the owners that mean “not routed yet” (your queue or integration user) and your Hot / Warm / Cold rules. Change “REVIEW EVERY ASSIGNMENT: no” to yes to approve every lead. It starts as “[DESCRIBE YOUR TERRITORIES OR SEGMENTS, THE REPS IN EACH (NAME, EMAIL, SALESFORCE USER ID), THE OWNERS THAT MEAN “NOT ROUTED YET” AND YOUR HOT / WARM / COLD RULES HERE]” until you replace it. | “Apply your routing rules” |
5. Pick your Salesforce account
Open the trigger and “Set the owner and rating” and pick your org in each.
| Setting | What to enter | In step |
|---|---|---|
| Salesforce account (new leads) | The Salesforce org whose new leads are routed. Pick your connected Salesforce account. | “New lead in Salesforce” |
| Salesforce account (update) | The same Salesforce org. The connected user must be allowed to change Lead owners. Pick your connected Salesforce account. | “Set the owner and rating” |
6. Pick your Slack account
Open “Find the rep in Slack” and “DM the rep” and pick your account. Each rep's Slack email must match the email in your rules.
| Setting | What to enter | In step |
|---|---|---|
| Slack account | The Slack workspace your reps use (to find each rep by email). Pick your connected Slack account. | “Find the rep in Slack” |
| Slack account | The same Slack workspace, used to DM the rep. Pick your connected Slack account. | “DM the rep” |
7. Test it with Dry Run
Press Dry Run: the agent runs on sample data with no messages sent and nothing written to your apps.
8. Switch the trigger on
Open the trigger and click “Activate app trigger”: new leads are picked up on your plan's schedule interval. Leads created before activation aren't routed.
How it works
The agent is a normal workflow with 11 steps (1 AI step, with a person approving in Reviews). You can open, edit and monitor it like any other workflow.
- New lead in Salesforce — Starts on “New record” in Salesforce (an app event). Starts a run for each new Salesforce Lead (checked on your plan's schedule interval).
- Recall the rotation — Recalls what it remembered earlier (memory “salesforce-lead-router”). Reads who got the last lead in each territory or segment, so leads are shared round-robin. Nothing is found on the first run.
- Apply your routing rules — AI step (runs on your AI provider key). AI matches the lead to a territory or segment from your written rules, picks the next rep in that pool (round-robin), sets the rating and writes the rep's summary.
- Route it? — Decision: picks the branch to follow. Leads already owned by a rep are left alone. Unclear leads wait for a sales ops person; the rest are assigned at once.
- Left as is — Kept in the run history. Branch: Already owned. The lead already has an owner; the run history keeps the check.
- Sales ops checks the assignment — A person approves or rejects it in Reviews (the run waits). Branch: Unclear. A sales ops person sees the lead, the proposed owner and why it's unclear in Reviews, edits the owner if needed and approves.
- Remember the rotation — Remembers it for later runs (memory “salesforce-lead-router”, kept until deleted). Branch: Assign / Approved. Saves who got this lead in its pool (so the next lead goes to the next rep) and the assignment used by the next steps.
- Set the owner and rating — Salesforce: Update a record. Updates the Lead's Owner and Rating in Salesforce.
- Find the rep in Slack — Slack: Find user by email. Looks up the new owner's Slack account by their email.
- DM the rep — Slack: Post a message. Sends the lead summary to the new owner as a direct message from the Fluxo Flow app.
- Routed — Kept in the run history. The run history keeps the lead, the rule used and the owner.
Test it with Dry Run
Press Dry Run in the canvas. The agent runs on the sample data stored on its trigger (the “Sample data for Dry Run” box), so you can check every step's output before anything is live. The sample has the same shape as a real event from the app.
Sample data fields
id, name, created_date, record.
- Nothing is sent or written: app actions, emails and Slack posts are simulated, and AI steps don't call your AI provider.
- Approval steps use the Dry Run decision you pick in the step's settings (approved, rejected or timeout), so you can try each branch.
- Memory steps don't read or write stored memory: a recall finds nothing, and a save only shows what it would store.
Go live
- Open the trigger and click “Activate app trigger”: new leads are picked up on your plan's schedule interval. Leads created before activation aren't routed.
- Activating the app trigger needs the trigger's connected account. The first check only remembers what's already there, so older items don't start runs; the same item never starts two runs.
- The setup checklist adds a “paid plan” item before activation: live runs need a paid plan (the Free plan only runs Dry Runs).
- When every checklist item is done and the trigger is on, the checklist says “Live — this agent is running”. Follow its runs in the workflow's History tab and in Analytics → Agents.
Questions
Will it take leads away from reps?
No. It only routes leads owned by a queue or by an owner you list as “not routed yet” (e.g. your integration user). Anything a rep already owns is left alone.
How does round-robin work?
The agent remembers, per territory or segment, which rep got the last lead and gives the next one to the next rep in the order your rules list them. The memory is kept until you delete it; changing the rep list simply continues from the last rep it finds.
Troubleshooting
- “No AI provider connected” or a rejected key: connect or fix the key in Settings → AI Providers, then press Test there.
- A checklist item stays unticked: the setting is still empty or still contains its placeholder text. Open the step from the checklist and fill it in.
- An app step fails with “Needs reconnect”: the account's access was revoked or expired. Reconnect it in Settings → Integrations.
- Slack says the app isn't in the channel: in Slack, type /invite @Fluxo Flow in that channel (always needed for private channels).
- No runs start: activate the app trigger with a connected account. Only items created after activation start runs.
- A run shows as paused: it's waiting for someone in Reviews to approve or reject it.
- A step failed: open the run in History and check that step in the Trace tab for the error and what it received.
Generated from the agent's own workflow, so it always matches what the agent does. Last updated .