> ## 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.

# Lead scoring beyond native Salesforce scoring with Default

> How to score or tier leads with Default workflows: rules-based fit tiers, AI Prompt classification, Deep Research scores, and scores your CRM already has, written back to Salesforce or HubSpot and used for routing in the same run.

Lead scoring in Default runs inside a workflow. The workflow combines CRM, enrichment, form, and
website data with rules or an AI step, writes the resulting score or tier to a field in Salesforce
or HubSpot, and routes the lead on it in the same run. Your team defines the scoring criteria.

## What a Default workflow adds to CRM scoring

| Capability | How Default does it |
| - | - |
| Data at the moment the lead arrives | [**Enrich Data**](/workflows/steps-enrichment#enrich-data) adds company and person details, the form submission carries the lead's answers, and [**Deep Research**](/workflows/steps-research) (Beta) reads the live web. |
| Scoring text | [**AI Prompt**](/workflows/steps-ai#ai-prompt) sorts free text, such as a job title or a "How can we help?" answer, into labels you define. |
| Website activity | The **Website Intent Signal** trigger starts a workflow when Default identifies a visitor, and **Page URL pattern** limits it to pages such as `/pricing`. See [Triggers](/workflows/triggers#website-intent-signal). |
| Acting on the score right away | The same workflow routes the lead to a queue, shows a booking page, adds the lead to a sequence, or posts to Slack, based on the tier. |
| Writing the score back | **Update Record** or **Create Record** writes the tier or score to a field in Salesforce or HubSpot. |

## Ways to score leads with Default

| Method | How it works | What it produces | Best for |
| - | - | - | - |
| [Rules-based tiers](#build-a-fit-tier-and-write-it-to-your-crm) | **Multi-Branch** branches, checked in order, or a [Rules of Engagement](/rules-of-engagement) ruleset. | The branch or rule that matched, which you turn into a tier. | Fit on firmographics and form answers, with criteria anyone can read. |
| [AI classification](#score-with-ai-prompt) | **AI Prompt** returns 1 label from a list you give it. | Text. | Job titles, free-text answers, and other messy data. |
| [Research score](#score-with-deep-research-beta) | **Deep Research** (Beta) returns output variables you declare, such as a Number. | Typed values: String, Number, Boolean, URL, or Currency. | Signals that only the live web has. |
| [A score you already have](#route-on-a-score-your-crm-already-has) | A condition or a Rules of Engagement input reads your CRM's score field. | The existing number. | Teams that already score in their CRM or another tool. |

## Build a fit tier and write it to your CRM

This example gives every new Salesforce Lead a fit tier of A, B, or C, writes it to the Lead, and
routes each tier differently.

Before you begin, create a field for the tier in Salesforce, for example a picklist named
`Fit Tier` with the values `A`, `B`, and `C`. Default writes to fields that already exist in your
CRM.

<Steps>
  <Step title="Start from the new Lead">
    In **Workflows**, create a workflow with the **CRM Record Created** trigger. Set **CRM** to
    **Salesforce** and **Record** to **Lead**.
  </Step>

  <Step title="Enrich the Lead">
    Add **Enrich Data** with **Enrichment target** set to **Both**, so company size and job title
    are available even when the Lead has no values for them.
  </Step>

  <Step title="Add the tiers as branches">
    Add **Multi-Branch** with 2 branches, in this order:

    | Branch | Example conditions |
    | - | - |
    | `Tier A` | Number of employees is at least 500, and the title contains any of `VP`, `Director`, `Head` |
    | `Tier B` | Number of employees is at least 50 |

    Branches are checked in order and the first match wins, so a Tier A lead never reaches Tier B.
    Every other lead takes **Else**, which is Tier C.
  </Step>

  <Step title="Write the tier">
    On each branch, add **Update Record** for the trigger's Lead. Under **Fields**, set `Fit Tier`
    to `A`, `B`, or `C`.
  </Step>

  <Step title="Route each tier">
    After each **Update Record**, add the next step for that tier. For example, route Tier A with
    **Round-Robin** to your account executive (AE) queue and set **Owner ID**, route Tier B to your
    sales development rep (SDR) queue, and add Tier C to a nurture sequence.
  </Step>

  <Step title="Test and publish">
    Select **Test**, run test Leads for each tier, and check the path and the written tier in the
    run log. Then select **Publish** and turn on the
    [deployment switch](/workflows#the-enabled-switch) so the status reads **Live**.
  </Step>
</Steps>

<Warning>
  A workflow test performs real actions. It updates the Lead in Salesforce and can assign an owner.
  Use test Leads and test destinations.
</Warning>

To reuse the same tier rules in several workflows, build them as a Rules of Engagement ruleset
instead: each rule is a tier, and **Matched Rule** tells later nodes which tier matched. Publishing
a new ruleset version updates every workflow that uses it.

## Score with AI Prompt

The **AI Prompt** node in Default sends a prompt with the lead's data to a language model and returns
the reply as text. Use it when the signal is in text that rules handle poorly, such as job titles
written 100 different ways.

<Steps>
  <Step title="Ask for a label">
    Add **AI Prompt**, choose a **Model**, and write a **Dynamic prompt** that lists the allowed
    labels and asks for the label only. Type `{{` to insert workflow data:

    ```text theme={null}
    Rate how well this lead fits a B2B software buyer profile.
    Reply with exactly 1 letter: A, B, or C.

    Job title: {{ Title }}
    Company size: {{ Number of employees }}
    Industry: {{ Industry }}
    ```
  </Step>

  <Step title="Branch on the reply">
    Add **Multi-Branch** with a branch for each label, each checking that the AI Prompt **Output**
    equals the label.
  </Step>

  <Step title="Write and route">
    On each branch, write the label to your CRM tier field with **Update Record**, then route. Send
    **Else** to a default tier or to review. It catches unexpected replies and failed requests,
    because AI Prompt reports a failure without stopping the workflow.
  </Step>
</Steps>

Ask for a fixed set of labels rather than a free number. A label is easy to branch on and fits a
picklist field. The prompt, including the lead data you insert, goes to a third-party model
provider.

## Score with Deep Research (Beta)

The [**Deep Research**](/workflows/steps-research) node in Default is in beta. It researches the
live web and returns typed output variables, including **Number**. For a research-based score:

1. In **Research prompt**, create an output variable such as `fitScore` with the type **Number**.
2. State exactly how to fill it, for example "Set `fitScore` to a whole number from 1 to 10, where
   10 means the company sells software to other businesses and has a sales team."
3. Add **Multi-Branch** after it, for example with a branch where `fitScore` is at least 8.
4. Write `fitScore` to a number field in your CRM with **Update Record**.

If the research returns a declared variable with the wrong type, or misses one, the node reports a
failed result instead of passing bad data on. A research run takes longer than other nodes, so run it
after the booking page in form workflows.

## Route on a score your CRM already has

When Salesforce, HubSpot, or another tool already keeps a score on the record, Default can route on
it:

* **Start only above a threshold.** Add a **Condition** to the **CRM Record Created** trigger, for
  example the score is at least 80.
* **Act when the score changes.** Use **CRM Record Updated** with a **Fields Updated** condition on
  the score field, plus the threshold. The workflow then runs only when the score changes, not on
  every edit to the record.
* **Route by score bands.** Add the score field as a number input on a Rules of Engagement ruleset,
  with rules such as score is at least 80 for the AE queue and at least 40 for the SDR queue.

Rerouting on a score change reassigns leads that may already have a rep. Limit it to leads still
waiting for a rep, for example with a condition on the lead's status.

## Keep lead scores trustworthy

* **Write scores to their own field.** Do not overwrite fields that reps edit by hand.
* **Keep the criteria in 1 place.** A Rules of Engagement ruleset keeps tier rules versioned and
  shared across workflows.
* **Avoid scoring loops.** A workflow that starts on **CRM Record Updated** and writes a score
  updates the record again. Add a **Fields Updated** condition that covers only the input fields,
  not the score field.
* **Check the reasoning.** The run log shows each **Multi-Branch** condition with **TRUE** or
  **FALSE**, and the **AI Prompt** reply under **Show data**. See [Run logs](/workflows/run-logs).
* **Qualify before you score.** Filter out personal emails and spam first. See
  [Qualifying inbound leads](/lead-routing/qualification).

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.