> ## Documentation Index
> Fetch the complete documentation index at: https://docs.os.default.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Automating speed to lead with Default: assign, alert, and escalate inbound leads

> How to automate speed to lead and inbound lead response time with Default: a Form Submission or CRM Record Created trigger, Enrich Data, Round-Robin to an available rep, Update Record for the owner, and a Send Slack Message alert, then a Time Delay and a Match Record re-check that escalates any lead nobody has worked.

Speed to lead is how fast a new inbound lead gets a response from a rep. Lead response time grows
when a lead waits for someone to pick an owner, when the rep doesn't know the lead is theirs, and
when nobody notices that the lead was never worked.

Default handles the lead distribution side in 1 workflow. A **Round-Robin** node assigns the lead to
an available rep in a queue, **Update Record** writes that rep as the owner in Salesforce or HubSpot,
and **Send Slack Message** tells the rep with the lead's details. After a **Time Delay**, a
**Match Record** node reads the record from your CRM again, and a **Multi-Branch** node alerts a
manager or reassigns the lead when nobody has worked it.

This guide covers leads that can't book a meeting on the form: contact-sales forms, content
downloads, free trial signups, and leads created in the CRM. When a lead can book on the form, the
fastest path is to show the assigned rep's calendar right there. See
[Demo request routing](/guides/demo-request-routing).

## Speed to lead at a glance

| Step | Node | What it does |
| - | - | - |
| 1. Start | **CRM Record Created** or **Form Submission** | Starts a run when the lead arrives. |
| 2. Enrich | **Enrich Data** | Adds title, company size, and other details for the rep. |
| 3. Assign | **Round-Robin** | Picks an available rep from a queue. |
| 4. Own | **Update Record**, or **Create Record** for a form | Writes the rep as the CRM owner. |
| 5. Alert | **Send Slack Message** | Sends the rep a direct message with the lead's details. |
| 6. Follow up (optional) | **Create Activity** or **Create Engagement**, and a sequencing node | Creates a task for the rep and starts a sequence from the rep's mailbox. |
| 7. Wait | **Time Delay** | Gives the rep time to respond, for example 15 minutes. |
| 8. Re-check | **Match Record** | Reads the record from the CRM again. |
| 9. Escalate | **Multi-Branch**, then **Send Slack Message** or a second **Round-Robin** | Alerts a manager, or reassigns the lead, when nobody has worked it. |

## Choose the trigger

| Where the lead starts | Trigger | What changes in the workflow |
| - | - | - |
| A record in Salesforce or HubSpot, created by your own forms, a trial signup sync, an import, or a rep | **CRM Record Created** | The record exists, so **Update Record** writes the owner. This guide's main example. |
| A form Default tracks on your site, such as a contact-sales form or a content download | **Form Submission** | The workflow checks the CRM and creates the record. See [Start from a form](#start-from-a-form). |
| Your own backend, for example when someone starts a trial | **API** | Works like **Form Submission**. See [Triggers](/workflows/triggers#api). |

Run each lead through 1 speed-to-lead workflow. A record that a Default workflow creates can also
start a **CRM Record Created** workflow on the same object, so give the CRM trigger a **Condition**
that leaves those records out, for example on `Lead Source`.

## Setup for speed to lead

| Requirement | Where | Why |
| - | - | - |
| Salesforce or HubSpot connected | **Settings** → **Integrations**. See [Salesforce](/settings/integrations/salesforce) and [HubSpot](/settings/integrations/hubspot). | The trigger, **Update Record**, and **Match Record** read and write the CRM. |
| Each rep mapped to their CRM user | **Settings** → **Users**, on the **Mappings** tab. See [Users](/settings/users). | Default converts the assigned rep into a Salesforce User ID or HubSpot Owner ID for the owner field. |
| Slack connected, and each rep mapped to their Slack User ID | **Settings** → **Integrations**, and **Settings** → **Users**. See [Slack](/settings/integrations/slack). | **Send Slack Message** reaches a rep by direct message through this mapping. |
| A queue whose policy routes **Objects** | **Routing** → **Queues** and **Policies**. See [Queues](/queues) and [Policies](/policies). | **Round-Robin** picks the rep from this queue, and the owner write counts as the rep's turn. |
| An enrichment provider or waterfall, optional | **Settings** → **Integrations**, and [Waterfalls](/settings/configurations/waterfalls) | **Enrich Data** adds context for the alert. You don't need an account or API key with the enrichment provider. |

### Decide who counts as available

When a workflow assigns a lead, the queue's policy decides which members can win. On the policy's
**Availability** tab:

* **Exclude members currently out of office** is on by default. Reps with an out-of-office block in
  Default, or an out-of-office event on their calendar, are skipped. See
  [Out of Office](/settings/availability/ooo).
* **Exclude members currently busy** is off by default. Turn it on to skip reps who are busy on
  their calendar when the lead arrives, for example in a meeting.
* **Pause assignments**, in a member's row menu on the queue, takes a rep out of rotation until you
  select **Resume assignments**.

Work hours don't gate a workflow's **Round-Robin** node. A lead that arrives at night goes to a rep
right away, and only paused, out-of-office, and, with the toggle on, busy reps are skipped. See
[Availability](/policies#availability).

## Build the speed-to-lead workflow

This example assigns every new inbound Salesforce Lead to a rep in a queue named `Inbound Reps`,
messages the rep in Slack, and alerts a sales manager when the Lead's status hasn't changed after
15 minutes. HubSpot differences follow the steps.

<Steps>
  <Step title="Add the trigger">
    In **Workflows**, create a workflow and add the **CRM Record Created** trigger. Set **CRM** to
    **Salesforce** and **Record** to **Lead**. Add a **Condition** for inbound leads, for example
    `Lead Source` is `Web`.
  </Step>

  <Step title="Enrich the lead">
    Add **Enrich Data**. Set **Enrichment target** to **Both** and pick a provider or waterfall in
    **Enrichment source**. Leave **Email / Domain (optional)** empty, and Default uses the Lead's
    email from the trigger.
  </Step>

  <Step title="Assign a rep">
    Add **Round-Robin** and set **Queue** to `Inbound Reps`. The queue's policy picks an available
    member, and later nodes get that rep as **Latest assigned user**.
  </Step>

  <Step title="Write the owner">
    Add **Update Record**. Set **Platform** to **Salesforce**, **Record Type** to **Lead**, and
    **Record to update** to the Lead's record ID from the trigger. Under **Fields**, add
    **Owner ID** and choose **Latest assigned user** under **Round robin**. You can write enriched
    fields here too, such as title or company size.
  </Step>

  <Step title="Alert the rep in Slack">
    Add **Send Slack Message**. In **Recipients**, choose **Latest assigned user**, so the rep gets a
    direct message. In **Message**, type `{{` to insert the lead's name, title, company, lead source,
    and the company size from **Enrich Data**, so the rep can act without opening the CRM first.
  </Step>

  <Step title="Add a task and a sequence (optional)">
    Add **Create Activity**. Set **CRM** to **Salesforce** and **Type** to **Task**. Under
    **Fields**, map the subject and due date, set `OwnerId` to **Latest assigned user**, and set
    `WhoId` to the Lead's record ID from the trigger. Leave **Associated record (optional)** empty
    for a Lead, because it fills the task's `WhatId`, which Salesforce doesn't accept for Leads.

    To start outreach from the rep's mailbox, add a sequencing node such as
    **Add to Outreach Sequence** with **Sending mailbox** set to **Latest assigned user**. See
    [Send routed leads to sales sequences](/guides/routed-leads-to-sequences).
  </Step>

  <Step title="Wait">
    Add **Time Delay** and set it to the time you give a rep to respond, for example 15 minutes.
  </Step>

  <Step title="Read the Lead again">
    Add **Match Record**. Set **CRM** to **Salesforce** and **Record** to **Lead**. Under
    **Match Details**, match the Lead's ID to the record ID from the trigger. **Match Record**
    searches Salesforce when it runs, so it sees what the rep changed during the delay.
  </Step>

  <Step title="Escalate leads nobody worked">
    On the **Match** branch, add **Multi-Branch** with a branch named `Not worked`, where `Status`
    from this second **Match Record** still equals `Open - Not Contacted`, or the value your team
    uses for new leads. On `Not worked`, add **Send Slack Message** with the sales manager in
    **Recipients**, or a channel such as `#lead-escalations` in **Slack channels**. Insert the
    lead's name and the assigned rep. Leave **Else** empty, so worked leads end the run.
  </Step>

  <Step title="Test and publish">
    Set the delay to 1 minute while you test, because a test run waits out the **Time Delay** too.
    Select **Test**, choose the **CRM Record Created** trigger, fill in the email and record ID of a
    test Lead, and select **Run Test**. Then set the delay back, select **Publish**, and check that
    the status next to the [deployment switch](/workflows#the-deployment-switch) reads **Live**. A
    new workflow goes live when you first publish it. If the status reads **Paused**, turn the
    switch on.
  </Step>
</Steps>

<Warning>
  A test performs real actions. It changes the Lead's owner, counts the routing assignment, sends
  the Slack messages, creates the task, and can enroll the Lead in the sequence. Use a test Lead and
  a test sequence.
</Warning>

The re-check works only when reps change the status on first contact. Check a field that the rep
changes and this workflow doesn't. The owner, for example, is written by the workflow, so it says
nothing about whether the rep acted.

## Reassign a lead nobody worked

To route the lead again instead of, or after, alerting a manager, continue the `Not worked` branch:

1. Add a second **Round-Robin** with a different queue, for example `Inbound Backup`. A second
   **Round-Robin** on the same queue can pick the same rep again.
2. Add **Update Record** that sets **Owner ID** to **Latest assigned user**. It now holds the rep
   from the second **Round-Robin**.
3. Add **Send Slack Message** with **Latest assigned user** and the manager in **Recipients**.

Each owner write counts as 1 assignment. The first rep keeps the assignment from the first
**Round-Robin**, and the new rep gets 1 from the backup queue. Both appear in **Routing** under
**Assignments**, on the **Object assignments** tab. To take the turn back from the first rep, an
admin can give them a **Custom** calibration of `-1`. See [Calibration](/queues#calibration).

A sequence started earlier keeps the first rep as the sender. Default has no node that removes a
person from a sequence, so change it in your sequencing tool.

## Start from a form

When the lead comes from a form Default tracks, the workflow creates the CRM record:

1. Add the **Form Submission** trigger and set **Connected Form** to your contact-sales or content
   form. The form must be approved and mapped first. See
   [Your forms](/forms/your-forms#use-a-form-in-a-workflow).
2. Add **Match Record** for a Salesforce Lead, matching the Lead's email to the email from the
   form. On **Match**, the person already has an owner: add **Send Slack Message** to the matched
   Lead's owner, so a repeat form fill doesn't change the owner.
3. On **No Match**, add **Enrich Data** and **Round-Robin**, then **Create Record** with
   **Platform** set to **Salesforce** and **Record Type** set to **Lead**. In **Mapped Fields**, map
   the name, email, and company, and set **Owner ID** to **Latest assigned user**.
4. Continue with the Slack alert, the optional task and sequence, **Time Delay**, and the re-check.
   A form has no Lead ID of its own, so use the ID from **Create Record** wherever the steps above
   use the trigger's: set the task's `WhoId` to it, and match the re-check **Match Record** on it.

To keep personal email addresses and poor fits away from your reps, add the checks from
[Qualifying inbound leads](/lead-routing/qualification) before **Round-Robin**.

## Salesforce and HubSpot differences

| | Salesforce | HubSpot |
| - | - | - |
| Record to watch and re-check | **Lead** or **Contact** | **Contact** |
| Owner field in **Update Record** and **Create Record** | **Owner ID** | **Contact owner** |
| How new records reach Default | Salesforce pushes them to Default. | HubSpot notifies Default through Default's HubSpot app. |
| Task node | **Create Activity** with **Type** set to **Task** | **Create Engagement** with **Engagement type** set to **Task**, and **Associated record type** set to **Contact** |
| Re-check match | The record's ID | The contact's record ID |
| Field to check | `Status`, for example `Open - Not Contacted` | `Lead Status`, for example `New` |
| Sequence sender | The sender field of any sequencing node | **Enroll in HubSpot Sequence**, with **Sending HubSpot user** set to **Latest assigned user** |

HubSpot's **Create Record** has no **Update on conflict**, so in a form workflow the **Match Record**
check is also what stops a repeat fill from creating a second contact. For the full routing setup in
each CRM, see [Salesforce routing](/lead-routing/salesforce) and [HubSpot routing](/lead-routing/hubspot).

## Check that speed to lead works

* In the workflow, select **Runs**. A run waiting in **Time Delay** shows **Suspended**. Open a run:
  the **Round-Robin** step reads **Assigned to** and the rep, **Show data** under **Update Record**
  shows the owner it wrote, and the **Multi-Branch** step shows the status check with **TRUE** or
  **FALSE**. See [Run logs](/workflows/run-logs).
* In **Routing**, select **Assignments**, then **Object assignments**. The row shows the record, the
  rep, the queue, and the time. **Open Source** opens the run that made it. See
  [Routing logs](/lead-routing/logs).
* In your CRM, the record shows the owner, the task, and, after the rep acts, the new status.

Default records the routing side of speed to lead: when the run started, when each node ran, and
when the rep was assigned. It doesn't record when the rep first contacts the lead. That lives in
your CRM, in the lead's status changes and activity history. To count leads nobody worked in time,
send the escalation to a dedicated Slack channel, or add **Update Record** on `Not worked` to set a
field of your own, such as a checkbox, and report on it in your CRM.

## Troubleshoot speed to lead

| What you see | What to check |
| - | - |
| The run fails at **Round-Robin** | Default couldn't pick a rep, for example because the queue is turned off or every member is paused or out of office. The run log shows the reason. Admins can get a Slack alert for failed runs with the workflow **Error Log** notification. See [Workspace notifications](/settings/workspace-notifications). |
| The rep is picked, but the CRM owner doesn't change | Map the rep's Salesforce User ID or HubSpot Owner ID in **Settings** → **Users**. |
| The rep gets no Slack message | Map the rep's Slack User ID in **Settings** → **Users**. The **Send Slack Message** step in the run log names recipients without a Slack mapping. |
| Leads escalate even though the rep called | The rep didn't change the field the re-check reads. Agree on the field reps update on first contact, or check a different one. |
| Leads escalate overnight and on weekends | **Time Delay** counts clock time, and work hours don't gate **Round-Robin**. Send escalations to a channel your managers check, or use a longer delay. |
| 1 lead starts 2 runs | A form workflow created the record and a **CRM Record Created** workflow started too. Add a **Condition** to the CRM trigger that leaves those records out. |
| The reassigned lead goes back to the same rep | Reassign from a different queue. |

Related: [Lead routing software from Default](https://www.default.com/product/lead-routing-software)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.